Zigbee2Tasmota

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

dgrostoto
Posts: 7
Joined: Monday 10 February 2020 0:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by dgrostoto »

Well, zigbee2tasmota (Z2T) running on a sonoff Zigbee bridge has several advantages :
- Better emission/reception : the sonoff can be located anywhere in a location that can be better for zigbee reception, in particular far from USB3 port from the raspberry (interference in the 2.4Ghz ISM band), and closer to endpoint Zigbee devices (more centralized)
- Better emission/reception : the sonoff is designed to reduce interference between its internal wifi and zigbee transceiver
- The sonoff can handle far more devices (more than 100 i think) than the CC2531 (less than 20) can. Altough there is other dongles that can handle that much (check zigbee2mqtt project for details)
-line of sight is 80meters on sonoff vs 30meters approx on CC2531 (same remark for other dongles as above)
- the sonoff can handle local rules and the soft is very reliable (the tasmota software is one of the best quality software i've ever seen) without using central program such as domoticz / jeedom / openHAB / Home Assistant that may have bugs (sorry for all developers of this programs :) i'm telling this from a industrial production point of view, which is important to me), these local rules perfectly fit simple tasks and are very fast to execute.

Zigbee2tamosta support in domoticz would be a great feature. It's s shame that the zigpy library could not be integrated which may be a good way to integrate zigbee within domoticz. I saw the discussion about an obscure crash related to sqlite3 usage, maybe i'll take a look closer to see if i can think about a elegant solution about dynamic /static linking against the sqlite3 library.

Note about using rules on tasmota to modify payloads to get them work on domoticz : this is really a bad way to go, because number and size of rules is very limited (ESP8266 have little memory). Rules should be used for other tasks such as extending the the direct associations permitted by zigbee for example. Node-Red can be a workaround (transforming MQTT message) but quite heavy for the job.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Zigbee2Tasmota

Post by sincze »

My first steps with the Sonoff Zigbee Bridge.
Z2T.PNG
Z2T.PNG (26.65 KiB) Viewed 2005 times
I managed to pair 4 sensors.
I've read industrial stability can be done with RULES, but I would appreciate if these devices could appear in my Domoticz interface.
Any suggestions on how to do that?

I've Node-Red where I could do something like this to maybe virtual devices in Domoticz ??
Z2T-Node-Red.PNG
Z2T-Node-Red.PNG (41.63 KiB) Viewed 2005 times
Suggestions are welcome.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
cyrax
Posts: 1
Joined: Monday 15 March 2021 18:20
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by cyrax »

sincze wrote: Thursday 25 February 2021 19:33 My first steps with the Sonoff Zigbee Bridge.
Z2T.PNG

I managed to pair 4 sensors.
I've read industrial stability can be done with RULES, but I would appreciate if these devices could appear in my Domoticz interface.
Any suggestions on how to do that?

I've Node-Red where I could do something like this to maybe virtual devices in Domoticz ??
Z2T-Node-Red.PNG

Suggestions are welcome.
You can use rules to inform Domoticz about the updates. For example:

Rule1 ON ZbReceived#0x0003#Power=1 DO publish domoticz/in {"idx":152, "nvalue":1} ENDON
Rule1 + ON ZbReceived#0x0003#Power=0 DO publish domoticz/in {"idx":152, "nvalue":0} ENDON
Rule1 1

These lines sends the 0x0003 device's actual state to domoticz and activate the rule (Rule1 1).

From Domoticz, you can create a nodered flow for domoticz/out mqtt with a function like this (dont forget to add RBE to the flow to prevent loops):

var payload = msg.payload;
msg.payload=JSON.parse(payload);
if (msg.payload.idx == "152") {
msg.topic = 'cmnd/tasmota_DC02EC/ZbSend';
if (msg.payload.nvalue == "0") {
msg.payload = "{\"Device\":\"IKEA_socket\",\"Send\":{\"power\":\"off\"}}";
} else {
msg.payload = "{\"Device\":\"IKEA_socket\",\"Send\":{\"power\":\"on\"}}";
}
return msg;
}
return null;

Probably there are much easier solutions but this is just working for me :) (I used friendly name in nodered, not 0x0003 but those are the same devices)
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Zigbee2Tasmota

Post by sincze »

Nice addition indeed.
Had noticed the rules somewhere else but with your explanation is just makes more sense to me.

Thanks for sharing.
A native integration would even be better :)
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Sherco49
Posts: 12
Joined: Saturday 24 March 2018 17:54
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by Sherco49 »

Hi, i am looking to implement my domoticz installation with zigbee devices, and found Z2T with a Sonoff zigbee bridge pro which runs with a esp32 and can manage 128 values.
the good news is it is cheap and easy to flash with tasmota
the bad news is i can't find the way to link with domoticz, except with the Tasmota rules to read sensors values , and no solution to command device from Domoticz thru mqtt to Tasmota and zigbee device.

Did anybody go further than that ?

bests
hoeby
Posts: 531
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Zigbee2Tasmota

Post by hoeby »

Have a look at this thread.
I do not use the pro, but it is tasmota. Maybe you can use the same bodered flow to connect it to domoticz and not use the rules in tasmota

viewtopic.php?t=38889
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee2Tasmota

Post by waltervl »

Sherco49 wrote: Monday 09 January 2023 13:07 Hi, i am looking to implement my domoticz installation with zigbee devices, and found Z2T with a Sonoff zigbee bridge pro which runs with a esp32 and can manage 128 values.
the good news is it is cheap and easy to flash with tasmota
the bad news is i can't find the way to link with domoticz, except with the Tasmota rules to read sensors values , and no solution to command device from Domoticz thru mqtt to Tasmota and zigbee device.

Did anybody go further than that ?

bests
It is still much easier to integrate a Sonoff 3.0 usb Dongle, 30 euro. No need to flash and plug and play with zigbeeforDomoticz plugin or zigbee2mqtt with MQTT Autodiscover.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hoeby
Posts: 531
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Zigbee2Tasmota

Post by hoeby »

Waltervl has a great point there.
If you don't need the wifi option on the zigbee coördinator, choose an option which is default supported, much easier.

If not, the nodered flow could be an option.
Not that many devices integrated by default, but you could add them in the flow
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Sherco49
Posts: 12
Joined: Saturday 24 March 2018 17:54
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by Sherco49 »

Thank you for your answers
I ordered a sonoff USB key with a button, a door sensor and a temperature device.
Now i just wonder how i will integrate this usb key on my DS718+ with DSM7, as i have already a RFX433 dongle plugged on it.. How does it manage several usb dongles? on which logical port ?
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee2Tasmota

Post by waltervl »

Sherco49 wrote: Wednesday 11 January 2023 9:21 Thank you for your answers
I ordered a sonoff USB key with a button, a door sensor and a temperature device.
Now i just wonder how i will integrate this usb key on my DS718+ with DSM7, as i have already a RFX433 dongle plugged on it.. How does it manage several usb dongles? on which logical port ?
Does the NAS have multiple USB ports? Else you have to buy a USB HUB. they seem to be a little bit picky on brand/type see eg https://community.synology.com/enu/forum/1/post/129133
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Sherco49
Posts: 12
Joined: Saturday 24 March 2018 17:54
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by Sherco49 »

Do you talk about logical ports, or physical ?
The 718 has 3 physical ports, but i wonder how a sonoff dongle will be recognized and which device will i have to set up in zigbee2mqtt as i have already the RFX433 plugged on ttyusb0
User avatar
waltervl
Posts: 5729
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee2Tasmota

Post by waltervl »

Then I suppose it will be in ttyusb1 or ttyusb2. Did you plug it in and check? I do not know Synology NAS but there probably is some way or command to tell what devices are connected to what port.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Sherco49
Posts: 12
Joined: Saturday 24 March 2018 17:54
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by Sherco49 »

As i didn't received the Sonoff dongle yet, i can't say now, but your answer makes sense, and i hope it will works like that.
Sherco49
Posts: 12
Joined: Saturday 24 March 2018 17:54
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee2Tasmota

Post by Sherco49 »

Well, i have received the sonoff usb 3.0 dongle.... No way to install it with zigbee2mqtt, it is recognized with the lsusb command, but no way to link it with a serial port like ttyACM0 or ttyUSB0....
i tried lots of drivers cp210x.ko, some are for DSM 7.0 (i am on DSM 7.1), and the 7.1 driver doesn't want to insert (invalid format).
Whatever way i go, there is always an issue to complete.
My knowledge look insufficient for this, synology dsm doesn't help at all.
I have to consider the bridge with lan connection, maybe it is more reliable...
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Zigbee2Tasmota

Post by sincze »

So I was just wondering Zigbee2Tasmota project now has lot's of devices working with Node-Red to Domoticz.
However I wanted to check out Zigbee2MQTT as described as other solution (better support out of the box).

Anyone a clue on how to migrate th Zigbee2Tasmota 64bit LOW and 64bit HIGH key into Zigbee2MQTT ?
If my info is correct zigbee2mqtt should continue where Zigbee2Tasmota was "left" off.

Any other case would require me to setup the whole network again and that would be a pitty.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest