Python Plugin: Zigbee2Mqtt Topic is solved

Python and python framework

Moderator: leecollings

Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Nautilus »

Hi, I am still running pre 3.0 version with zzh and zigbee2mqtt v.1.18. I have two locations, in both of them over 30 zigbee devices (most of them have 3-5 separate devices in Domoticz so the total is somewhere around 100 devices per location - and I have named them all :D). Also a lot of automations, some of which have been tied to the idx, but most of them to the device name. On top of this I would like to keep my over 5 years of history of temperatures, but other log info is irrelevant. Everything works now, but I want to be future proof with new deivces coming and new features as well.

Do I understant that I could try to update without removing the hardware first? In this case I could expect duplicate devices and maybe some other harm, but still more or less everything should work and with a bit of effort (less effort than removing all devices in Domotics and creating them again?) all would be back to normal?

And the other option would be to remove the current zigbee2mqtt hardware, then add the hardware again and do the update? In this case all of my logs (temp history) would be lost, all devices would be created again (and I would have to name all of them again :|) with new idx and I would have to go through all of my automations etc. to make sure they work again? But I would not need to link the devices again with zzh?

Of course, I would have a backup if I needed to go back...
fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by fac13 »

I was in a similar position but with even more devices; I decided I wasn't willing to trash everything and start again.

So I worked out a way to do it by manually updating the domoticz database in between the last run with old plugin code and the first run with the new plugin code.

I used a test domoticz instance to discover what new deviceid's the plugin would use when restarted at v3.0, and how those mapped to my existing pre-v3.0 deviceid's.

I then prepared a set of SQL update statements like this one: -

UPDATE devicestatus SET deviceid = '0x000b3cfffef4febd_state' WHERE deviceid = '0x000b3cfffef4febd_switch';

In my case I needed a total of 28 such statements. I tested these and rehearsed my upgrade plan several times on my test system until I was happy, and then applied it to my production system. It worked perfectly.

I did this almost three months ago and have had no problems. Absolutely no other changes were required, everything carried on working.

This method obviously requires some thought, planning and a bit of knowledge. If anybody else reading this likes the idea but has lots of basic questions then I'm afraid this isn't for you.

It does work though!
ubee
Posts: 66
Joined: Tuesday 10 February 2015 20:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Sweden
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by ubee »

Seems to be just one thread about this plugin, so it might be a long shot get through this way....

I'm new in the Zigbee world but not with Domoticz. Decided to try out some Zigbee stuff since I'm extremely tired of 433MHz devices. I have added a cc2652 dongle to my Rasp, installed zigbee2mqtt broker and this Domoticz plugin. I have also managed to set up a Agara temp&humidity sensor and it works fine as far as I can see. Next on my list is to integrate a wall-switch. I have added Sunricher ZG9100A-S switch which should be a supported by zigbee2mqtt. Pairing is OK. However, the only thing that shows up in the list in zigbee2mgtt tab is a router, no end device. I enclose two screendumps.

What am I missing?
Attachments
Screenshot from 2021-04-24 09-04-05.png
Screenshot from 2021-04-24 09-04-05.png (51.47 KiB) Viewed 7777 times
Screenshot from 2021-04-24 08-58-10.png
Screenshot from 2021-04-24 08-58-10.png (97.82 KiB) Viewed 7777 times
fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by fac13 »

Most of the support for the plugin is via github. When I've needed help I've got it by raising an issue there, it's much more active than this thread.

https://github.com/stas-demydiuk/domoti ... gin/issues
User avatar
waltervl
Posts: 5714
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by waltervl »

It is also OK to create a new topic here in Zigbee subforum with your questions as long as you mention your plugin (Zigbee2mqtt, ZiGate, Deconz) in the title.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Nautilus »

Well, I went ahead and updated my system where I have less zigbee devices. I was not able to add my newest due to compatibility and decided this is the only way to go.

Now, after the update some devices continue to work fine, but with some I have issues. E.g. WSDCGQ01LM Temp/hum sensor stopped reporting under the combined sensor (temp/hum). It still updates the individual temp and hum sensor. I’ve tried re-pairing, I removed the existing temp/hum device and hoped it would be recreated but nothing seems to work. What should I do to make it alive again (in this case to be created again)?

Same seems to trouble my IKEA Kadjril roller blinds. I have not tested any repair actions with them yet but the existing devices are not working anymore...

edit. The blinds control works - just that it is now inverted. By changing the type to "blinds percentage inverted" it is logical to use them again except that both 0% and 100% will fully drop them. I went ahead and removed the temp/hum sensor from domoticz (all that was created) and from zigbee network. Then added it to zigbee2mqtt again afer which all except the combined temp/hum sensor were created as new sensors. So I am still wondering how I could get that combined sensor back...
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Nautilus »

There is now a PR for this missing temp/hum sensor issue in the github repository: https://github.com/stas-demydiuk/domoti ... n/pull/629

Unfortunately it seems that StasDemydiuk has not been active on the forum nor in Github since March. I hope everything is ok. Does anyone here know him personally? I wonder if anyone else can merge PR's to this repository in case he is busy with other activities?
User avatar
heggink
Posts: 977
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by heggink »

