How to use the Sonoff Zigbee Bridge with Home Assistant



UPDATE 2020/08/09: As of HomeAssistant 0.113 you can now use the latest Zigbee OTA file.  

I reviewed the Sonoff Zigbee Bridge a few months ago in a video and was excited to see it had an ESP82xx chipset onboard.  This meant there was a glimmer of hope it could be flashed with open source local control firmware such as Tasmota!  That time has come!  The genius developers with Tasmota have done their magic again.  An inexpensive device you can add to Home Assistant as a Zigbee controller.  No YAML, no custom plugins, no MQTT.  One of the major advantages is being able to place it closer to your Zigbee devices which is especially helpful if you have your Home Assistant box in the basement or buried back in some closet.  Behold the ZHA Integration below.

Purchase Sonoff Zigbee Bridge from Banggood or iTead


So how do we flash this?  First and foremost, there's NO soldering; don't close the window just yet!  It's relatively easy to do.  This is a full step by step walk through, some of the Tasmota veterans can skip many of the steps such as adding Tasmota to your WiFi network. 

During this process we will need a few pieces of software and files to flash things.  We are using Windows 10 during this process, feel free to grab the alternative versions if you are using Linux, Mac, etc.  

Tasmotizer - Downloads the firmware and flashes the Bridge.  Some users have reported Tasmotizer does not work on their setup, as an alternative you can use NodeMCU Py-Flasher and manually download the tasmota-zbbridge.bin, please make sure you use the DOUT flashing method with this app. 


Home Assistant 0.113 or later use ncp-uart-sw_6.7.6_115200.ota Use the "Download" button on GitHub.  Do not right click and save as! This could will result in a HTML file being downloaded instead of the actual file.

For Home Assistant users not using 0.113 ncp-uart-sw_6.5.5_115200.ota Use the "Download" button on GitHub.  Do not right click and save as! This could will result in a HTML file being downloaded instead of the actual file.

Flip the Zigbee Bridge over and open it, there are four small Phillips screws on the bottom under the feet pads.  There are no wires or anything, just a simple PCB in a case.  Turn over the board and you'll notice they labeled all the via holes for us.  


For ease of flashing I use typical breadboard jumpers inserted into female to female dupont jumpers attached to the USB TTL adapter.  Please remember to set your USB TTL adapter to 3v3 and NOT 5v.   


Attach your jumpers from the Zigbee bridge to the USB TTL (Amazon) or CH340G or (Aliexpress) as follows;

ETX to RX   (Note the RX to TX and TX to RX)
ERX to TX
3V3 to 3V3
GND to GND
IO0(GPIO Zero) to GND


Example USB TTL


Plug in the USB TTL to your computer and open Tasmotizer.  In the odd case of your antivirus notifying you, it's a false positive.  Choose your com port for the USB TTL flasher.  Select the Release radio button and choose tasmota-zbbridge.bin as shown below.


Press Tasmotize! and it should start the flashing process.  If not check your connections and COM port and try again.  

Once the flashing is complete, unplug the USB TTL flasher, remove the wires from the Zigbee bridge, and power it back up via the normal USB power connector.  You can also put it back in the case if needed. 

Using your phone or computer, scan for available access points and look for a Tasmota-xxxx WiFi access point.


Connect to the AP and browse to 192.168.4.1 


Click "Scan for wifi networks".  Select your network, enter the AP1 Password, select the check box next to it to verify you typed it correctly, then hit Save.  The bridge will reboot and attach to your WiFi network.  You will need to consult your router/dhcp server to determine the IP address of the new device.  Browse to this new IP address.


Click Console and paste in the following command on one line and hit enter:

Backlog Weblog 3; so65 1; Module 75


Tasmota will restart after a few seconds, once the reboot is complete, click Main Menu.


To verify the process flashes, it is recommended to open a second window with the Tasmota Console on it and use another window to flash the Zigbee chipset firmware. Click Firmware Upgrade, in the "Upgrade by file upload" box use the browse button and select the ncp-uart-sw_6.5.5_115200.ota file downloaded previously. 


Press Start upgrade.  This will instruct Tasmota to flash the Zigbee chipset on the bridge that is necessary to integrate with the Zigbee Home Assistant integration.


The file will be flashing in the background.  Do not restart or power cycle the device!  You can click Main Menu, then click Console to see the process. Note the XMD: commands, as Tasmota is pushing the OTA file via Xmodem to the Zigbee chipset automatically for you.  

If you do not see this XMD: Successful message do not continue on past this point as the ZHA process will not work.  Try pushing the OTA file upload through the above process again.  Please verify there are no wires attached to the RX/TX pins and the bridge is powered through the bridge USB port with a proper USB cable and power supply.


Once the process is complete Tasmota will reboot and attempt to start Tasmota Zigbee.  You may see the error message below.  This is not an issue.


Issue the following command on the console to map the Zigbee chip to TCP Server Port 8888:

backlog rule1 on system#boot do TCPStart 8888 endon ; rule1 1 ; template {"NAME":"Sonoff ZHABridge","GPIO":[56,208,0,209,59,58,0,0,0,0,0,0,17],"FLAG":0,"BASE":18} ; module 0

Once the console reboots you should see the server has started on Port 8888:

17:35:58 TCP: Starting TCP server on port 8888
17:35:58 RSL: stat/tasmota_7FC5B0/RESULT = {"TCPStart":"Done"}

