Page 16 of 18

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 10 January 2022 8:45
by fvdp80
I'm getting errors regarding an Aqara Opple switch (WXCJKG11LM).
First it seemed like it was caused by an empty battery, but after replacement and also reconnecting to the netwerk I keep
getting the following errors:

Code: Select all

2022-01-10 08:02:18.317 Error: Zigbee2MQTT: 'onMessage' failed 'TypeError':'unsupported operand type(s) for /: 'NoneType' and 'int''.
2022-01-10 08:02:18.317 Error: Zigbee2MQTT: Exception traceback:
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 298 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 137 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 214 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 61 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices_manager.py', function handle_mqtt_message
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 41 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/lumi/aqara_opple_switch.py', function handle_mqtt_message
2022-01-10 08:02:18.318 Error: Zigbee2MQTT: ----> Line 31 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/adapter_with_battery.py', function convert_message
Anybody else experiencing these errors?

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 10 January 2022 9:36
by Nautilus
fvdp80 wrote: Monday 10 January 2022 8:45 Anybody else experiencing these errors?
Yeah, same here. Stas knows about it: https://github.com/stas-demydiuk/domoti ... -987894256

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 10 January 2022 10:30
by fvdp80
Ah, missed that one as it is marked as a closed issue.

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 17 January 2022 17:13
by Creo2005
Now, after update on Version: 2021.1 (build 14081)
In the Custom menu gone missing Zigbee2mqtt, only Plugins-Manager.

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 17 January 2022 19:52
by waltervl
Creo2005 wrote: Monday 17 January 2022 17:13 Now, after update on Version: 2021.1 (build 14081)
In the Custom menu gone missing Zigbee2mqtt, only Plugins-Manager.
Add the device "api_transport" in 'Setup -> Devices'. The device can be hidden by adding a "$" in front of the name.

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 17 January 2022 21:21
by Creo2005
Add MQTT auto discovery-MQTT Auto Discovery Client Gateway with LAN interface
and in log:

Code: Select all