Let's give it a bit. Worst case, someone else clones the repo and we work from that for a while.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by sammyke007 »

Nautilus wrote: Sunday 02 May 2021 22:48 There is now a PR for this missing temp/hum sensor issue in the github repository: https://github.com/stas-demydiuk/domoti ... n/pull/629

Unfortunately it seems that StasDemydiuk has not been active on the forum nor in Github since March. I hope everything is ok. Does anyone here know him personally? I wonder if anyone else can merge PR's to this repository in case he is busy with other activities?
He replied on Github 13 minutes ago, everything's ok...
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Nautilus »

Yes, the PR is now merged - great news to see Stas is back with us... :)
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Derik »

Hi....

I read the best way for the upgrade is to remove the plugin and install a clean version.
Only all the IDX.....

What happend when i upgrade the plugin anyway?
Is this working?

I have 50 z2m device, so a upgrade and all new idx is a lot work..

Some one have a idea? or a solution?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by eddieb »

Hi @Derik,
I did upgrade and it all went ok here, just got some new idx ..
All existing kept working
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Derik »

eddieb wrote: Monday 10 May 2021 8:14 Hi @Derik,
I did upgrade and it all went ok here, just got some new idx ..
All existing kept working
Hi thanks forthe answer..

Only i did:

Code: Select all

pi@odroidn2:~$ cd domoticz/plugins/zigbee2mqtt
pi@odroidn2:~/domoticz/plugins/zigbee2mqtt$ git pull
remote: Enumerating objects: 389, done.
remote: Counting objects: 100% (344/344), done.
remote: Compressing objects: 100% (110/110), done.
remote: Total 389 (delta 245), reused 315 (delta 222), pack-reused 45
Receiving objects: 100% (389/389), 57.82 KiB | 2.89 MiB/s, done.
Resolving deltas: 100% (251/251), completed with 57 local objects.
From https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin
   47cc6f3..7537ad5  master     -> origin/master
 * [new tag]         v.3.0.0    -> v.3.0.0
Updating 47cc6f3..7537ad5
error: Your local changes to the following files would be overwritten by merge:
        adapters/__init__.py
Please commit your changes or stash them before you merge.
Aborting
pi@odroidn2:~/domoticz/plugins/zigbee2mqtt$
something went wrong?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by waaren »

Derik wrote: Monday 10 May 2021 11:55 Please commit your changes or stash them before you merge.
Do a

Code: Select all

git stash ; git pull
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by Derik »

waaren wrote: Monday 10 May 2021 13:17
Derik wrote: Monday 10 May 2021 11:55 Please commit your changes or stash them before you merge.
Do a

Code: Select all

git stash ; git pull

Thanks Did was the working oprion..
A few new features...

Thanks to all great work!!!!!
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
fac13
Posts: 7
Joined: Monday 28 April 2014 14:08
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by fac13 »

Nautilus wrote: Wednesday 28 April 2021 17:19 The blinds control works - just that it is now inverted. By changing the type to "blinds percentage inverted" it is logical to use them again except that both 0% and 100% will fully drop them.
The fact that the blind control goes wrong at 0% and 100% but works correctly on values in between appears to be a known problem - there is an issue for this on github but there has been no response as yet.
hoeby
Posts: 531
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by hoeby »

I updated domoticz to the last version.
Also zigbee2mqtt and zigbee plugin are update.

In the domoticz log i see this row every 5 seconds.

Code: Select all

Zigbee2MQTT: (Zigbee2MQTT) Received groups list from bridge
Need i to worry about it?
I don't use groups, don't know why i receives it.

Can i disable this information line?
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
fvdp80
Posts: 70
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by fvdp80 »

I've been getting irregular errors from a Osram/Lightify A60 lightbulb. Does anybody know what this error means?

Code: Select all

2021-07-21 00:09:51.486 Error: Zigbee2MQTT: (Zigbee2MQTT) A Zigbee publish error occured for device '0x7cb03eaa0a046794' with error message: Publish 'set' 'brightness' to '0x7cb03eaa0a046794' failed: 'Error: Command 0x7cb03eaa0a046794/3 genLevelCtrl.moveToLevelWithOnOff({"level":25,"transtime":0}, {"sendWhenActive":false,"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Data request failed with error: 'MAC no ack' (233))'
User avatar
heggink
Posts: 977
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by heggink »

I have these sometimes with IKEA services as well. I was told these are because of an overflow bug in their firmware (see my issue logged on the z2m GitHub). Disconnecting them from power fixes it for a while until it happens again.

Sent from my SM-G980F using Tapatalk

Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
waltervl
Posts: 5714
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by waltervl »

(Data request failed with error: 'MAC no ack' (233)
This is looks like that the Zigbee Coordinator (USB Stick) did not get a acknowledgement from the bulb. So they are not talking to each other.
Indeed toggle the power on the bulb will trigger a zigbee reconnect.

With Zigate I get these too (on some devices). Sometimes sending the command already triggers the reconnect so no need to toggle power.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest