The Confusing World of Zigbee featuring ZemiSmart

Of course – this could all be down to my age – but I find Zigbee in practice to be both exciting and confusing. I am currently supposed to be reviewing some devices from ZemoSmart.

Zemismart lamp ST64

So, the Zemismart company sent me one of their nice warm/cool E27 lamps (Model ST64) and a 6-way multi-purpose switch as well as a dual ZB-EU-02 switching module to the UK where I am temporarily working (some might call it playing). So, really, all I had to do was replicate my Spanish Raspberry Pi4 + Node-Red + Zigbee setup which you’ll find referred to elsewhere in this blog channel – several times.

The lamp and switches arrived this week gone – but the HUB (to talk to the Zigbee 3.0 lamp and switches) won’t be here unti December. Life is FAR too short, so I sat down and thought “I have everything here that I have in Spain except for the Zigbee setup” and decided to do a quick install of the popular and open-source Zigbee2MQTT software on my UK RPi4. Easy, yes?

Now bearing in mind that I use RPI-CLONE to get me out of a mess so I can tinker freely with the installation (which controls the house heating and lighting). I knew I’d brought my new Sonoff Zigbee 3.0 USB Dongle Plus with me to the UK, along with a USB extension lead, so that getting the RPi4 to talk to Zigbee devices should be a snap, right?

I should have know it was going to be a difficult couple of days when, after careful checking for mistakes, I put that Zigbee2MQTT link into my Chrome browser and it came back with an error box, can’t connect to this site. I tried another browser (Microsoft Edge) – different box, same error. I contacted a couple of friends on Discord and sent them the link – in both cases it worked. I switched my Vodafone broadband to my mobile phone hotspot, it worked – but I could not do home control that way as the address range is different).

I made a copy of the main Zigbee2MQTT page and left it in a browser window. The installation instructions are good but for one thing. They want you to press a link to install NODEJS on your computer before proceeding to the next step. It transpires that my months’ old Node-Red installation was using a NodeJS that is no longer supported. The short version to follow is that I did a manual update of Node-Red and am now fully up to date with NODEJS. The end result of that is that I was able to install Zigbee2MQTT.

There’s a default configuration on the web page which was JUST sufficiently wrong to stop my Sonoff dongle working. Thankfully I could VPN to my working installation overseas and grab the configuration file from that – almost identical – and that worked. I then discovered that my access difficulty with the Zigbee2MQTT site was Vodafone DNS-related. Now fixed.

SO, now, with my Sonoff dongle plugged into the RPi4 I could hook up the MQTT nodes and see it doing something. For those of you who might be in a similar sitiation, here is my Zigbee2MQTT configuration file.

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://localhost
  user: admin
  password: xxxxxxxxx
serial:
  port: /dev/ttyUSB0
  adapter: auto
advanced:
  rtscts: false
  log_level: info
  pan_id: 51966
  homeassistant_legacy_entity_attributes: false
  legacy_api: true
experimental:
  new_api: true
frontend:
  port: 9099
device_options:
  legacy: true
devices:
  '0x00158d00xxxxxxx':
    friendly_name: aqara-temp-02
  '0x54ef441xxxxxxxxx':
    friendly_name: tvoc
  '0xb4e3f9ffxxxxxxxx':
    friendly_name: zemismart-lamp
  '0x0c4314ffxxxxxxxx':
    friendly_name: zemismart-6-button
  '0x000d6ffffxxxxxxx':
    friendly_name: tradfree repeater
  '0xec1bbdfffxxxxxxx':
    friendly_name: tradfree switch

Clearly I’ve changed the password above to protect the innocent (me). Otherwise that is the exact file that sits in /opt/zigbee2mqtt/data/configuration.yaml

