Good home automation is about tailoring solutions to individual needs. This rings true for lights. A smart bulb might be the easiest option, but often far from perfect. In my previous article, I focused on wall switches, this time around I want to talk about reusing existing lights and wall switches thanks to a simple Zemismart Zigbee switch. What sets it apart from Sonoff Mini (review), Shelly 1 (review) and this unbranded one (review) – is the ZigBee protocol.
Going ZigBee – a smart move?
In case you didn’t get the memo, Apple and Google joined the ZigBee alliance, indicating the direction in which home automation will continue moving forward. For once, I’m glad as thanks to a unified protocol, mixing and matching hardware becomes easier. ZigBee protocol is still fragmented, but given enough time, a unified API should emerge and devices made by various brands would become more compatible with each other.
Zemismart seems to be ahead of that thinking. They sent me a couple of Zemismart Zigbee switches (ZW-EU-02) that are made for 2 gang lights and wall switches. While designed for the likes of SmartThings, compatible with Tuya ZigBee kit (review), these will fit very nicely into my ZigBee2MQTT enabled, NodeRED based, home automation server.
Enclosed in a plastic shell, Zemismart Zigbee switch is slightly bigger than Sonoff Mini, measuring 55x50x22mm. It requires Live & Neutral wire to work, therefore ceiling fitting would be a preferred place to mount it at. Wiring is straight forward, as long as you remember that switch connectors use 3.3V logic (don’t use mains) and they are listed in GND, S2, S1 order (left to right). The device is rated for 300W which isn’t enough to run a decent PC, but these switches are for lights and if you are packing more than 300W per gang, you have bigger problems!
Please be careful with these switches. The mains terminal screws are exposed and it’s possible to get an electric shock while handling these. I remedied this with a piece of electrical tape to cover up the screws, but only after I got shocked on a live stream.
The switch could use one more terminal for neutral wire, otherwise wago-styled clips must be used to connect all wires inside the ceiling fitting.
On the inside
A bit of digging inside reveals an EFR32 Gecko IC responsible for handing ZigBee signals. Unfortunately due to module design, I had to desolder the connectivity board to take a peek inside. Don’t recommend doing that, as pads are fragile. 11 Pins are exposed and additional 4 dev pads are present to talk to the chipset itself. EFR32 serves also as a router in ZigBee mesh so it’s a great device to expand the network even more. This is the same chip that had been used on Sonoff ZigBee Bridge (review), that had been recently hacked with Tasmota (hacking guide).
Tuya and eWeLink?
Fortunately, no hardware hacking is needed. Zemismart Zigbee switch pairs instantly (hold 2 buttons for 10 sec) with Tuya Zigbee hub (review), but what’s even more interesting, I was able to pair it with eWeLink and Sonoff ZigBee Bridge – I also know why! A 2 gang switch with ZigBee protocol will launch soon! Unfortunately, Zemismart Zigbee switch isn’t playing nice with Sonoff just yet!
Tuya
Tuya app works flawlessly and the switch indeed shows up correctly as a 2 gang wall switch. It’s responsive and it comes with all associated bells and whistles or the app. These bells include integrations with Google Assistant and Alexa ecosystems, timers and schedules and Tuya’s automation panel. Just rename the individual gangs so you can use these correctly with smart speakers.
Advanced options in the app allow to group individual gangs with other lights sources. It’s a great add on if you have more than 2 lights in the room. You can trigger selected lights with a physical switch rather than a scene.
Make it mine!
The next step was to connect Zemismart Zigbee switch with NodeRED running Zigbee2MQTT. This is where I run into the first snag. The switch was not supported by default. I had to refer to my writeup on how to add unsupported devices to Zigbee2MQTT. If you want to follow the process, take a look this live stream, or read the guide linked above and add the following device to your devices.js
file:
{
zigbeeModel: ['LXN59-2S7LX1.0'],
model: 'LXN59-2S7LX1.0',
vendor: 'BENEXMART',
description: '2 gang switch netural, 3.3V switch logic',
supports: 'ON/OFF, 2 GANG',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'left': 1, 'right': 2};
},
meta: {configureKey: 3, multiEndpoint: true},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
},
},
After sudo systemctl stop|start zigbee2mqtt
you will see the correct payloads flooding in. After listening to zigbee2mqtt/device_name
you will notice payload looking like this:
{"state_left":"OFF","linkquality":102,"state_right":"ON"}
Both gangs are listed as state_lx
– note this as to control the switch you will need to use the following command structure:
// get current state
topic: zigbee2mqtt/device_name/get
payload: {"state": ""}
//control relay 1 (ON)
topic: zigbee2mqtt/switch2/left/set
payload: {"state_left": "ON"}
//control relay l2 (OFF)
topic: zigbee2mqtt/switch2/right/set
payload: {"state_right": "OFF"}
That’s simple enough. If you want to link the switch with Alexa and Google Assistant, I would recommend you Alexa integration and Google Assistant integration articles. If you want to try the sample flow – use the JSON below. Just remember to edit your ZigBee2MQTT device!
Final thoughts
Other than the shockingly short shrouds around terminals, I don’t see any problems with Zemismart Zigbee switches. Secure the terminals to get extra assurance and you can bag yourself fairly inexpensive ZigBee switches. You can grab these on AliExpress for around $13-15. There isn’t much competition in this field just yet. I’m awaiting my Sonoff Mini ZigBee edition – I will be posting soon about it as well! Let me know what do you think about these in this Reddit thread.