How to use the Sonoff Zigbee Bridge with Home Assistant - Tasmota
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.
UPDATE March 2021: iTead also is now selling their USB 3.0 dongle that uses the same chip as the Zigbee Bridge. It is preflashed with correct firmware out of the box that can also be used with ZHA and Zigbee2MQTT using the same procedure as below with the USB port. See more here in this article for Z2M usage https://www.digiblur.com/2021/03/zigbee2mqtt-with-sonoff-zigbee-bridge.html
Purchase Sonoff Zigbee Bridge:
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.
#1 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.
Download the latest "OTA file" for the Zigbee Bridge chipset
Use the latest ncp-uart-sw-x.x.x_115200.ota file (as of 2020/01/25 ncp-uart-sw-6.7.8_115200.ota is recommended). Utilize 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.
#2 Turn 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 inside, 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 as dupont male jumpers are usually too large. Please remember to set your USB TTL adapter to 3v3 and NOT 5v. If you do not have any breadboard jumpers, be creative, I've people use CAT5e wires too.
Attach the jumpers from the Zigbee bridge to the USB TTL (Amazon) or CH340G or (Aliexpress) as follows; (do NOT force them in the holes as this will damage the board, the jumper should be small enough to fit in the hole without the use of any force)
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
#3 Plug in the USB TTL to your computer and open Tasmotizer (run as administrator might be required if it crashes). 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. If the flash is still not successful, try applying ground to the Z_RST pad during the flashing process, this will force the Zigbee chipset to be quiet during the process.
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 using a proper 1A or more power supply. You can also put it back in the case if needed.
#4 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.
#5 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 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. A couple things you can try if you continue to receive have issue: change the power supply and change the power cable.
Once the process is complete Tasmota will reboot and attempt to start Tasmota Zigbee.
If you do not see the Tasmota Zigbee message of Zigbee started in the console do not continue past this point as this means the Zigbee chipset did not flash properly! A couple things you can try if you continue to have this issue: change the power supply and change the power cable. A last ditch effort if you still can't get the Zigbee chipset to flash is to update the bridge to the last developer version of Tasmota.
#6 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"}
Last but not least, while we are here, let's set the update URL to the Zigbee Bridge variant. This will prevent your future self from breaking your ZHA integration with an upgrade of the wrong bin file. Enter the following on the Tasmota console.
otaurl http://ota.tasmota.com/tasmota/tasmota-zbbridge.bin.gz
We are done with Tasmota! Let's jump into Home Assistant.
#7 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.
Sonoff Zigbee Products
Zigbee Bridge(iTead) - Zigbee Bridge(Banggood)
Zigbee PIR Motion Sensor(Junk!)
Products We Use/Recommend
Amazon US - https://amzn.to/2YZNDeO
Amazon UK - https://amzn.to/3gVLiFZ
Amazon CA - https://amzn.to/2HchPZe
Discord Chat - https://discord.gg/bNtTF2v
Patreon - https://www.patreon.com/digiblurDIY
Links to products provided by the ShareASale and Amazon Affiliate program.
Very nice.
ReplyDeleteAfter 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.
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.
DeleteHi, the link for the ncp-uart-sw_6.5.5_115200.ota is broken. Do you have the new link
Deletehttps://github.com/arendst/Tasmota/tree/development/tools/fw_SonoffZigbeeBridge_ezsp
DeleteHello,
ReplyDeleteI guess this is coordinator firmware and not router firmware, so this means you can have only one in the zigbee network?
Regards.
Yes, coordinator
DeleteGreat 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.
ReplyDeleteThanks 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 :)
ReplyDeleteAny idea how to show the ZigBee network map? Something similar to the Zigbee2MqttAssistant?
Many thanks one more time.
Is it possible to replace the CC2531 with this bridge, but keep on using zigbee2mqtt?
ReplyDeleteDon't think so, unless you can flash this bridge with the zigbee2mqtt firmware which I don't think you can at the moment.
DeleteYou can check here the supported adapters https://www.zigbee2mqtt.io/information/supported_adapters.html
I had error when I setting serial device path "Unable to connect to ZHA device."
ReplyDeleteThe bridge needs to be running and have a network path from your HA install to the Bridge on port 8888.
DeleteMark, 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.
DeleteYou might be the one that I helped on Discord?
DeleteI'm having the same issue - using HA in Proxmox. ZHA can not connect. Is there a solution?
DeleteThe 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?
DeleteYes, I can ping the Bridge from the Proxmox OS. I have factory reset the device and followed the process 3 times now, same result.
DeleteI can also ping it from the HA VM.
DeleteCan 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
DeleteI'm stuck with the same issue as the others above. I tried reflashing the ncp-uart firmware but I get an error Upload Failed
DeleteMagic byte is not 0xE9
Has anybody been able to solve this?
Just Enter (maybe again) on console: Backlog Weblog 3; so65 1; Module 75
DeleteIn my case, I had to do it again to be able to flash OTA EZSP.
Right if you are getting the magic byte then then the Bridge is not using the Zigbee Bridge module.
DeleteI'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.
DeleteUpdate: 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/
DeleteIndeed 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."
DeleteYes, 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.
DeleteNot 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.
DeleteHi!
ReplyDeleteI'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?
If you are getting an error that early. I would definitely make sure you have the zbbridge.bin file flashed.
DeleteYeah, the Sonoff ZbBridge Module bin file is installed.
DeleteHow can I test the EZSP?
I think the zigbee died...
DeleteAnything I can try?
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
DeleteYes, I posted under issues.
DeleteNo, it doesn't flash the ota.
We'll continue in discord.
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.
DeleteYou can chat with sonoff and find out the status of the devices via the socket via PHP or python, right?
ReplyDeleteThis replaces any messy cloud usage.
DeleteI need my raspberry pi to talk to the sonoff zigbee bridge, is that possible?
DeleteI don't have a Home Assistant.
Yes. Flash the other ota file and use the Zigbee Tasmota setup and it is standalone and use MQTT back and forth.
DeleteOK now i am to end, but after add ZHA intégration, i can't find the + button :(
ReplyDeleteAnother one is go to the zigbee coordinator and click add devices there.
DeleteHi 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
DeleteOk found it. It is under the main configuration menu of HA and then all the way at the bottom there is ZHA.
DeleteI just followed your instructions - easy as, thank you!
ReplyDeleteOne 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.
Using a file right now! :-)
DeleteI 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...
DeleteHI Guys ... all the over firmware flashes I've done are with 4 wires. RXC, TX, 3V and GND.
ReplyDeleteFor 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!
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.
DeleteOk Would look like ive never flashed this type of board then 😉... So where's the 'second' ground on the dongle?
DeleteGoes on the ground pin. Pulling gpio0 low while the board boots puts the esp82xx into bootloader mode for flashing.
DeleteThanks - 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.
DeleteJust 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!!!
DeleteDoes it, after flashing, support more than 32 devices, or doesn't that number get changed by the procedure?
ReplyDeleteThat would be up to Home Assistant.
DeleteThat 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
DeleteJust yesterday I added device 33 and things seem to be okay...
DeleteApolgies for the noob question, but what is the pin size needed for the jumper cables? I'm looking to purchase some from aliexpress, thanks!
ReplyDeleteI 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.
DeleteHere 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
ReplyDeletehttps://community.home-assistant.io/t/sonoff-zigbee-button-snzb-01-issue-only-in-cloud-mode/217906/3
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?
ReplyDeleteI suppose if it is even a little complicated, you've got great material for another vid!
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?
ReplyDeleteEither ota will work at this time. What edit is needed?
DeleteWorked 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.
ReplyDeleteAwesome! 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.
DeleteCan multiple bridges be deployed to get better coverage?
ReplyDeleteAs 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.
DeleteHi,
ReplyDeleteDoes anyone have a problem with flashing like me?
Flashing ends after 13% with error: Timed out waiting for packet header :-(
I had the same problem you did using Tasmota. I would either time out at 12-13% or else just close the program completely.
DeleteAfter trying for 20+ times, I used NodeMCU py-flasher as suggested above & it worked on the first try!
I had to use NodeMCU as well, tasmotizer - best result was 51%.
DeleteIn 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.
Could you please write settings (Qio, Dio or Doit & speed) for nodemcu for flashing my sonoff bridge b8266 with 2 mg flash.
DeleteThank you for the helpful posting!
ReplyDeleteOne question, any ideas for checking and changing zigbee channel of Sonoff zigbee bridge with tasmota firmware?
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.
ReplyDeleteHi,
DeleteBut 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?
@fam How do you kknow which revision of the Bridge you have?
DeleteWhat do you think .... see pic https://ctrlv.cz/cIFo
DeleteFollowed 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.
ReplyDeletereceived 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.
DeleteThis 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.
ReplyDeleteHi mate, any chance you could post your MQTT method here? Are you able to pickup the three button presses (toggle, double and long)?
Deleteany updates on this issue? I'm running into the same brick wall.
DeleteI was able to use the zha_events in HA to pick up the buttons using NodeRed.
DeleteHow do you add multiple bridges to Home assistant? I see comments about it being possible but not the steps to do it.
ReplyDeleteThanks for the research and writeup! I have a Newbie question here... I previously set up another Zigbee AP using the following kit:
ReplyDeleteSmartRF04EB 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
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.
ReplyDeleteYes, I'm definitely curious about upgrades too and how things are handled.
DeleteI know I changed the guide back in the 0.113 days as I tried the later firmware and it worked.
DeleteThis post is the reason why I bought a Sonoff Zigbee Bridge. Thank you
ReplyDeleteAnyone 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
ReplyDeleteFirstly thanks for the help so far - Really useful blog/video.
ReplyDeleteI'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?
Did you put HA in pairing mode for them?
DeleteYes, I believe so. By pressing the + button and it asks for devices to be put in pairing mode.
DeleteSearching for ZHA Zigbee devices...
DeleteMake 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
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?
Deletebacklog 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
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.
Deletethanks.
My zigbee.db only contains this:
Delete'utf-8' codec can't decode byte 0xc1 in position 99: invalid start byte
Which definitely doesn't seem right?
If you don't have any devices you can delete the DB and let it recreate.
DeleteI tried that - still the same sadly.
DeleteCan'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?
DeleteYes 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.
DeleteMight need to jump into discord and see what exactly is going on. Little slower here back and forth and can't share screenshots.
DeletePerseverance - for some reason I've been able to add two devices this evening! Tks for all your help.
DeleteHi 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
ReplyDeleteUsing the bridge with Tasmota Zigbee as shown here. https://tasmota.github.io/docs/Zigbee/
DeleteThis comment has been removed by the author.
ReplyDeleteI 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?
ReplyDeleteJust make sure you upgrade to the tasmota-zbbridge.bin file. An OTA update should work fine.
DeleteThis comment has been removed by the author.
DeleteI 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(If you manually download the tasmota version you have in your video (8.4.0), everything is working as it should.
DeleteI haven't tried but 8.5.0 should work as well but just make sure you use the zbbridge version of the bin.
DeleteNot 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
DeleteIf I do the OTA with the new 8.5.0 tasmota-zbbridge.bin file, do I have to redo the uart file?
DeleteOne other question, the 8.5.0 tasmota-zbbridge.bin file is > 500kb, does this mean:
Delete(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.
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.
DeleteNo, 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.
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.
DeleteTravis 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.
DeleteUsing the Tasmota Zigbee method without ZHA?
DeleteI did the OTA update (had a dev of 8.4.x) using the url: http://ota.tasmota.com/tasmota/release/tasmota-zbbridge.bin
DeleteNow I have 8.5.1 running. No issues. Firmware OTA update went fine.
Can we use the IPAddress command from the Tasmota console to set a static IP?
ReplyDeleteWhere is tasmota-zbbridge.bin
ReplyDeleteMake sure to use version 8.4, 8.5 fails to flash.
Deletehttps://github.com/arendst/Tasmota/releases/tag/v8.4.0
Today succsesfully flashed Tasmota 8.5 from Tasmotizer
DeleteHey 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
ReplyDelete[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
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
DeleteAnyone 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.
ReplyDeleteFYI, 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.
ReplyDeleteI 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.
DeleteFYI, it is currently not at all recommended to upgrade ncp firmware to 6.8.x as it is buggy.
DeleteThey 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
I idrectli flashed 6.7 2 weeks ago. Until now 0 problems, 16 devices connected. Very satisfied.
DeleteI 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:
ReplyDeleteDevice 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.
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.
DeleteThank you! That was exactly it!
DeleteThanks 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!!
ReplyDeleteAwesome! Not having it tied to the box and no passthrough stuff is awesome. Changed the game for me.
DeleteThank you, you instructions were excellent.
ReplyDeleteThanks!
DeleteThis 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.
ReplyDeleteIt 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.
DeleteHas 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.
ReplyDeleteI wish I knew how to troubleshoot this better. Where do the devs hang out so I can get some help?
No, don’t have this. All working fine here.
DeleteEvery 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.
DeleteThe 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.
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.
DeleteAssuming 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.
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.
DeleteStill 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.
DeleteI 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...
DeleteI 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.
DeleteJust 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.
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.
DeleteCould 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.
DeleteI 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!
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.
DeleteAnyways, 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.
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...
DeleteI have 16 devices connected.
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.
DeleteWe 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.
I paired 2 ikea repeaters and they are working gret. My house has 3 floors
DeleteSo 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?
ReplyDeleteBefore 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?
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...
DeleteI went through the same steps about 4 times as per this blog and had faced difficulties like having to repair all my sensors when I wish to try on a new PIR, Temp or Door sensor brand.
DeleteFrustrated, I spent the last 2 days I actually went through the trouble studying to integrate with HA through MQTT
Tasmota ZbBridge -> MQTT -> HA Manual Configuration
and this is what I found out:-
The Cons
========
1) Sensor status doesn't refresh when the ZbBridge or HA restart or reset unless you manually invoke them (like opening and closing doors to invoke the sensor)
2) Temp Sensors would report status but after a long period of time
3) A lot of manual config work in HA as there is no "DISCOVERY" mode for sensors
4) Yeah, you also need to adjust the JSON string from ZbBridge -> MQTT so that it can be correctly read from HA. (Hint: Use SetOption100 1 in ZbBridge console and dont use naming with space or hex like "0x1234", HA doesn't like it)
The Pros
=======
1) Sensors are stored in the ZbBridge (EEPROM ?) - unless your device suffer a catastrophe situation (like backward version flash), you usually would get all the sensors ID intact and allows you to focus on the codes compared to fiddling with the sensors
2) I'm also assuming pairing is easier (My sensor pairing experience using the HA Zigbee Integration front end had been really really time consuming and frustrating)
3) Support for other sensors - due to item 2 above (due for testing as I type)
Now I am back to this route again
ZbBridge -> MQTT -> Zigbee Integration (HA)
but I noticed that all the sensors from my ZbBridge EEPROM was discovered in HA (yay !) but none can be used (boo !). Hoping the devs will fix that soon
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.
ReplyDeleteBeen 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?
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".
ReplyDeleteTasmota 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.
ok, fixed by reading above.
DeleteI'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?
ReplyDeleteDoes 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:
ReplyDeleteUPL: 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
I'm having the same issue...
DeleteTry different cables, power supplies, make sure no wires from flashing are attached. Try different versions of the Tasmota zbbridge bin.
DeleteFYI, it is currently not recommended to upgrade ncp firmware to 6.8.x as it is buggy
ReplyDeletehttps://github.com/arendst/Tasmota/tree/development/tools/fw_zbbridge
I have the Sonoff bridge at the 8.4.0 version:
ReplyDeleteProgram 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?
Keep going with the setup... you are almost there.
DeleteI'm getting the feeling this thing goes to sleep and it causing issues where it's not responding to Zigbee activity. Watching the log and listening for activity in HA the thing will not respond to sensor activity although the GUI is functional. Then after sometime or a restart it works. Odd?
ReplyDeleteI'm seeing similar behavior. I think I'm gonna try setting up Zigbee2Mqtt here soon and see how well that works. My dislocated Zwave2Mqtt service has been working flawlessly for about a month now.
DeleteAnyone use this in Zigbee2Tasmota mode? I'm able to pair a device but can't read the MQTT message in Home Assistant. I can see it in MQTT explorer but can't figure out how to read it from there in Home Assistant.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteok, 9.1.0 is out. Anybody updated to this version?
ReplyDeleteI have 9.1.0.1 on mine and it works.
DeleteUpgrade went fine indeed.
Deletehello.
ReplyDeletewhat if i didn't want to use ZHA, but instead i'd like to use MQTT like i do with all my tuya converted devices?
how could i achieve that?
Stop at the part where you do the rules and template. This will be in Tasmota Zigbee mode.
Deleteok. how to revert if i am already past that point? :)
DeleteEasy. Configuration.. Configure module and pick the Sonoff Zigbee Bridge 75.
DeleteThanks for your guidance,
ReplyDeleteI finished it,
But I have 1 question is:
after flash, can Sonoff ZBBridge handle up to many devices?
New to Zigbee and experimented with CC2351 and ZHA but found the Zigbee device support lacking. Bought this device and did the reflashing today using Tasmota 9.1.0. The flashing succeeded but I could not get it to accept the login credentials to the MQTT broker as a prerequisite to running Zigbee2MQTT.
ReplyDeleteI downgraded to 8.5.1 OTA and it started working. Not sure why that was but am hesitating to upgrade to 9.x again
I saw that was fixed in a later release. Try this OTA link - http://ota.tasmota.com/tasmota/tasmota-zbbridge.bin.gz
DeleteWill do.
DeleteThanks
Should I check mark the TLS radio box?
DeleteIf you use TLS on your MQTT server.
DeleteCould not find the uart ota file. On Github it now says:
ReplyDeleteDelete ncp-uart-sw-6.8.0.1_115200.ota
@arendst
arendst committed 4 days ago
I am using the most recent Tasmota zb 9.1
Can you help?
Never mind the old version appeared again today and flashed just fine.
DeleteThank you very much!
Thank you for a clear and easy tutorial. It all seemed to go very smoothly, both with flashing the bridge and adding the integration to HA. However my temp and humidity readings are wrong (27.6 deg and 92.5% - I'd expect 21deg and 48%) and they have not changed for a couple of hours. How can I start debugging?
ReplyDeletehello, the url for the OTA has changed : https://ota.tasmota.com/tasmota/release/
ReplyDeleteThat URL will not work since it is https. I added the instructions to update the OTA URL a few weeks ago or more.
DeleteFor anyone else having trouble flashing, I finally managed to get mine to flash by putting pressure on the RX and TX leads on the bridge side. I had the green LED, but could never get any communication from Tasmotizer, PyFlash, or esphome flasher. Turns out I just had no communication.
ReplyDeleteDoes one have to reflash the uart firmware every time Tasmota is upgraded?
ReplyDeleteAlso, it looks like my shipment of the sensors from China is going to be delayed. Are these or other BLE sensors available in the US that I could use to check out the operation of the ESP32?
No, only tasmota updates.
DeleteFYI, there is now a warning on the Home Assistant ZHA integration which basically says that Sonoff ZBBridge is not adviced to use because ZHA serial connection to Zigbee radio over a WiFi network is not stable.
ReplyDeleteI didn't see it. I'm using ZBBridge since more than 1 month now and I'm quite satisfied, I hope that it will keep on working...
DeleteSame here, working fine, just fix your WiFi if it is broken. Just the HA devs being assholes again, carry on and move on.
DeleteDYI alternative with wired Ethernet connection instead of WiFi = https://github.com/zigpy/zigpy/discussions/584
ReplyDeleteHas anyone tried to get it to work with Z2M and then connect it to Home Assistant ? If so, how would that go in a few steps ?
ReplyDeleteHow to change the Zigbee channel?
ReplyDeleteI also have an IKEA hub and from what I understand both uses channel 11 as default so it would be good to change SonoffZigbee to something different, yes I know about the WiFi collitions.
Got the answer in Discord, thanks.
DeleteAny chance you could put the solution here? I'm also looking to change the default channel
DeleteDid a firmware upgrade to stable release Tasmota 9.2.0 (from 9.1.0) using: http://ota.tasmota.com/tasmota/release/tasmota-zbbridge.bin
ReplyDeleteAll fine here.
snzb-01 does anyone know how to add a switch? only have the battery level?
ReplyDeleteplease give me some instructions .. thank you
I got a bunch of temperature-humidity sensors ( Sonoff SNZB-02 ) paired with a tasmotized Sonoff ZbBridge, all working fine except for the temperature values that are being updated very very slow. I get new readings from them every 1-5 hours which by all standards is unacceptable. Is there a way to set the update interval? Strange enough, the humidity of the same sensors is being sent to ZHA every few minutes or so. Thanks!
ReplyDelete