Tempting as it is to drop into Node-Red in a PC browser, I’m having a little issue there, too, thankfully to SOME extent, Zigbee2MQTT is self-sufficient thanks to a great web interface (see new_api above). I went to my RPi via my web browser on port 9099 (you could make that any spare port). Having the dongle confirm it’s existence is all very well but the point is to actually do some control and/or sensing of course. And with that, in the above mentioned web interface, I added some devices, firstly one I know works (a LOVELY Aqara temperature sensor).

What you see above is the browser-based Zigbee2MQTT Dashboard – see the devices called TVOC, AQARA-TEMP-01, ZEMISMART-6-BUTTON and ZEMISMART-LAMP (and more – I keep updating this and the zb-eu-02 switching unit is now added)

These devices apart from the bulb were added by holding in their respective buttons (one device at a time) while the Dashboard had “Permit JOIN” set. After a few seconds, each device magically appeared on the dashboard.

Is that it? Yes but then you need to DO something with them. The Zemismart-6-button device, when clicked, showed itself but said “not supported” (as did the now-removed Ikea switch) so that’s out until I get the Zemismart hub – but to be honest it was disappointing that it does not work with Zigbee2MQTT – which knows it exists but that’s about it. My multi-use Aquara wall buttons and other Aqara devices DO work with Zigbee2MQTT. Let’s turn to the Zemismart LAMP.

