Comparing revisions for MoesZigbeeSceneButtons
- [7425] 2021-10-10 02:25:37 by ZorrUno (unregistered user)
- [7439] 2021-10-10 03:02:43 by ZorrUno (unregistered user)
Additions:
-- Comes in White, Black and (Harder to get) grey
-- I couldn't get all the double press/hold options that the Tuya connection should get.
-- More options may be supported with Zigbee2Mqtt.
-- This setup was fine for what I wanted, but I did start playing with double press detection in Node Red... it wouldn't detect fast presses, but half a second apart I could do.
Top Left Button Pressed
Bottom Left Button Pressed
Top Right Button Pressed
Bottom Right Button Pressed
Top Right Button Held
-- Note that when held, and button is released, a different message is generated on release (I haven't listed those here, as I didn't need them)
Bottom Right Button Held
-- I couldn't get all the double press/hold options that the Tuya connection should get.
-- More options may be supported with Zigbee2Mqtt.
-- This setup was fine for what I wanted, but I did start playing with double press detection in Node Red... it wouldn't detect fast presses, but half a second apart I could do.
Top Left Button Pressed
Bottom Left Button Pressed
Top Right Button Pressed
Bottom Right Button Pressed
Top Right Button Held
-- Note that when held, and button is released, a different message is generated on release (I haven't listed those here, as I didn't need them)
Bottom Right Button Held
Deletions:
-- They have a green LED on each button that lights when pressed.
-- Pairing mode is entered by holding bottom left button down for about 10 seconds, and all 4 LEDs start flashing.
-- I just used Node Red to pull the MQTT topics and interrogate the JSON to command various things, but obviously there are plenty of other ways to do it in HA or with direct rules in the zigbee bridge.
-- I couldn't get all the double press/hold options that the Tuya connection seems to get (based on the youtube vids I watched). They are supposed to allow for double presses and a HOLD for each button.
-- More options may be supported with Zigbee2Mqtt, or another zigbee setup.
-- This setup was fine for what I wanted, but I did start playing with double press detection in Node Red... it wouldn't detect fast presses, but half a second apart I could do. I might go back to it if I need doublepress.
====Photos====
{{image url="https://zorruno.com/wp-content/uploads/2021/10/PXL_20211010_142606573.jpg" title="Moes Scene Switch" alt="Moes Scene Switch"}}
{{image url="https://zorruno.com/wp-content/uploads/2021/10/PXL_20211010_132333838.jpg" title="Moes Scene Switch Mounted" alt="Moes Scene Switch Mounted"}}
====Relevant Links====
https://www.youtube.com/watch?v=I5S9BDX-d-Y
https://www.moeshouse.com/collections/zigbee-scene-switch
https://community.home-assistant.io/t/zigbee2mqtt-tuya-4-button-scene-switch-ts0044/274735?page=2
Likely same as Zemismart etc https://www.aliexpress.com/item/4001365407192.html
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3611
**Top Left Button Pressed**
**Bottom Left Button Pressed**
**Top Right Button Pressed**
**Bottom Right Button Pressed**
**Top Right Button Held**
-- Note that when held, and button is released, a different message is generated on release (I haven't listed those here, as I didn't need them. Obviously designed for dimming control.)
**Bottom Right Button Held**
====Node Red Flow====
This could definitely be simplified futher with one function node, but it was a neater way of having 2 switches doing the same functions (and I could add more if needed). Also, if I figure out the double presses or move it to my Zigbee2MQTT setup, the changes will be fewer.
{{image url="https://zorruno.com/wp-content/uploads/2021/10/2021-10-10_15-48.png" title="Moes Scene Switch with Tasmota Zigbee Bridge Node Red Flow" alt="Moes Scene Switch with Tasmota Zigbee Bridge Node Red Flow"}}
[{"id":"fb73288b75d2f4a1","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"0370bab985570f71","type":"comment","z":"fb73288b75d2f4a1","name":"Scene Detect Button Presses from 2 Quad Switches","info":"","x":230,"y":240,"wires":[]},{"id":"d0777c18e77a6b3e","type":"mqtt in","z":"fb73288b75d2f4a1","name":"Quad Scene A Pressed","topic":"tele/tasmo-zigb-1/1234/SENSOR","qos":"1","datatype":"json","broker":"e28b763a.77bd98","nl":false,"rap":true,"rh":0,"x":140,"y":280,"wires":[["209a8ca7bd7b49ea"]]},{"id":"0d1ff70e74705b11","type":"function","z":"fb73288b75d2f4a1","name":"Convert to Button Press Value","func":"\nif ( msg.payload.Power == \"0\" ){\n msg.payload = \"bottomleft\" ;\n return [ msg ];\n }\n \nif ( msg.payload.Power == \"1\" ){\n msg.payload = \"topleft\" ;\n return [ msg ];\n }\n\nif ( msg.payload.DimmerStepUp == \"51\" ){\n msg.payload = \"topright\" ;\n return [ msg ];\n }\n \nif ( msg.payload.DimmerStepDown == \"51\" ){\n msg.payload = \"bottomright\" ;\n return [ msg ];\n }\n \nif ( msg.payload.DimmerMove == \"0\" ){\n msg.payload = \"toprighthold\" ;\n return [ msg ];\n }\n \nif ( msg.payload.DimmerMove == \"1\" ){\n msg.payload = \"bottomrighthold\" ;\n return [ msg ];\n }","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":280,"wires":[["a352ed9bbe5a9293"]]},{"id":"f180aa2689ae2cbc","type":"mqtt in","z":"fb73288b75d2f4a1","name":"Quad Scene B Pressed","topic":"tele/tasmo-zigb-1/4321/SENSOR","qos":"1","datatype":"json","broker":"e28b763a.77bd98","nl":false,"rap":true,"rh":0,"x":140,"y":340,"wires":[["c92f31eaa08f9d9d"]]},{"id":"209a8ca7bd7b49ea","type":"function","z":"fb73288b75d2f4a1","name":"Remove irrelevant JSON values","func":"\nmsg.payload = msg.payload.ZbReceived.Moes_Quad_Scene ;\nreturn [ msg ];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":280,"wires":[["0d1ff70e74705b11"]]},{"id":"c92f31eaa08f9d9d","type":"function","z":"fb73288b75d2f4a1","name":"Remove irrelevant JSON values","func":"\nmsg.payload = msg.payload.ZbReceived.Moes_Quad_Scene_B ;\nreturn [ msg ];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":340,"wires":[["0d1ff70e74705b11"]]},{"id":"a352ed9bbe5a9293","type":"switch","z":"fb73288b75d2f4a1","name":"Action for each 6 options","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"topleft","vt":"str"},{"t":"eq","v":"topright","vt":"str"},{"t":"eq","v":"bottomleft","vt":"str"},{"t":"eq","v":"bottomright","vt":"str"},{"t":"eq","v":"toprighthold","vt":"str"},{"t":"eq","v":"bottomrighthold","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":950,"y":280,"wires":[[],[],[],[],[],[]]},{"id":"e28b763a.77bd98","type":"mqtt-broker","name":"MQTTBROKER","broker":"192.168.1.256","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]