2022-01-17 22:14:48.222 Error: CC2652P: 'onMessage' failed 'TypeError':''<' not supported between instances of 'NoneType' and 'int''.
2022-01-17 22:14:48.222 Error: CC2652P: Exception traceback:
2022-01-17 22:14:48.222 Error: CC2652P: ----> Line 298 in '/home/creo/domoticz/plugins/zigbee2mqtt/plugin.py'
2022-01-17 22:14:48.222 Error: CC2652P: ----> Line 137 in '/home/creo/domoticz/plugins/zigbee2mqtt/plugin.py'
2022-01-17 22:14:48.222 Error: CC2652P: ----> Line 167 in '/home/creo/domoticz/plugins/zigbee2mqtt/mqtt.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 214 in '/home/creo/domoticz/plugins/zigbee2mqtt/plugin.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 61 in '/home/creo/domoticz/plugins/zigbee2mqtt/devices_manager.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 64 in '/home/creo/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 193 in '/home/creo/domoticz/plugins/zigbee2mqtt/devices/device.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 172 in '/home/creo/domoticz/plugins/zigbee2mqtt/devices/device.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 33 in '/home/creo/domoticz/plugins/zigbee2mqtt/devices/temperature_humidity_barometer_sensor.py'
2022-01-17 22:14:48.223 Error: CC2652P: ----> Line 39 in '/home/creo/domoticz/plugins/zigbee2mqtt/devices/temperature_humidity_barometer_sensor.py'

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 17 January 2022 21:36
by waltervl
Creo2005 wrote: Monday 17 January 2022 21:21 Add MQTT auto discovery-MQTT Auto Discovery Client Gateway with LAN interface
That is not in the instructions to do that.....
Either use to plugin or use "MQTT Auto Discovery Client Gateway with LAN interface". This topic is about the plugin.
See for more info https://www.domoticz.com/wiki/Zigbee2MQTT

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 7:04
by Creo2005
waltervl wrote: Monday 17 January 2022 21:36 That is not in the instructions to do that.....
Either use to plugin or use "MQTT Auto Discovery Client Gateway with LAN interface". This topic is about the plugin.
See for more info https://www.domoticz.com/wiki/Zigbee2MQTT
It's not forbidden, so I'm asking the question because Zigbee2Mqtt plugin and MQTT Auto Discovery can work together.
But after install MQTT Auto Discovery I see errors Zigbee2Mqtt plugin in log Domoticz.

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 10:43
by EddyG
It's normal that you either use the zigbee2mqtt plugin OR MQTT Auto discovery, otherwise you get all zigbee devices double.
MQTT Auto discovery is the way to go for the future.

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 11:27
by Creo2005
EddyG wrote: Tuesday 18 January 2022 10:43 all zigbee devices double.
MQTT Auto discovery is the way to go for the future.
Not all - for example, my CO2 (DIYRuZ_AirSense Air quality sensor https://modkam.ru/?p=1715)) at this moment not working in Domoticz with zigbee2mqtt plugin and Auto discovery:
8 devices

Code: Select all

CC2652P	0x00124b001ec6c625 3 CO2 - (Pressure) General	Pressure 0.0 Bar
CC2652P 0x00124b001ec6c625 4 CO2 (Temperature + Humidity) Temp + Humidity THGN122/123/132, THGR122/228/238/268 0.0 C, 0 %
CC2652P 0x00124b001ec6c625 1 CO2 - (Temperature)	Temp LaCrosse TX3 0.0 C
CC2652P 0x00124b001ec6c625 2 CO2 - (Humidity) Humidity LaCrosse TX3 Humidity 0 %
CC2652P 0x00124b001ec6c625 7 CO2 - (led_feedback) Light/Switch Switch	Off. ---------------- 
CC2652P 0x00124b001ec6c625 5 CO2 (Temperature + Humidity + Barometer) Temp + Humidity + Baro	Weather Station 0,
CC2652P 0x00124b001ec6c625 6 CO2 - (co2) Air Quality Voltcraft CO-20 0 ppm
CC2652P 0x00124b001ec6c625 8 CO2 - (Link Quality)	General Custom Sensor 0 lqi
+ MQTT auto discovery
add 2 devices:

Code: Select all

MQTT auto discovery 0x00124b001ec6c625_switch_enable_abc_zigbee2mqtt 1 CO2 - enable_abc Light/Switch Switch On
MQTT auto discovery 0x00124b001ec6c625_switch_led_feedback_zigbee2mqtt 1 CO2 - led_feedback Light/Switch Switch On  ------------

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 11:34
by jvdz
When things aren't working it would help when it is reported and you supply the MQTT CONFIG & STATE update TOPICS & PAYLOADS, so it can be looked at!
PS: The sensors device only gets created after an update is received.

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 11:34
by EddyG
Probably you did not notice that there is a stable an a beta branch.
MQTT AD is currently only in the beta branch, so it is under development.
That could mean that there is still something missing which should and will be addressed.
If you have some serious issues about a device -> open an issue on github.
But still the statement is Zigbee2mqqt plugin OR MQTT AD

Edit and OFFtopic:
Creo2005 wrote: Tuesday 18 January 2022 11:27 Not all - for example, my CO2 (DIYRuZ_AirSense Air quality sensor https://modkam.ru/?p=1715)) at this moment not working in Domoticz with zigbee2mqtt plugin and Auto discovery:
The first sentence of the text of that link is totally INcorrect. CO2 is NOT carcinogen, he mixed things up with CO.

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 11:44
by Creo2005
jvdz wrote: Tuesday 18 January 2022 11:34 When things aren't working it would help when it is reported and you supply the MQTT CONFIG & STATE update TOPICS & PAYLOADS, so it can be looked at!
PS: The sensors device only gets created after an update is received.
What "sensors update is received"? What do you mean i'm new to this.
I am in beta:
Version: 2021.1 (build 14081)
Build Hash: 24e7b76a0
Compile Date: 2022-01-17 16:17:46
dzVents Version: 3.1.8
Python Version: 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0]

Re: Python Plugin: Zigbee2Mqtt

Posted: Tuesday 18 January 2022 13:00
by jvdz
When using the new MQTT AutoDiscovery available in the current Beta version, the Config MQTT payload is received and some devices are created at that stage like Lights/Switches. Sensor type devices are only created after the first data is received for that device via MQTT, as at time we are able to determine what type of Sensor it is by check the "unit_of_measurement" e.g. C/W/kWh.

Maybe a good start is to read up on MQTT and AutoDiscovery in the Wiki https://www.domoticz.com/wiki/MQTT#Add_ ... Gateway.22

Jos

Re: Python Plugin: Zigbee2Mqtt

Posted: Sunday 23 January 2022 19:51
by Hann1BaL
Since I had to replace my coordinator I did a clean sheet and removed the old database. Changed the configuration and paired all devices again.

Also that was the best moment to update Zigbee2MQTT, and the plugin.
That was not a great idea as the most recent version of the plugin is not supported in the stable release of Domoticz.

The result now is: Running on somewhat of an older branch made it work.
The web interface in Domoticz is not working. I worked around that by using the cli to pair the devices etc..

THe main problem I now still have:
groups with names ending on _ct and _dimmer are not imported and don't create devices. The group is functional as I also have a physical switch connected to the group, which works fine.

Have tried many different checkouts of the plugin and restarted domoticz, but I cant get it to work :(

Re: Python Plugin: Zigbee2Mqtt

Posted: Sunday 23 January 2022 20:11
by sammyke007
Hann1BaL wrote: Sunday 23 January 2022 19:51 Since I had to replace my coordinator I did a clean sheet and removed the old database. Changed the configuration and paired all devices again.

Also that was the best moment to update Zigbee2MQTT, and the plugin.
That was not a great idea as the most recent version of the plugin is not supported in the stable release of Domoticz.

The result now is: Running on somewhat of an older branch made it work.
The web interface in Domoticz is not working. I worked around that by using the cli to pair the devices etc..

THe main problem I now still have:
groups with names ending on _ct and _dimmer are not imported and don't create devices. The group is functional as I also have a physical switch connected to the group, which works fine.

Have tried many different checkouts of the plugin and restarted domoticz, but I cant get it to work :(
Release https://github.com/stas-demydiuk/domoti ... 8e3a492306 worked for me when I was still on stable. Any reason to not update to beta? I was always afraid to update my table Domoticz to beta, but it's rock solid since a few months on an older beta build 13872 (with the new framework supported).

Use

Code: Select all

cd domoticz/plugins/zigbee2mqtt
git reset --hard f8c22fc330229b39f06ff11bbfcea38e3a492306

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 24 January 2022 14:26
by Hann1BaL
sammyke007 wrote: Sunday 23 January 2022 20:11
Hann1BaL wrote: Sunday 23 January 2022 19:51
Release https://github.com/stas-demydiuk/domoti ... 8e3a492306 worked for me when I was still on stable. Any reason to not update to beta? I was always afraid to update my table Domoticz to beta, but it's rock solid since a few months on an older beta build 13872 (with the new framework supported).

Use

Code: Select all

cd domoticz/plugins/zigbee2mqtt
git reset --hard f8c22fc330229b39f06ff11bbfcea38e3a492306
I did go for beta. Reason not to do it: General risk of breaking things that are working.
So backup and go.
Upgraded the plugin to latest version as well, and domoticz to latest beta build. (using the updatebeta.sh )

I know have the join device tickbox in the Zigbee2MQTT menu. However, still the devices dont load.

The groups loaded but dont work.
There is a device 0 and device 1 in the list, based on the groups, but the groups have a friendly name.

Code: Select all

groups:

  '901':
    friendly_name: DinnerTable_ct
    retain: false
    transition: 0
    optimistic: true
    devices:
      - '0x680ae2fffe92ae2d'
      - '0x680ae2fffe819f83'
      - '0x680ae2fffe85c033'
      - '0x680ae2fffe3b5e05'

'1':
    friendly_name: Woonkamer_dimmer
    retain: false
    transition: 0
    optimistic: true
    devices:
      - '0x000b57fffe9beca6'
      - '0xec1bbdfffebcdf6c'
      - '0x680ae2fffe40db06'
      
I would expect 2 devices:
Woonkamer
Dinnertable

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 24 January 2022 17:40
by Hann1BaL
Ok, I have enabled the frontend of zigbee2MQTT itself to edit groups etc.

Created groups through the GUI. Now I see those groups imported into Domoticz.
Also the correct devices are created based on _dimmer and _ct
However, the slider of the brightness levels of those devices are broken. The do switch ON and OFF but the slider always states 0
Also the dimmer of this device: TRADFRI bulb E27 W opal 1000lm is broken and shows 0 and jumps back to 0.

Oh, and the webpage within Domoticz of the Zigbee2MQTT plugin is still completely broken.

What I did:
1. Updated Domoticz to BETA
2. Git checkout MASTER on the zigbee2mqtt plugin
3. Removed Zigbee2MQTT from the Hardware in Domoticz
4. Restarted Domoticz
5. Added the ZIgbee2MQTT hardware back to Domoticz (now the groups came in)


Had to refer to my Stable backup:
The mobile page layout turned into a big disaster. So couldnt use it on mobile.
Reverting back to stable made it work on all my mobile devices. Guess what: my desktop browsers (cleared cache and everything) now failing to load the devices.

Can't believe I cant get it to work anymore :(

Re: Python Plugin: Zigbee2Mqtt

Posted: Monday 24 January 2022 18:56
by sammyke007
Did you already add the device "api_transport" in Domoticz --> Settings --> Devices? You need to add it (green arrow). You can put a $ in front of the name to make it hidden. This fixes the custom Z2M menu in Domoticz normally.

Re: Python Plugin: Zigbee2Mqtt

Posted: Wednesday 02 February 2022 22:34
by darrepac
Hello

I have updated to latest stable (2022.1) and latest zigbee2mqtt ( I should have not as everything was working well before) and I have the following error in the log:
Error: Zigbee2MQTT: 'onCommand' failed 'TypeError':''NoneType' object is not subscriptable'.
2022-02-02 22:23:04.923 Error: Zigbee2MQTT: Exception traceback:
2022-02-02 22:23:04.924 Error: Zigbee2MQTT: ----> Line 302 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onCommand
2022-02-02 22:23:04.924 Error: Zigbee2MQTT: ----> Line 104 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onCommand
2022-02-02 22:24:01.300 Error: Zigbee2MQTT: 'onCommand' failed 'TypeError':''NoneType' object is not subscriptable'.
None of my devices are now working...
Any hint?
Thanks