So… I’ve been working all day on this, reading lots of tutorials, and I’m completely lost 9and of course it’s not working!). I think it’s time to reach out for some help…
I’ve bought a Sonoff ZBBridge, and flashed it with Tasmota (the special bin for bridges).
Then I configured Wifi, MQTT, name, etc. I have also paired 3 sonoff devices to it through Tasmota Web GUI (a Motion sensor, a Switch and a Door contact sensor.
I have updated the firmware and the “ncp-uart-sw ota file”
I have also did the foillowing:
SetOption89 1
SetOption83 1
SetOption112 1
SetOption100 1
They all work fine in Tasmota/MQTT. I can play with them, and can see the messages being published in nthe tasmota console, and in my MQTT Explorer. For example, if I break open the Door contact sensor, I get that published:
/tele/CONTACT_BUREAU_PORTE/SENSOR
{
"CONTACT_BUREAU_PORTE": {
"Device": "0x43E6",
"Name": "CONTACT_BUREAU_PORTE",
"0500<00": "000000000000",
"ZoneStatusChange": 0,
"Contact": 0,
"Endpoint": 1,
"LinkQuality": 165
}
}
I then (tried to) configure the Things and items (I’m using configuration files)
Things:
Thing mqtt:topic:ZBBRIDGE "Zigbee Bridge" (mqtt:broker:MQTTBroker) @ "Bureau" {
Channels:
Type datetime : LastUpdate "LastUpdate" [stateTopic="tele/ZBBRIDGE/STATE" , transformationPattern="JSONPATH:$.Time"]
Type number : LoadAvg "LoadAvg" [stateTopic="tele/ZBBRIDGE/STATE" , transformationPattern="JSONPATH:$.LoadAvg"]
Type number : Vcc "Vcc" [stateTopic="tele/ZBBRIDGE/STATE" , transformationPattern="JSONPATH:$.Vcc"]
Type string : Version [stateTopic="stat/ZBBRIDGE/STATE", transformationPattern="JSONPATH:$.Version"]
}
Thing mqtt:topic:CONTACT_BUREAU_PORTE "Porte Bureau" (mqtt:broker:MQTTBroker) @ "Bureau" {
Channels:
Type string : StatusChange "Status Change" [stateTopic="tele/CONTACT_BUREAU_PORTE/SENSOR", transformationPattern ="JSONPATH:$.CONTACT_BUREAU_PORTE.ZoneStatusChange" ]
}
Items:
String ContactBureauPorte_Status "Contact Porte Bureau" {channel="mqtt:topic:CONTACT_BUREAU_PORTE:StatusChange"}
Number ZigbeeBridge_Vcc "Zigbee Vcc" {channel="mqtt:topic:ZBBRIDGE:Vcc"}
But the items always stay NULL.
Do I need still need the Zigbee Binding, I was under the impression that because it was connected to MQTT, I didn’t need it…
Thanks a lot for any light that you can shed on that!
P.S. I found in some tutorials, that you should do the following command (that I didn’t do)
Backlog Weblog 3; so65 1; Module 75
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
Do I have to do that?