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.

So, the Zemismart company sent me one of their nice warm/cool E27 lamps and a nice 6-way switch 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 switch arrived this week gone – but the HUB (to talk to the Zigbee 3.0 lamp and switch) 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 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 Zigbeen devices should be a snap, right?

I should have know it was going to be a difficult couple of days when, after careful cgecking 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 can’t 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 is 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 works.

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 eact 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)

These 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, shows itself but says “not supported” (as does the 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. let’s turn to the Zemismart LAMP. My multi-use Aquara wall buttons DO work with Zigbee2MQTT.

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.

As off Nov 25, 2021 (when I found my IKEA repeater and added that – not relevant but handy) – 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 multi-switch to sort – feel free to comment….

Facebooktwitterpinterestlinkedin

6 thoughts on “The Confusing World of Zigbee featuring ZemiSmart

  1. 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.

  2. 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.

Leave a Reply

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

Leave the field below empty!

This site uses Akismet to reduce spam. Learn how your comment data is processed.