If I click on the lamp, then the EXPOSES tab – immediately it all becomes clear – the lamp is giving out info about itself, it’s state and what you can do to it – to turn it on or off (and monitor that state) and to define the brightness, colour temperature (cool to warm) (including the required state at power up -and more – enough to keep a person busy all night just learning but this would be a very long blog as I just discovered this moments ago. Suffice it to say that while the ZemiSmart light is not cheap, it is “typical 60w-equivalent lighting” (maybe a little lower but good for a desktop lamp) – they claim and completely controllable without having to use their “Hub”.

While I’m here, I’ve already covered my Aqara TVOC Air Quality unit and temperature sensor elsewhere so I won’t labour the point- but they worked immediately as did the lamp. Of course – none of these units had sensible names at first, just long IDs – that’s what Zigbee does. For example, a click on the ABOUT tab then EDIT button allowed me to permanently give the lamp a friendly name. All of this gets stored automatically in that configuration file I mentioned earlier which is now much longer than it was at first.

November 25, 2021 Update

Thanks to a comment by subscriber Ian Cleghorn and changing LEGACY_API to TRUE as above, The NR nodes now work correctly… I just have the Ikea switch and ZemiSmart 6-button multi-switch to sort as neither seems to work with Zigbee2MQTT – feel free to comment….

December 07, 2021 Update

The Zemismart multi-switch ZM-S06-ZM simply will not work with Zigbee2MQTT and I can do nothing now until the ZemiSmart Gateway arrives which it should do this month. Meanwhile a week ago a massive storm here in the UK took out the power in many areas including our own for days – in our case causing multiple spikes as it went down.

It is entirely possible that this did damage to the above Zemismart lamp – as despite originally looking like a winner, it will not not PAIR with any gateway (no flashing light) and is reduced to a simple warm white light with no control. More when I get a replacement. To be fair here, I’ve had several Zigbee Smart bulbs (not Zemismart) over the last couple of years end up in the same state – no way to get them back into setup mode. I’m sitting in front of two right now which make very pretty blue lights and that’s it.

Finally I’ll cover the Zemismart ZB-EU-02 dual output switching unit complete with two buttons and a DIN rail mount on the back (as show in the photo on the right) – not a lot to say but that it works with Zigbee2MQTT (and my Zonoff Zigbee dongle) no problem – the buttons on the top have indicators behind them and though I’d not want to see the “buttons” get damp – seem otherwise perfectly safe.

As well as mains in and out, the unit also has an (optionally used) 3-wire connector for using a “real” switch in parallel with the control. Handy size for fitting in an existing wall box, no doubt. Here’s the Zemismart link for this, mine came from Amazon (described as a Yagusmart device). The neutral wire is optional according to the ad and the unit itself. I just tested this with a 4w LED lamp – and yes, the Neutral is in fact NOT needed. I suggest for your safety if you try this (see photo below) – you do a much more professional job of test-wiring than I’ve done here…. but it works.

Zigbee Neutral-free dual switching unit from Zemismart

The whole thing feels substancial. I’ve seen attempts at neutral-free switching in the past which failed miserably with low-current lamps. This works. Note that this unit is intended for use inside an enclosure of some kind – don’t leave running where kids could get their fingers on it.

On the ZB-EU-02 unit, pressing the buttons alternate the outputs on and off, by default the optional 3 wire-connector appears to operate similarly – toggling the output on and off with successive connect-release.

Facebooktwitterpinterestlinkedin

6 thoughts on “The Confusing World of Zigbee featuring ZemiSmart

  1. Thanks for that, Mike. Zemismart buttons are a problem and clearly Aqara hub/camera.. but the Aqara buttons work well with Zigbee2MQTT, now if I could just figure out why Zigbee2MQTT will not play ball with the NR nodes in my UK install… I can feel a trip to IKEA coming on

    1. Hi Peter
      had a similar problem to you in that my Node red zigbee2mqtt would not see any devices, found a solution at
      https://github.com/andreypopov/node-red-contrib-zigbee2mqtt/issues/43

      spidgrou commented on Aug 8 •
      Hi,
      I found a solution.

      In the /opt/zigbee2mqtt/data/configuration.yaml, add the line:
      legacy_api: true

      Then stop and restart zigbee2mqtt.
      For me it works.

      Max

      this goes in the [Advanced] section. I can confirm this works on my installation.

      1. Hi Ian

        Today, you are my HERO…. it worked exactly as described – I looked at the config file – for any newbies looking it – here.

        nano /opt/zigbee2mqtt/data/configuration.yaml

        There was already a line:

        legacy_api:false

        I changed the value to true and did a quick reboot.

        On problem down, two to go. Any thoughts as to why the Ikea Tradfre lamp and USB repeater work but the ikea switch “part E1743” is unsupported?

        More importantly and the reason I didn’t just go to the zigbee2mqtt.io site and take a look.. until recently I’ve been doing all this Zigbee stuff in Spain – no problem – I came to the UK to my Vodafone fibre connection – and it WILL NOT let me connect to zigbee2mqtt.io

        If I disable my Ethernet and enable WIFI on my PC – and use my mobile phone WiFi tethering for the PC, I can get to zigbee2mqtt.io no problem – but of course not to my local network.

        I’m all ears, Ian – or anyone else… and no I don’t have any kind of parental control on my (1 year old) Vodafone router.. and yes I’m sending an email off to Vodafone right now…. but please do fire comments in – all welcome.

        1. A possibility is that Vodafone have blocked access to zigbee2mqtt.io by mistake (wrongly-implemented court order, etc). Such blocking is usually done by DNS and is easily circumvented by setting DNS on the Ethernet adapter to a public server such as 8.8.8.8 or by adding an entry to the PC’c hosts file such as “185.199.108.153 http://www.zigbee2mqtt.io“.

          1. Mike- you are in fact RIGHT – I tried the fixed address first – that worked – then I revoked that and tried 8.8.8.8 and 8.8.4.4 in the router – that ALSO worked (works). I’ve also repotred this back to Vodafone as I still seem to have a direct contact there aftr a series of (now resolved thanks to
            a friendly Openreach engineer) problems last month.

            It’s getting better, just a couple of awkward Zigbee devices (one of which – Ikea switch – SHOULD work), to resolve. My thanks to both you and Ian.

  2. As an alternative to the Zemismart and Aqara buttons, you may like to look at the Ikea Tradfri shortcut button and their Styrbar remote control. These are cheap (£6 and £7.50 respectively), portable, work perfectly with zigbee2mqtt and have a long battery life.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

The maximum upload file size: 512 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here