Sorting by

×
zorruno wikki: Notes for Moes Zigbee Scene Switch

Notes for Moes Zigbee Scene Switch


Summary

-- A 1,2,3 or 4 button zigbee Scene switch
-- Comes in White, Black and (Harder to get) grey. I wanted grey ones to blend in to the cabinet location.
-- Link from Aliexpress https://www.aliexpress.com/item/1005002220416879.html
-- Cost each for the 4 gang was around $25 each including freight, 4 week delivery (e-packet)
-- They take CR2430 button cell batteries that should last over a year or maybe two. These aren't that common though (I got mine from Jaycar), but a 2032 will apparently fit ok if needed.
-- 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 connected via a Sonoff zigbee bridge flashed with Tasmota (Zigbee)
-- 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.

Notes

-- 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.
-- With the tasmota setup, I could get single presses from each, and a hold from the right hand switches (no double presses)
-- 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.
-- It has been noted that there are some delay quirks with these... occasionally it won't recognise a press if another press has been received a few seconds before. This hasn't really been a problem for my setup (basic light control and a a couple of script actions - all have feedback)

Photos

Moes Scene Switch
Moes Scene Switch Mounted

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

MQTT JSON results from the sonoff Bridge

Where Zigbee name has been changed to "Moes_Quad_Scene"
And the ID of this device is 0x1234
Topic in MQTT will be something like "tele/tasmota_zigbee_bridge_1/1234/SENSOR/"
where the 1234 is the device ID

Remember with the zigbee bridge, in the console you can change the name to the friendly name thus:
ZbName 0x1234,Moes_Quad_Scene


Top Left Button Pressed
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			"0006!01":"", 
			"Power":1,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


Bottom Left Button Pressed
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			"0006!00":"", 
			"Power":0,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


Top Right Button Pressed
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			"0008!02":"00330A00", 
			"DimmerStepUp":51,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


Bottom Right Button Pressed
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			"0008!02":"01330A00", 
			"DimmerStepDown":51,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


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.)
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			"0008!01":"0033", 
			"DimmerMove":0,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


Bottom Right Button Held
{"ZbReceived":{
	   "Moes_Quad_Scene"{ 
			"Device":"0x1234",
			"Name":"Moes_Quad_Scene",
			""0008!01":"0133", 
			"DimmerMove":1,
			"Endpoint":1,
			"LinkQuality":42}
	   }
}


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.
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":""}]



Last edited by ZorrUno
Sun, 10 Oct 2021 03:04 UTC [diff]


CategoryHomeAutomation
CategoryMQTT
CategoryNodeRed
CategoryZigbee