We are done with Tasmota!  Let's jump into Home Assistant.  

Go to Configuration, Integrations, hit the Plus to add a new integration.  Select Zigbee Home Automation.


Choose "Enter Manually" and hit Submit.


Radio Type is EZSP


Enter socket://<your bridge IP>:8888 and use 115200 for the port speed.  Hit submit.


Give it a few seconds to query the device and you should see the following screen.


Congratulations!  You did it!  Hit Finish.  You should now have a Zigbee integration in Home Assistant.  Click Configure.


Hit the Plus and start pairing your various Zigbee devices.  




You are all done! Add all your various Zigbee device types and enjoy! We will continue to update this guide as things get shorter with the process to flash the device.  Be sure to stop in, read the process of the reverse engineering this device and thank the developers of Tasmota.  

Be sure to check us out on YouTube and Discord if you have any questions.  

Sonoff Zigbee Products


Links to products provided by the ShareASale and Amazon Affiliate program.

Comments

  1. Very nice.
    After the flashing can this bridge be used with any Zigbee devices?

    I'm using Zigbee2MQTT with a CC2531 and wondering if it's worth it to change.

    ReplyDelete
    Replies
    1. I don't have a massive amount of devices but I had no issues pairing various brands from Gledopto LED strips, Sengled bulbs, Tuya Zigbee sensors, Sonoff Zigbee devices. Seems to act like my normal USB Zigbee stick I used.

      Delete
  2. Hello,

    I guess this is coordinator firmware and not router firmware, so this means you can have only one in the zigbee network?

    Regards.

    ReplyDelete
  3. Great news .... thanks. I have a unit on order now and will get back to you as soon as I've got it and flashed it.

    ReplyDelete
  4. Thanks a lot. Works great. Just a few clicks and I am up and running. Still keeping both the CC2531 via zigbee2mqtt and now this Sonoff ZigBee Bridge - will see which one works better. But so far I'm loving it :)
    Any idea how to show the ZigBee network map? Something similar to the Zigbee2MqttAssistant?
    Many thanks one more time.

    ReplyDelete
  5. Is it possible to replace the CC2531 with this bridge, but keep on using zigbee2mqtt?

    ReplyDelete
    Replies
    1. Don't think so, unless you can flash this bridge with the zigbee2mqtt firmware which I don't think you can at the moment.
      You can check here the supported adapters https://www.zigbee2mqtt.io/information/supported_adapters.html

      Delete
  6. I had error when I setting serial device path "Unable to connect to ZHA device."

    ReplyDelete
    Replies
    1. The bridge needs to be running and have a network path from your HA install to the Bridge on port 8888.

      Delete
    2. Mark, I have the same problem despite all steps in the set-up working perfectly and the bridge being on the network. I'm guessing that the issue might be that my HA is on a VM, but I'll have to do some more digging.

      Delete
    3. You might be the one that I helped on Discord?

      Delete
    4. I'm having the same issue - using HA in Proxmox. ZHA can not connect. Is there a solution?

      Delete
    5. The previous issue I saw with someone was the OTA firmware had to be redone. Otherwise it works great with any system as you don't have USB ports and serial ports to pass into containers and VMs. Can you ping it from proxmox?

      Delete
    6. Yes, I can ping the Bridge from the Proxmox OS. I have factory reset the device and followed the process 3 times now, same result.

      Delete
    7. I can also ping it from the HA VM.

      Delete
    8. Can you attach to via putty and send data to port 8888 and see it on the Tasmota console? It might be easier to jump into discord to go through a few steps to see where it is blocked or not working. https://discord.gg/bNtTF2v

      Delete
    9. I'm stuck with the same issue as the others above. I tried reflashing the ncp-uart firmware but I get an error Upload Failed

      Magic byte is not 0xE9

      Has anybody been able to solve this?

      Delete
    10. Just Enter (maybe again) on console: Backlog Weblog 3; so65 1; Module 75
      In my case, I had to do it again to be able to flash OTA EZSP.

      Delete
    11. Right if you are getting the magic byte then then the Bridge is not using the Zigbee Bridge module.

      Delete
    12. I'm seeing this "Magic byte is not 0xE9" too. The problem appears to be that 8.4.0 does not have module 75 in it, so it cannot set it and defaults to 0.

      Delete
    13. Update: reflashed with the tasmota-zbbridge.bin build and that seems to work as expected. It's a dedicated binary over at https://tasmota.github.io/docs/

      Delete
    14. Indeed that is it. I did state that above and have it selected in the screenshot. "Select the Release radio button and choose tasmota-zbbridge.bin as shown below."

      Delete
    15. Yes, yes, you did didn't you... lol. I had no idea you can select and image there, I just thought it was the "latest release". Sorry, my first time using it. At least I was successful in the end.

      Delete
    16. Not a problem, glad you got it figured out though! A couple little special reasons I did the video walkthrough of it to make sure a few things were done that I saw some folks ran into.

      Delete
  7. Hi!
    I'm having issues with this:
    I'm getting this error after the "Backlog Weblog 3; so65 1; Module 75" and after the firmware upgrade:
    01:50:16 ZIG: Resetting EZSP device
    01:50:21 ZIG: timeout, goto label 99
    And then ofc doesn't connect to HA
    Any help maybe?

    ReplyDelete
    Replies
    1. If you are getting an error that early. I would definitely make sure you have the zbbridge.bin file flashed.

      Delete
    2. Yeah, the Sonoff ZbBridge Module bin file is installed.
      How can I test the EZSP?

      Delete
    3. I think the zigbee died...
      Anything I can try?

      Delete
    4. Did you flash the .ota file? Did it show XMD: Successful on the console? Discord might be easier to help troubleshoot the issue. https://discord.gg/bNtTF2v

      Delete
    5. Yes, I posted under issues.
      No, it doesn't flash the ota.
      We'll continue in discord.

      Delete
    6. If you aren't seeing the XMD: Successful when sending over the OTA file I'd start back from the beginning of the console stuff in Tasmota and push the OTA file over again then. See you in discord.

      Delete
  8. You can chat with sonoff and find out the status of the devices via the socket via PHP or python, right?

    ReplyDelete
    Replies
    1. This replaces any messy cloud usage.

      Delete
    2. I need my raspberry pi to talk to the sonoff zigbee bridge, is that possible?
      I don't have a Home Assistant.

      Delete
    3. Yes. Flash the other ota file and use the Zigbee Tasmota setup and it is standalone and use MQTT back and forth.

      Delete
  9. OK now i am to end, but after add ZHA intégration, i can't find the + button :(

    ReplyDelete
    Replies
    1. Another one is go to the zigbee coordinator and click add devices there.

      Delete
    2. Hi and thanks for this. Same for me I don't have the plus button even not under zigbee coordinator. I only see a plus button for automation and scenes but not to add devices. Thanks. Have a great day. Didier

      Delete
    3. Ok found it. It is under the main configuration menu of HA and then all the way at the bottom there is ZHA.

      Delete
  10. I just followed your instructions - easy as, thank you!
    One thing to note is that the size of the pins on your jumpers matters - I have some good ones that won't fit in the holes on the pcb, with cheeeeeeap ones that will fit perfectly.

    ReplyDelete
    Replies
    1. Using a file right now! :-)

      Delete
    2. I just used the legs off a few LEDs that I had laying around. they soldered in perfectly, and the breadboard jumper wires worked with them...

      Delete
  11. HI Guys ... all the over firmware flashes I've done are with 4 wires. RXC, TX, 3V and GND.

    For this I see there's 5 with IO0(GPIO Zero) to GND being the fifth.

    I see the IO0(GPIO Zero) on the Sonoff board but on the TTL dongle where is "second" GND?

    Cheers!

    ReplyDelete
    Replies
    1. If you've flashed ESPs before it has always required RX/TX, 3V3, GND and GPIO 0. Unless you want to count dev boards but then those just need to plug in the USB wire.

      Delete
    2. Ok Would look like ive never flashed this type of board then 😉... So where's the 'second' ground on the dongle?

      Delete
    3. Goes on the ground pin. Pulling gpio0 low while the board boots puts the esp82xx into bootloader mode for flashing.

      Delete
    4. Thanks - waited til the video came out :-) Fully understand now 8:14 time stamp @ https://www.youtube.com/watch?v=dC1AEyFhmnc .... thanks again. Really appreciate your work and sharing. Outstanding stuff.

      Delete
    5. Just got time to do this. Had to file all the pins but after that ... smooth as silk. What a far better way to have Zigbee that having to run those delicate USB dongles!!!

      Delete
  12. Does it, after flashing, support more than 32 devices, or doesn't that number get changed by the procedure?

    ReplyDelete
    Replies
    1. That would be up to Home Assistant.

      Delete
    2. That is something i am also curious about. Is the orginal max of 32 client a limitation of the orginal software or is it a limit from the zigbee chipset that is used in the gateway. In home assistant there is no limit regarding the number of clients

      Delete
    3. Just yesterday I added device 33 and things seem to be okay...

      Delete
  13. Apolgies for the noob question, but what is the pin size needed for the jumper cables? I'm looking to purchase some from aliexpress, thanks!

    ReplyDelete
    Replies
    1. I just used run of the mill breadboard jumpers. Male dupont were too large. I have seen people also use solid wire out of cat5e cable too.

      Delete
  14. Here is the link to a discussion on the HA forum, I am trying to get the sonoff zigbee switches to work in Zha, but without success after several tries and day of research? has someone succeeded on your end? thank you

    https://community.home-assistant.io/t/sonoff-zigbee-button-snzb-01-issue-only-in-cloud-mode/217906/3

    ReplyDelete
  15. I'm thinking ahead here, but I'm curious how upgrades will work and if any data about the Zigbee network could be lost. What happens with a new version of Tasmota, or the .ota file?

    I suppose if it is even a little complicated, you've got great material for another vid!

    ReplyDelete
  16. I made a N00b mistake and followed the instructions exactly, then had to re-flash it because I'd put the wrong OTA file on it. Maybe an edit needed?

    ReplyDelete
    Replies
    1. Either ota will work at this time. What edit is needed?

      Delete
  17. Worked great. I was originally running HA 0.113.2 and some sensors battery stats did not show. After upgrading to HA 0.114.2, all entities are functioning properly.

    ReplyDelete
    Replies
    1. Awesome! I have noticed the battery stuff takes 12-24 hours to report which does make sense as they don't want to check their battery all the time.

      Delete
  18. Can multiple bridges be deployed to get better coverage?

    ReplyDelete
    Replies
    1. As far as I know HA can only do one ZHA integration. You'd have to fire up another in TasmotaZigbee mode or grab you a mains powered device and put it in the middle to do the mesh thing.

      Delete
  19. Hi,
    Does anyone have a problem with flashing like me?

    Flashing ends after 13% with error: Timed out waiting for packet header :-(

    ReplyDelete
    Replies
    1. I had the same problem you did using Tasmota. I would either time out at 12-13% or else just close the program completely.

      After trying for 20+ times, I used NodeMCU py-flasher as suggested above & it worked on the first try!

      Delete
    2. I had to use NodeMCU as well, tasmotizer - best result was 51%.

      In the meantime I soldered the pins - no difference, the same issues.

      In NodeMCU with top speed selected it completed successfully after second attempt (first stopped on 95%).
      Lower speeds - max 12%.

      Good Luck.

      Delete
  20. Thank you for the helpful posting!
    One question, any ideas for checking and changing zigbee channel of Sonoff zigbee bridge with tasmota firmware?

    ReplyDelete
  21. Just to let you all know, there is a new Sonoff Zigbee Bridge v1.1 which I used in the above steps. All works fine, no issues. Pins are at the same location on the board, just some extra white text on the back, flashing without any problems.

    ReplyDelete
    Replies
    1. Hi,

      But I have this experience - verison 1.1 :(
      esptool.py v3.0-dev
      Serial port COM8
      Connecting....
      Detecting chip type... ESP8266
      Chip is ESP8266EX
      Features: WiFi
      Crystal is 26MHz
      MAC: 98:f4:ab:e2:60:19
      Uploading stub...
      Running stub...
      Stub running...
      Configuring flash size...
      Compressed 542464 bytes to 379429...
      Writing at 0x00008000... (12 %)
      A fatal error occurred: Timed out waiting for packet header

      Can anyone help me?

      Delete
    2. @fam How do you kknow which revision of the Bridge you have?

      Delete
    3. What do you think .... see pic https://ctrlv.cz/cIFo

      Delete
  22. Followed guide and flashed succesfully, got HA working. 1 small question : why do I get "Command":"Unknown" when entering command : "ZbPermitJoin 1" ? Also get this answer when for ex. "ZbStatus2" command is issued in tasmota console. I also don't see the registered sensors above then main menu of tasmota. (I once saw them, but now they are gone). Zigbee devices are visible in ZHA and working.

    ReplyDelete
    Replies
    1. received my Sonoff Zigbee Bridge today. Flashed it with Tasmota & ncp-uart-sw_6.7.6_115200.ota Then tried to link a Blitzwolf BW-IS4. That worked but was missing info, then removed it from ZHA and tried to add it again. Got stuck, could not add it anymore to the bridge or HA. Log file was telling already known device,..... Retry serveral times also flashing of the OTA file (older one, then again the new). There isn't a descent manual with the Blitzwolf (there are 2 buttons : 1 reset button on top & 1 button in the battery compartment) After several tried of combinations and also clearing HA DB's. (also zigbee.db) I finally got it paired again. Another Zigbee sensor (sonoff temp & humidity) worked immediatly. The instruction on tasmota: "ZbPermitJoin 1" does not work, it says unkown command. Adding with HA does work. (searching). Isn't there some sort of commands or lists in tasmota to manage saved/paired devices ? I was expecting a list of paired devices and some buttons to pair or unpair. Where are these stored in ram of tasmota ? Or is it stored in the zigbee chip that you flash. Very confusing all. Hopefully my ordered aqara temp & humidity sensors will also work. I noticed at some point in tasmota the sonoff temp & hum sensors was graphically on top of the main page, now it seems gone again.

      Delete
  23. This was a great tutorial. Thanks mate! I'm having an issue with the SNZB-01 buttons so I'll go with the MQTT method you mentioned in the YT comments.

    ReplyDelete
    Replies
    1. Hi mate, any chance you could post your MQTT method here? Are you able to pickup the three button presses (toggle, double and long)?

      Delete
  24. How do you add multiple bridges to Home assistant? I see comments about it being possible but not the steps to do it.

    ReplyDelete
  25. Thanks for the research and writeup! I have a Newbie question here... I previously set up another Zigbee AP using the following kit:

    SmartRF04EB CC1110 CC2530 Downloader CC2531 Wireless Zigbee Sniffer Bare Board With Bluetooth 4.0 Dongle Capture Packet Module

    is it possible to use the TI component (SmartRF04EB) of this setup as the flashing device?

    Thanks very much!
    John

    ReplyDelete
  26. FYI, the underlying "bellows" library for zigpy that ZHA uses do no longer need to use the older ncp-uart-sw_6.5.x... firmware version so if you are using Home Assisatnt 0.114 or later then you can use newer versions of the EmberZNet NCP firmware.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Yes, I'm definitely curious about upgrades too and how things are handled.

      Delete
    3. I know I changed the guide back in the 0.113 days as I tried the later firmware and it worked.

      Delete
  27. This post is the reason why I bought a Sonoff Zigbee Bridge. Thank you

    ReplyDelete
  28. Anyone have tips on pairing the phillips plugs or innr plugs. I was able to get them paired once and still have one phillips plug paired. Can't get any others however. I know some of the aqura temp and door sensors stuff has some quirks with getting paired where you may have to hit the button multiple times are the initial paring process. Looking to see if these do also. Thanks

    ReplyDelete
  29. Firstly thanks for the help so far - Really useful blog/video.
    I've flashed my Sonoff ZBBridge and followed the instructions - I believe. I can add the Integration into Home Assistant fine. I just can't add any devices. I'm probably missing a really easy step. HA is v 0.114.4 - I've been trying to add SNZB-01 switches and SNZB-02 temp monitors. I can get them to flash their LED 3 times but nothing on tasmota console or in HA?

    ReplyDelete
    Replies
    1. Did you put HA in pairing mode for them?

      Delete
    2. Yes, I believe so. By pressing the + button and it asks for devices to be put in pairing mode.

      Delete
    3. Searching for ZHA Zigbee devices...
      Make sure your devices are in pairing mode. Check the instructions of your device on how to do this.
      Devices will show up here once discovered.

      Log.........

      [0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [60, ]
      [0x0000](EZSP): started initialization
      [0x0000:ZDO](EZSP): 'async_initialize' stage succeeded
      [0x0000](EZSP): power source: Mains
      [0x0000](EZSP): completed initialization




      Delete
    4. Just reset the device and followed the steps again. After I enter this command I cease to see any ZIG entries in the console? is this something to worry about?

      backlog rule1 on system#boot do TCPStart 8888 endon ; rule1 1 ; template {"NAME":"Sonoff ZHABridge","GPIO":[56,208,0,209,59,58,0,0,0,0,0,0,17],"FLAG":0,"BASE":18} ; module 0

      Delete
    5. Apologies for all the updates. I had an issue with our SmartThinq A/C integration and it was down to an underlying library missing from my installation. Is there any chance this is something similar? I was previously missing the requests module which was resolved by: sudo pip install requests.

      thanks.

      Delete
    6. My zigbee.db only contains this:
      'utf-8' codec can't decode byte 0xc1 in position 99: invalid start byte

      Which definitely doesn't seem right?

      Delete
    7. If you don't have any devices you can delete the DB and let it recreate.

      Delete
    8. I tried that - still the same sadly.

      Delete
    9. Can't say I've heard of this issue, usually wants you get it added to the HA integration and it shows up you simply add your devices. Are you on the later OTA file and latest HA?

      Delete
    10. Yes later OTA and most up to date HA. I spun up another HA installation today and tried with that - same issue. I may try to reflash at the weekend as a last resort.

      Delete
    11. Might need to jump into discord and see what exactly is going on. Little slower here back and forth and can't share screenshots.

      Delete
    12. Perseverance - for some reason I've been able to add two devices this evening! Tks for all your help.

      Delete
  30. Hi Travis, any chance you could showcase a method to get the snzb-01 wireless switch working in HA? I have seen you mentioned an MQTT method, but need a little more direction if possible? Thanks from Perth Australia

    ReplyDelete
    Replies
    1. Using the bridge with Tasmota Zigbee as shown here. https://tasmota.github.io/docs/Zigbee/

      Delete
  31. This comment has been removed by the author.

    ReplyDelete
  32. I see Tasmota 8.5.0 is out. Would the upgrade method be the same for this as a plug, switch, or bulb, just do the OTA update from the device? Would any other steps need to be redone?

    ReplyDelete
    Replies
    1. Just make sure you upgrade to the tasmota-zbbridge.bin file. An OTA update should work fine.

      Delete
    2. This comment has been removed by the author.

      Delete
    3. I get a couple of unknown commands when I enter your console commands so it is not working for me with 8.5.0+ unfortunately. When entering module 75, you get a unknown command message for example

      Delete
    4. (If you manually download the tasmota version you have in your video (8.4.0), everything is working as it should.

      Delete
    5. I haven't tried but 8.5.0 should work as well but just make sure you use the zbbridge version of the bin.

      Delete
    6. Not that I doubted the Tasmo-folks, but I did update and it appears to have gone perfectly. Everything seems to be as it was and Home Assistant still sees everything. I did it via the OTA update, but just as digiblurDIY said, make sure it is using the proper .bin. By default that is filled in with the standard tasmota.bin. Make sure that you use this: http://ota.tasmota.com/tasmota/release/tasmota-zbbridge.bin

      Delete
    7. If I do the OTA with the new 8.5.0 tasmota-zbbridge.bin file, do I have to redo the uart file?

      Delete
    8. One other question, the 8.5.0 tasmota-zbbridge.bin file is > 500kb, does this mean:

      (https://tasmota.github.io/docs/Upgrading/)
      If the binary you're upgrading with is larger than 500kb you also need to download the minimal build (tasmota-minimal.bin(.gz)) since the upload process needs the space in flash memory to upload the new binary.

      Delete
    9. I did not have to do minimal first, I just did the OTA that I linked and usually Tasmota is smart enough to do a minimal upgrade first on it's own and then the full install. This is what happened to me. Just let it be and don't mess with it once you start, come back in 5 minutes or even 10. Typical recommendation for any OTA update I think.

      No, I didn't have to redo the uart file.

      HOWEVER, I have some older PEQ door/window sensors that are fickle on their best day. The 8.5.0 update made them way worse, they'd just go unavailable in hours of being reset.

      I noted several zigbee fixes and commits since that release and went with a dev. build here: http://ota.tasmota.com/tasmota/ which came up as 8.5.0.1 on reboot. That definitely did a lot to stabilize things and has been working perfectly since.

      Delete
    10. It is my understanding those fixes only apply if you are using the bridge in Tasmota Zigbee mode. If you are using it via passthrough with ZHA then fixes would have to be done on the ZHA component.

      Delete
    11. Travis if you are looking for another video I'm curious what the different modes are in how to use the Sonoff Zigbee Bridge. I looked at the documentation but I still don't get it. I have it running but I think I'm missing out on some of it's capabilities.

      Delete
    12. Using the Tasmota Zigbee method without ZHA?

      Delete
    13. I did the OTA update (had a dev of 8.4.x) using the url: http://ota.tasmota.com/tasmota/release/tasmota-zbbridge.bin
      Now I have 8.5.1 running. No issues. Firmware OTA update went fine.

      Delete
  33. Can we use the IPAddress command from the Tasmota console to set a static IP?

    ReplyDelete
  34. Replies
    1. Make sure to use version 8.4, 8.5 fails to flash.

      https://github.com/arendst/Tasmota/releases/tag/v8.4.0

      Delete
    2. Today succsesfully flashed Tasmota 8.5 from Tasmotizer

      Delete
  35. Hey man, thank you very much for this walktrough. Today I flashed at first try my Sonoff Zigebee bridge. Binding with some Sonoff PIR, Tradfri Repeater und Tradfri Socket are sucessfull to. But the Sonoff SNZB-01 Button just send only the battery level and when I`m pushing a button the console at HA said
    [0xb1df:1:0x0006] ZCL request 0x0002: []
    [0xb1df:1:0x0006] No handler for cluster command 2

    can I do something in autmation with it, or do I have to configure something else to use this button in HA ?

    Best regards from Germany
    Sascha

    ReplyDelete
    Replies
    1. I'm getting the exact same behavior, and (as both an HA and ZB noob) don't quite know what to do with it. I feel like the button should have some kind of obvious behavior or state readings, but I can't figure it out

      Delete
  36. Anyone else having issues with node red? Debug node shows nothing in zha_event. Can control and see status of zigbee devices in home assistant though without issue.

    ReplyDelete
  37. FYI, you should no longer just recommend "latest" OTA for ncp as they released an even newer ncp uart 6.8.x.x version and that latest is currently untested and might even provde to be unstable. So better use ncp uart 6.7.x.x for for now.

    ReplyDelete
    Replies
    1. I am using that version right now with the ZHA integration. I did have to pair up my sensors again to it but it does seem to be working fine as of 48 hrs or so. I did hear it has some bugs via the Tasmota Zigbee integration though.

      Delete
    2. FYI, it is currently not at all recommended to upgrade ncp firmware to 6.8.x as it is buggy.

      They have now even removed download for it so that beginners do not just upgrade to it:

      https://github.com/arendst/Tasmota/tree/development/tools/fw_zbbridge

      Bugs in ncp firmware are dicussed in https://github.com/arendst/Tasmota/issues/8583

      Delete
    3. I idrectli flashed 6.7 2 weeks ago. Until now 0 problems, 16 devices connected. Very satisfied.

      Delete
  38. I just got this flashed and installed, using HA 0.115.6, and the ncp-uart-sw_6.7.6_115200.ota file. When I added the Zigbee integration, it found and added 2, this one:

    Device info
    EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis
    by ZHA
    Zigbee info
    IEEE: 60:a4:23:ff:fe:45:ce:91
    Nwk: 0x0000
    Device Type: unknown
    LQI: Unknown
    RSSI: Unknown
    Last Seen: 2020-10-01T18:26:48
    Power Source: Battery or Unknown

    And this one:

    Device info
    unk_model
    by unk_manufacturer
    Zigbee info
    IEEE: 00:21:2e:ff:ff:05:4d:f3
    Nwk: 0x0000
    Device Type: Coordinator
    LQI: 255
    RSSI: Unknown
    Last Seen: 2020-10-01T18:26:48
    Power Source: Mains

    Any thoughts on what this could be? It almost appears like it should all be combined into 1 Device listing as the unknown one is listed as a Coordinator, and the EZSP one is showing unknown device type.

    ReplyDelete
    Replies
    1. Looks like you might have an old integration goon on. Remove the integration and delete the Zigbee dB file on HA. Restart HA and try to add it again.

      Delete
    2. Thank you! That was exactly it!

      Delete
  39. Thanks for the article. I have been using a USB zigbee bridge on my HA VM fora little while now and it has been driving me nuts every time the wife reboots the computer. This is a perfect solution to get rid of the USB pass-thru problem. Thank you so much!!

    ReplyDelete
    Replies
    1. Awesome! Not having it tied to the box and no passthrough stuff is awesome. Changed the game for me.

      Delete
  40. Thank you, you instructions were excellent.

    ReplyDelete
  41. This did not work with tasmota 8.5.1! I had to go back to 8.4.0 for the initial ZigBee firmware flash, then I was able to upgrade.

    ReplyDelete
    Replies
    1. It should work as they aren't removing zigbee from Tasmota. Do make sure when you upgrade you stick with the tasmota-zbbridge.bin file version otherwise it will not work.

      Delete
  42. Has anyone seen any issues with sensors just becoming unavailable with this? Twice now, every sensor in HA has gone unavailable. I've found the only way to get them back is to reset each and every sensor I have either with the button or by pulling the battery. Then they return and all is well. Considering have them them on the windows and doors too, "annoying" is the only word I can publicly say about it here.

    I wish I knew how to troubleshoot this better. Where do the devs hang out so I can get some help?

    ReplyDelete
    Replies
    1. No, don’t have this. All working fine here.

      Delete
    2. Every 7-10 days mine will go sideways. I usually pull the power on the Zigbee hub and restart HA. After that they usually always come back after they send a signal. Open/close doors to get them to trip or tap the reset button on the Aqura stuff multiple times to get it to send data (tap not hold). Phillips sensors always come back with a little time.

      The only issue I have other than this is when devices are added and removed multiple times the zigbee database or something doesn't get updated correctly as I have some devices I can't add. Luckily they are cheap so I have had to buy new ones and add them.

      Wish there was an easy way to view the Zigbee database to see what is going on.

      Delete
    3. Thank you, it is nice to know that I'm not going crazy at least. In fact, this is the exact behavior I witnessed this morning. Everything went off-line during the night and a restart of HA and the hub had things returning as they were tripped or checked in.

      Assuming this flashed hub is on Zigbee channel 11 by default (per the docs- I can't figure out how to get the channel number from the console), my two wifi 2.4GHz devices are at the other end of the 2.4GHz spectrum (6 & 11) and nothing overlaps: https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html

      I checked the hub before restarting it this morning and it was on-line, but didn't seem to have any TCP activity in the console suggesting Hub<->ZHA communication link was down/not speaking anymore.

      Delete
    4. LOL - right on cue, 9 days later and everything went haywire. You can almost set your watch by it. Oh well, it was a really fun experiment and I learned a lot, but off to find another Zigbee solution. This is unstable and not a matter of if, but when it will fail so I can't trust automation with it.

      Delete
    5. Still clicking along here, I haven't had to reset mine yet but I only have about 3 or 4 battery sensors on mine, no plugs/switches, etc.

      Delete
    6. I moved all my zigbee network to this device. The previous was based on cc2531 and zigbee2mqtt, and I always had problems, I was thinking of removing everything. Until now everything is simply perfect, but I did it 7 days ago. Let's see what will happen in the next days...

      Delete
    7. I haven't seen or heard of a setup in the past year that's stable and supports a large number of devices. Seems you either have stability and limited device support of large device support and limited stability. I only have Phillips motion sensors, Aqura door sensors and Aqura humidity sensors. The Phillips motion and door sensors seam to recover through this but the humidity sensors are very finicky.

      Just not sure if it's the hub or Home Assistant as a restart of HA fixed it this morning. Either way things are getting better slowly. So nice not having to touch a light switch but I would love a stable solution.

      Delete
    8. Yeah, it's probably because I have 34 devices and this little guy just can't handle it. I have a ConBee II coming and haven't decided if I'm going to go with straight-to-HA connectivity or use deCONZ with Docker on a different RPi more centrally located in my Zigbee network.

      Delete
    9. Could be. Mine says I have 35. I think it's less. Adding, removing and renaming stuff I think jacks things up with the zigbee db in HA.

      I had good luck with the ConBee II at first while I had a small number of devices. Probably 4 months. Then it started having issues which led me this way Ultimately I think it was something with the Conbee firmware wanting to be updated but wouldn't update. It's a gamble. Some have great luck and some don't. My advice is plan your device names out and add devices but don't rename them or remove them and add back in. Good luck!

      Delete
    10. I recently switched from cc2531 to ConBeeII. I am still using zigbee2mqtt though, because I really like mqtt. It's fast, easy to monitor, and I could always hack into the mqtt communication if I want to develop something myself.

      Anyways, the switch went pretty smooth. I did have to repair everything, but my network isn't that large yet. That's why I made the switch now.

      Although my range dropped a bit (I guess that antenna on the CC chip was working after all), I must say that the sensors respond amazingly fast. And I think nothing can beat the Aqara pricepoint at this moment.

      Delete
    11. Hi. Mine is running since 13 days. Until now, everything is incredibly perfect. before using z2m it was unreliable. Now I realized new automations and everything runs so smooth...
      I have 16 devices connected.

      Delete
    12. I'm sure my issue was a combination of the number of devices and the range/power of the Sonoff. I did get a Conbee II and am running it with deCONZ in Docker. So far, so good and better signal strength.

      We do have a 2nd detached garage and I'm thinking the Sonoff will be resurrected for a few sensors in there. It should be perfect for that job.

      Delete
    13. I paired 2 ikea repeaters and they are working gret. My house has 3 floors

      Delete
  43. So if I understand correctly, this configuration is just using the main Sonoff MCU as a bridge so that HA can talk to the EZSP module over TCP instead of GPIO on e.g. RPi, thus cutting out the Tasmota software that usually talks to the Zigbee module?

    Before executing the last command (that changed name to ZHABridge) I paired a device to the bridge, and it doesn't show up in HA. Then I added a device in HA and changed the Tasmota config back to Sonoff ZBBridge (75)

    Both devices show up on the main screen upon reboot, but I can't issue commands to the device I added through HA - I get {"ZbSend":"Missing endpoint"} even though I see messages inbound from the same device:

    CMD: ZbSend {"Device":"0x6AD9","Send":{"Power":1}}
    RSL: stat/tasmota_D7F547/RESULT = {"ZbSend":"Missing endpoint"}
    RSL: tele/tasmota_D7F547/SENSOR = {"ZbReceived":{"0x6AD9":{"Device":"0x6AD9","Power":0,"Endpoint":1,"LinkQuality":39}}}

    My suspicion is that this is because the zigbee radio module is paired to the second device, but since I added through HA, the Tasmota software doesn't know about the device in its database and therefore doesn't know how to form the zigbee command I was trying to execute; is that accurate?

    I would have thought that upon receiving messages from a paired but unknown device that Tasmota would then interview the device and add to its database (and that HA would do the same). The problem I'm having is that while I like the nice GUI in HA, it doesn't appear that I can use HA for all the more advanced stuff I can do in Tasmota, such as binding and other lower level stuff.

    Is my best bet to just use Tasmota to manage everything and integrate with HA over MQTT?

    ReplyDelete
    Replies
    1. Oh and the reason I ask is that I wont have easy access to these relays to press their pairing button once I install them, so I need to be sure I get it right up front...

      Delete
  44. I love your work, your videos has been the success of my home automation, and because of you and the TUYA-Convert video, i have now added over 25 switches, and 5 NodeMCU boards.

    Been using Hassio this year, moving away from Smartthings, and i was using smarthings as my zigbee controller for a while (have over 60 zigbee devices) . Suddenly the other night, it died and lost power. I saw this video so I ordered the Sonoff Bridge and followed your tutuorial. Installing Tasmota 8.5.1 and the firmware was no issue.

    I was also able to pair devices (i have about 8 ikea tradri plugs acting as routers). After pairing almost half of my devices, the hub is failing to control connected devices. So if there are 10 lights, only 8 works. Later the other 2 works again, and then some other device stops working.

    Compared to smartthings as a zigbee controller, it is definitely slower in handling multiple light comments, but at this time the delay doesnt matter, its the fact that some devices that are paired appears to disconnect.

    Any ideas why this is?

    ReplyDelete
  45. Hi. Tasmota part done using correct tasmota fw. But when I try to flash zigbee firmware, it uploads it and then I get "Upload Failed - Magic byte is not 0xE9".
    Tasmota ver. is 9.0.0.1, file tasmota-zbbridge.bin, Zigbee fw file ncp-uart-sw_6.5.5_115200.ota and ncp-uart-sw_6.7.6_115200.ota, same result.

    ReplyDelete
  46. I've got it install succesfully, thank you! Just wondering if it's possible to control the LED state on the bridge itself? So I can turn the blue led on, to show it's connected?

    ReplyDelete
  47. Does not give to flash ncp-uart-sw_6.5.5_115200.ota or ncp-uart-sw_6.7.6_115200.ota on the new ZigBee bridge v1.1. Show Upload Failed. In the console:

    UPL: File ncp-uart-sw_6.7.6_115200.ota ...
    UPL: Successful 190272 bytes. Restarting
    HTP: Upload transfer
    XMD: Init bootloader
    XMD: Bootloader timeout
    XMD: Restarting
    HTP: Upload done

    ReplyDelete
    Replies
    1. I'm having the same issue...

      Delete
    2. Try different cables, power supplies, make sure no wires from flashing are attached. Try different versions of the Tasmota zbbridge bin.

      Delete
  48. FYI, it is currently not recommended to upgrade ncp firmware to 6.8.x as it is buggy

    https://github.com/arendst/Tasmota/tree/development/tools/fw_zbbridge

    ReplyDelete
  49. I have the Sonoff bridge at the 8.4.0 version:

    Program Version 8.4.0(zbbridge)
    Build Date & Time 2020-07-29T12:13:05
    Core/SDK Version 2_7_2_1/2.2.2-dev(38a443e)

    Both the ncp versions 6.5.5 and 6.7.6 seem to apply OK but give the same result on resart:

    01:09:06 ZIG: Resetting EZSP device
    01:09:07 RSL: tele/Tasmota_ZbBridge/RESULT = {"ZbState":{"Status":1,"Message":"EFR32 booted","RestartReason":"Power-on","Code":2}}
    01:09:07 ZIG: ZbEZSPSend 000008
    01:09:07 ZIG: specific frame_control 0xFF80
    01:09:07 ZIG: {"ZbEZSPReceived":"00"}
    01:09:07 RSL: tele/Tasmota_ZbBridge/RESULT = {"ZbState":{"Status":55,"Version":"0.0.0.0","Protocol":0,"Stack":0}}
    01:09:07 RSL: tele/Tasmota_ZbBridge/RESULT = {"ZbState":{"Status":98,"Message":"Only EZSP protocol v8 is currently supported"}}
    01:09:07 RSL: tele/Tasmota_ZbBridge/RESULT = {"ZbState":{"Status":99,"Message":"Abort"}}
    01:09:07 ZIG: Abort
    01:09:07 ZIG: Stopping (99)

    Can anyone provide a hint as to where I have gone astray?

    ReplyDelete
    Replies
    1. Keep going with the setup... you are almost there.

      Delete

Post a Comment

Popular posts from this blog

Tuya Convert 2.3 Update | Flash Tuya Smartlife Devices | No Soldering! | Remove the cloud | Custom Firmware

Tuya Convert 2 - Flash Tuya Smartlife Devices - No Soldering - Remove the cloud with Tasmota ESPHome