Another Itead Sonoff and Week now with Zigbee

Sonoff Zigbee

Early June 2020 I received my long-awaited Sonoff Zigbee bridge along with Itead‘s pre-programmed Zigbee CC2531 USB dongle which means I am starting to write about low-power-consumption Zigbee devices including some from ZemiSmart. This update July 6, 2020 mentions the experimental Tasmota template for the Sonoff Zigbee Bridge.

Sonoff Zigbee Bridge and the Itead pre-programmed dongle

First things first, the Sonoff Zigbee Bridge has both WiFi and Zigbee LEDs, a pairing recessed button and a microUSB connector. Other than that, it’s plain white and similar in shape like the black Sonoff RF Bridge (both run over WiFi).

Tasmotizing the The Sonoff Zigbee Bridge is still experimental apparently (https://templates.blakadder.com/sonoff_ZBBridge.html) so it looks like I’ll mainly be using the little dongle with my Raspberry Pi 4 – but I had a good play with the unmodified Bridge and the eWeLink software first. I should also take this opportunity to thank Zemismart as they sent me their somewhat larger Zemismart Zigbee Bridge which uses a hardwired Ethernet connection whereas the Sonoff product is WiFi based. Both require their own APP and of course, the cloud (at least for now – so read on.

Step 1: Turn on the new Sonoff Zigbee bridge, turn on the eWeLink APP on the phone – remind the APP when requested of the WiFi password – seconds later – done – THAT’S it, no button pushing, nothing. The APP gave my Zigbee Bridge a really dumb default name – quickly fixed – I called it “Zigbee Bridge” just to be original.

Note the reference to “child devices” above.

Sonoff Zigbee

Step 2: Plug the Zigbee DIY Smart Switch controller into the mains – it’s blue light flashes…. back to the eWeLink APP, that Bridge rectangle above left, touch that – ADD… found a device….”device00042 is OFF”. SO easy – again no button pressing – but I don’t want the default name… right “zigbasic” it is. I like it.

After touching ON on the eWeLink APP, my new “zigbasic” now has a RED light as well as the BLUE light. No change on the bridge which just has it’s blue light on. If I manually press the on-of toggle on the BASIC, still no change on the bridge – but everything works – WELL – THAT was easy. As an aside, I hope Zigbee proves to have good range otherwise I’ll need lots of bridges…. some mains-powered devices can act as repeaters – I’ve not ACTUALLY seen that behaviour yet.

I found a tiny flaw already. With the APP focussed on my new device – ON, I disconnected the device from mains power – then reconnected. The device worked – I could turn it OFF then ON again from the APP – but the APP blue ON/OFF power state indicator remained ON throughout. I backed out of that page to the BRIDGE page and repeated the operation, all was and is now well. But that needs fixing in the eWeLink APP. To test the range, I unplugged the device, plugged it in elsewhere, still within good range – same visual issue until I backed out of the device page. I’ve reported this back to Itead already.

MORE: Don’t anyone ever say I don’t check stuff out properly. I took my new Zigbee DIY into the hallway (a stone wall and an internal wall away) and all was fine, turned it on and off, no problem. I then took it into the living room (2 more open doors) and by now, no blue light, nothing lit up on the device, YET the APP thought it was turning the device on and off – the button on the APP responding to touches no problem – this takes me back to last century and X10 mains control with no feedback. Something else to ponder. If I leave something on, I need to be able to check it’s state. At this point a Tasmota-equipped WiFi device would have (after a delay) changed over to a secondary access point and be responding.

As an aside: I also have one of Itead’s 4-button (433Mhz, not Zigbee) keychains – you will see in the top photo that the latter looks just like many others out there. I’ve not had a chance to test it properly yet but the code looks a little different to the similar-looking devices you see at AliExpress.

Sonoff Zigbee

Right now I have the Sonoff Zigbee DIY Smart Switch (yes, it deliberately DOES look just like a Sonoff Basic R3) but soon I expect soon to get four more new Itead products – the SNZB-01, SNZB-02, SNZB-03 and SNZB-04. Here is more info:

  • SNZB-01 Zigbee wireless switch
    • Touch button with single, double press and long press support
    • Battery – 3V (CR2450)
    • Dimensions – 43x43x16mm
  • SNZB-02 Zigbee temperature & humidity sensor
    • Unnamed temperature and humidity sensor
    • Battery – 3V (CR2450)
    • Dimensions – 43x43x14mm
  • SNZB-03 Zigbee motion sensor
    • Built-in PIR sensor with 6m range and 110°viewing angle.
    • Battery – 3V (CR2450)
    • Dimensions – 35x39x28mm
  • SNZB-04 Zigbee wireless door/window sensor
    • Magnet + sensor
    • Battery – 3V (CR2450)
    • Dimensions
      • Magnet – 32×15.6x13mm
      • Sensor – 47x27x13.5mm

Itead Zigbee CC2531 USB Dongle

Of course these devices will run using the company’s eWeLink App for IOS and Android but being me you can expect I’ll be doing my best to get everything integrated into Node-Red and NOT on the cloud and to that extent I then took, rather than the Bridge, the Itead custom pre-programmed Zigbee CC2531 USB dongle and plugged it into a Raspberry Pi4 USB(2) socket and grabbed the freely downloadable https://www.zigbee2mqtt.io/ software (which also handles a SHEDLOAD of Zigbee devices). If you read my blog entry on the Instar cameras, the name Mike Polinowski might ring a bell. I’ve since kept in touch with Mike and he’s into Zigbee – this is useful reading… https://mpolinowski.github.io/zigbee-sensors-in-fhem

Anyway, I reset the Sonoff Zigbee DIY (referred herein as the basic-zbr3) and it worked quite readily with the USB dongle. At that point, a pair of Smart RGBW bulbs turned up from Zemismart and I added them into the mix. Lovely and so easy to set up without any cloud. I’ve yet to succeed with the Zigbee meshing ability or integrate Alexa with these products – but I’ll likely give that it’s own blog entry where I’ll also do justice to other Zemismart Zigbee products..

As for timescales for the four new Sonoff sensors – due to the pandemic that is really anyone’s guess right now but I’m hopeful they will arrive soon.

As you might expect from Itead, these sensor products will be very sensibly priced – more when I get devices in my hands. Check in from time to time as I will be updating the blog as always.

Unfotunately, the Zemismart touch wall switch does not seem reliable on a 5w LED (this is the British version of the wall switch with no neutral). The Zemismart bulbs, are bright and were easy to pair the first time. As they don’t have any buttons, five off-on cycles is supposed to reset them, that didn’t work every time for me, but a random number of on-off cycles in quick succession soon brought them into flashing mode and soon after they were all paired up. Re-pairing them proved impossible however after the first time.

At some point as this subject expands, I’ll need to split this blog into two because (for several reasons) I’m learning more by the minute on the subject of Zigbee – and I trust that interested tech readers will soon contribute to that knowledge. So, firstly, helpful subscriber steve Lenehan just put me onto the Ikea Tradfri repeater as (apparently) a reliable repeater at a reasonable price – and so I bought one. Meanwhile I went off on a tangent and watched Paul Hibbert’s video on the subject of Ikea and their Tradfri Zigbee Gateway – which did not impress him very much. SO, more feedback guys please.

Facebooktwitterpinterestlinkedin

23 thoughts on “Another Itead Sonoff and Week now with Zigbee

  1. The mesh structure of ZigBee networks can be capricious with devices pairing with repeaters some distance away rather than the one next to them. If you do need a dedicated repeater then the IKEA tradfri repeater (£7 approx) works well connects to a mains socket and includes a usb power connection although all the tradfri bulbs also act as repeaters ( if you can stop people physically switching them off –
    Sonoff mini helps). https://flows.nodered.org/node/node-red-contrib-zigbee2mqtt will listen to zigbee2mqttt networks and draw a routing diagram if required.

    1. Thanks so much for that Steve – I was completely unaware of the Ikea product – now all I have to do is convince my wife to brave the queues to get into the store.

      The only Tradfri item including “repeater” I can see on the Ikea web page is the “Signal repeater Article no.: 804.242.55” for £8 – price is near enough. Did I miss something or do they go out of their way to NOT mention Zigbee?

      Well, I need a definite repeater so I’ll take the trip but looking at the rest of their wireless stuff, I may well be sticking with “direct from China”… I normally trust Ikea pricing but it looks like they may have jumped on the same bandwagon of other UK suppliers.

      1. As for people physically switching things off – that IS an issue for all home automation. That’s why superglue is an essential part of the home automation kit (which leads us to why you should never buy Poundstretcher LED lights 🙂

        After your insight I went off to watch Paul Hibbert’s video about the Ikea Gateway – actually worth watching. https://www.youtube.com/watch?v=rr1Bd1zaDTw

        1. In fairness the ikea app and gateway have improved a little since then but the pairing process is idiosyncratic to say the least. I have kept all the lights on the ikea hub because that way they automatically get firmware upgrades which zigbee2mqtt cannot handle. Everything else (mostly Xiaomi – well built but so small I keep losing them) is on a CC2531 controller running zigbee2mqtt and seem to have a decent range and mqtt looks after tying the two together.

          1. I’m still trying to get my head around that dongle+Zigbee2MQTT combo and Alexa. My Tasmota-converted bulbs and switches all talk to Alexa but I’ve no idea yet what happens to Zigbee bulbs using the dongle when it comes to Alexa. Go on – enlighten me. Or do I then have to make pretend devices in Node-Red-Contrib-Amazon-Echo to get Alexa talking to the bulbs…. this could become a full time job.

            1. My bulbs are all on the Tradfri hub so the Alexa integration is handled by the Ikea app that is Alexa enabled. All my other devices are sensors so only send data. I did have the bulbs on zigbee2mqtt at one time and I used Home Asssitant Cloud to integrate the bulbs with Alexa. However that is a chargeable service ($5 a month I believe)

              I haven’t tried to control lights but the Event node in https://github.com/586837r/node-red-contrib-alexa-remote2 allows you to monitor all traffic detected by Alexa using option “Device Activity” and then parse the payload for device name and setting requested. You can then monitor the mqtt response from the bulb and have Alexa announce that the command succeeded using the Custom option in the Alexa Routine node.

            1. Having fun with Ikea – tried to order the Tradfri gateway and a couple of lampholders on the website – only optio is pickup “at your nearest store – “Belfast” – even the Chinese don’t get it that wrong.. I’m in the Northeast of England – not exactly “pop-in” distance for Ikea Belfast.

        1. I think you are “bang on the nail” there about Zigbee, sadly, Steve.

          I watched a couple of ladies talking in Tescos not that long ago (just before the Covid restrictions) – one said to the other “oh, I don’t like LED lighting, looks cold to me”. I nearly collapsed on the spot – LED lighting has absolutely no need to look cold – but so many manufacturers insist on ONLY specifying the Kelvin temperature – which means even less to the average householder than degrees C does in many US households or degrees F does in modern-day Britain. At least in the case of the latter two, we’ve all used them at one point or another.

          Until I got into LED lighting and writing my own code “colour temperature” code, K didn’t mean too much to me (outside of things like absolute zero) and I’m a techie. Today thankfully more and more LED lighting companies use phrases like “warm” and “cold” – and if people don’t know that this means “yellow-ish” and “blue-ish” then perhaps they should end it all 🙂

          Anyway, more good info – thanks.

    2. Alright Steve, now I have your educational interest perked, you mention node-red-contrib-zigbee2mqtt – for reasons beyond me I can’t get that diagram… in the UI – “Show Network Map” produces a white page. Everything else seems to work. Any idea?

  2. I have been running zigbee2mqtt for a few months now with mainly success. I tried successfully to install it on the same RPI4 as my Script software (thanks). Not sure why but I encountered some cross-talk between the different software installations that made pairing devices really difficult (the Ikea bulbs are the most difficult to pair). I now run zigbee2mqtt on a separate RPI4 with good results.
    I would recommend Z2M Admin which is a great node-red flow for tracking pairing, status and the mesh network connection strengths. I haven’t used any zigbee plugs but the sonoffz works well. My sensors are mainly from Xioami and the PIR sensor from Ikea. I wanted to set up an outdoor switch and bought the Osram outdoor switch. The weatherproofing is great but the range is terrible.

    1. Thanks for that, Brian – heplful. I am also running it on a separate machine though I id put Node-Red and MQTT (via The Script”) on there but I’m not attempting to do a whole lot of other stuff at the samme time. I installed Z2M but for reasons beyond me, on the Z2M admin page (in Node-Red ui) I get nothing for “show network map” – did it work for you?

      Could be a reinstall or maybe I missed something obvious?

      See my sepatate blog detailing the issues I’m (hopefully just initially) having with the Sonoff dongle and the Zigbee2MQTT setup getting SOME telemetry back from Zemismart devices. Any feedback you (or anyone else) want(s) to add there would be most appreciated. https://tech.scargill.net/more-zigbee-learning-or-not/

      Also, links for any inexpensive sensors or other devices (not curtain controllers, I’ve no accessible curtains) that in your experience work perfectly would be most helpful. I’ve successfully avoided Zigbee up until now and it shows. See the other blog entry and matching short video to see what I’m struggling with.

      1. Further thoughts-
        I had to install a missing node for Z2M Admin (can’t remember which one but straightforward).
        Did you click on the refresh button before requesting the map?
        I had to reboot after every pairing event. Not sure if it can deal with batches of pairings.
        The configure.yaml file is very strict regarding alignment of text.
        I really like having my sensors working off batteries. I have redeemed numerous three pin sockets running 5 volt supplies for esp8266 boards to collect sensor data. In addition I have freed up numerous ip addresses on my router.

        1. Hi Brian – sorry for the delay – it’s been a Microsoft updating day – 5 machines in a row needing accumulative updayes before accepting the current on – then my doorbell went flat, now my watch. I DID hit refresh befor requesting the map – absolutely nothing happens when I request the map -I can see a z2m reinstall coming on… I had to add a missing dashboard node, yes, the author has made one too many assumptions there. I didn’t know about alignment issues on the yaml file as I’m utterly new to yaml. I only recently got to grips with spacing issues on Python (cracked that now). Any further ideas keep em coming and I’ll feedback in here once I’m caught up.

          1. Not sure if it was necessary but as I paired each device I checked the configuration yaml file, created a friendly name then saved and rebooted the RPI.
            The alignment of my mqtt username and password were important. The reboot seemed to be necessary.
            Have you had a look at the journal file which gives you real time confirmation of the paired devices –
            sudo journalctl -u zigbee2mqtt.service -f

            1. I’ll follow this up later Brian – the broadband here in Northumberland is utterly unacceptable today – failing constantly. I get part way through replies and it fails. Hold those thoughts.

  3. Hi peter , love the blog

    Ive recently fitted some basic sonoff inline switches to some table lamps , they are all within a few metres of the WiFi router.

    I find they constantly go to sleep and drop the WiFi connection such that Alexa struggles to connect to them. I’ve read there’s a fundamental issue with the ESP8266 stack , that leads to this issue.

    While it’s my intention to use HA and hence flash the devices , right now I’m concerned that this issue will also exist when they are flashed

    Any comments.

    1. Hi Dave, not sure where you got that from – I’ve been using ESP8266 for years and also Tasmota and Sonoffs – and never run into that problem. Alexa is in charge of my office sockets and lighting as well as bedroom and kitchen – several other sockets and lights as well as garden lights are on BigTimers in Node-Red, mostly running Tasmota – a few running my own ESP8266 software, ESP-GO and a couple using Espurna – none have the issue you describe.

      1. Well that’s dammed strange , these are running the latest sonoff firmware and randomly throughout the day one of the four devices drops off the Wi-Fi , ( you can see this on the eWeLink app also. Alexa can’t contact them, the sonoff green light starts flashing , then it goes solid again when the device reconnects and also Alexa regains control.

        I’m seeing the behaviour across several different sonoff devices , I’ve tried three Wi-Fi routers including currently a dedicated B/G router running openwrt

        Hard to know what’s next

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.