Python Plugin: Zigbee2Mqtt Topic is solved

Python and python framework

Moderator: leecollings

StasDemydiuk
Posts: 59
Joined: Saturday 14 January 2017 21:37
Target OS: Linux
Domoticz version: Beta
Location: Ukraine
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by StasDemydiuk »

sach wrote: Thursday 07 February 2019 12:32 Hi Guys,

I have a Hive Active Plug which I have got working in zigbee2mqtt.
How can I get this supported by the plugin?

Sach
Hi Sach

Unfortunately I don't have any zigbee Plug with power measurement to implement proper support,
but you can create ticket for new device in plugin repository (https://github.com/stas-demydiuk/domoti ... gin/issues)
and attach all MQTT messages you have from your Hive device and I will try to implement support based on them.
sylar
Posts: 17
Joined: Saturday 15 April 2017 14:06
Target OS: Linux
Domoticz version: 4.10311
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by sylar »

Hi there.
zigbee2mqtt "just" introduced group support in its last version (see https://koenkk.github.io/zigbee2mqtt/in ... roups.html). I guess this is not yet supported by the plugin? Is this something which could be easily added?
The plugin could then create one new device per group, or either automatically create a scene.
sach
Posts: 111
Joined: Wednesday 12 October 2016 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by sach »

StasDemydiuk wrote: Thursday 07 February 2019 20:18
sach wrote: Thursday 07 February 2019 12:32 Hi Guys,

I have a Hive Active Plug which I have got working in zigbee2mqtt.
How can I get this supported by the plugin?

Sach
Hi Sach

Unfortunately I don't have any zigbee Plug with power measurement to implement proper support,
but you can create ticket for new device in plugin repository (https://github.com/stas-demydiuk/domoti ... gin/issues)
and attach all MQTT messages you have from your Hive device and I will try to implement support based on them.
Thanks, think i got it working.
'1613V' : OnOffSwitchAdapter, # Hive Active Plug

Seems to do the trick :-)
StasDemydiuk
Posts: 59
Joined: Saturday 14 January 2017 21:37
Target OS: Linux
Domoticz version: Beta
Location: Ukraine
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by StasDemydiuk »

Yes, but power management will not work
miroslavpetrov
Posts: 33
Joined: Wednesday 03 February 2016 13:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by miroslavpetrov »

Hey guys. Do you know if there is a way to completely disable zigbee2mqtt logging or at least minimise it. After the latest update, the zigbee2mqtt plugin writes 4 lines every 5 seconds in the log file and important information is missed...

Code: Select all

2019-02-19 01:36:09.077  (ZigBee) Device WSDCGQ01LM 0x00158d000215b30f (Sensor1)
2019-02-19 01:36:09.080  (ZigBee) Device WSDCGQ01LM 0x00158d0002090989 (Sensor2)
2019-02-19 01:36:09.082  (ZigBee) Device WSDCGQ01LM 0x00158d0002090992 (Sensor3)
2019-02-19 01:36:13.103  (ZigBee) Received available devices list from bridge
2019-02-19 01:36:13.104  (ZigBee) Device WSDCGQ01LM 0x00158d000215b30f (Sensor1)
2019-02-19 01:36:13.106  (ZigBee) Device WSDCGQ01LM 0x00158d0002090989 (Sensor2)
2019-02-19 01:36:13.108  (ZigBee) Device WSDCGQ01LM 0x00158d0002090992 (Sensor3)
2019-02-19 01:36:17.129  (ZigBee) Received available devices list from bridge
2019-02-19 01:36:17.129  (ZigBee) Device WSDCGQ01LM 0x00158d000215b30f (Sensor1)
2019-02-19 01:36:17.131  (ZigBee) Device WSDCGQ01LM 0x00158d0002090989 (Sensor2)
2019-02-19 01:36:17.133  (ZigBee) Device WSDCGQ01LM 0x00158d0002090992 (Sensor3)
Automation Hardware:
Domoticz on Raspberry Pi 3 with HomeBridge.
Zigbee2MQTT + Xiaomi sensors
Fibaro HomeCenter 2 + Fibaro Dimmer2 & Double Switch2 + Aeon Multisensor 6 + Remotec ZXT-120
Eastron SDM230
StasDemydiuk
Posts: 59
Joined: Saturday 14 January 2017 21:37
Target OS: Linux
Domoticz version: Beta
Location: Ukraine
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by StasDemydiuk »

It shouldn't behave like this, instead it should show this message only once at plugin start. I've already noticed such behavior couple times but cannot identify the root cause. Usually plugin restart helps.
meinname
Posts: 1
Joined: Sunday 24 February 2019 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by meinname »

Hi, i'm new to Domoticz and to this Plugin.
I just got a Philips Set with a RWL021 Dimmer Switch and a LWB010 E27 Dimmable Bulb.

I set up Domoticz and zigbee2mqtt and this plugin and got the Lamp in Domoticz working within Minutes. - Really impressive.
(Cause i tried it with NodeRed and Homebridge and with the first one it was very complicated and Homebridge doesn't Philips stuff yet with the native Plugin.)

But:
when i change the status with the Dimmer Switch Domoticz doesn't update the status.
Like when i turn on the Lamp via Domoticz and turn it off via the Switch i and i want to turn it on again with Domoticz i have to switch it off and on there.
Is there a way around this like polling the status of the lamp every few seconds?
SterkeJerke
Posts: 18
Joined: Friday 01 February 2019 20:57
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by SterkeJerke »

sylar wrote: Thursday 07 February 2019 20:31 Hi there.
zigbee2mqtt "just" introduced group support in its last version (see https://koenkk.github.io/zigbee2mqtt/in ... roups.html). I guess this is not yet supported by the plugin? Is this something which could be easily added?
The plugin could then create one new device per group, or either automatically create a scene.
Would be very nice, indeed.
Also the new "binding" option would be nice.
jjnj

Re: Python Plugin: Zigbee2Mqtt

Post by jjnj »

Hi all,

I get to following error trying to start the bridge software (zigbee2mqtt)

Code: Select all

 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/zigbee2mqtt/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bi$
9 verbose lifecycle [email protected]~start: CWD: /opt/zigbee2mqtt
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /opt/zigbee2mqtt
16 verbose Linux 4.14.98-v7+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v8.15.1
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
How can this be fixed?
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by jake »

@jjnj is this your first time trying the bridge software?
jjnj

Re: Python Plugin: Zigbee2Mqtt

Post by jjnj »

jake wrote: Tuesday 02 April 2019 16:41 @jjnj is this your first time trying the bridge software?
Yes!
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by jake »

jjnj wrote:
jake wrote: Tuesday 02 April 2019 16:41 @jjnj is this your first time trying the bridge software?
Yes!
I initially also had issues installing, while I followed the instructions line by line. I however had an error 139, while your log started error 1. By using the dev branch instead, I was able to get it working.

Since the error is different, it might be not the right solution for you.
https://github.com/Koenkk/zigbee2mqtt/i ... -475398505
pimseb
Posts: 42
Joined: Wednesday 13 September 2017 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: France
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by pimseb »

Hello,
I don't know if this has been discussed before. I use aqara motion sensors with zigbee2mqtt.
When I was using Xiaomi officilal getaway I was able to set a Off delay to the sensor, making the motion sensor going to off 5 seconds after motion detected. I had then that kind of log : Image
And domoticz had 5 ON and 5 OFF within one minute (at 20.36)

But with zigbee2mqtt python plugin, the 5 seconds OFF delay in domoticz device option doesn't work. It seems that the plugin waits until an off command has been sent from zigbee2mqtt usb sniffer.
So my domoticz log looks like :
2019-04-28 17:27:44 | Off
2019-04-28 17:19:02 | On
2019-04-28 17:15:58 | Off
2019-04-28 17:14:21 | On
2019-04-28 17:02:41 | Off
2019-04-28 17:00:48 | On
It can take a very long time for the motion device to go back to "off". In this example I left the room around 17:22 but the off signal was sent only at 17:27.
Is it a normal behaviour of the plugin ? I'm using them for an alarm so for me it's ok but if somebody wants to use them to turn on/off a lamp it is really long to react
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Python Plugin: Zigbee2Mqtt

Post by EddyG »

As far as I have seen the normal behaviour is that the device it self sends an 'Off' command to zigbee2mqtt 30 sec after it has send the 'On'.
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by nigels0 »

Is there a way to disable the logging? I’m concerned that it will grow too large as I’m using sensors that are reporting every minute or so.
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by salopette »

Set debug to false in Plugin setting
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by nigels0 »

Debug is false, but it still writes to log.txt - my question is about Zigbee2mqtt rather than the plugin I believe.
iganin
Posts: 47
Joined: Tuesday 28 October 2014 17:55
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Location: Aalter, Belgium
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by iganin »

I was trying to change the status of the ikea trådfri power plug when it's not reachable.
Strange thing that the status of the switch was changing accordingly while the log shows that there was an issue with delivery of the new command.
Is it a bug?
I'm really locking for the technology that has reliable support in terms of the status of the switch.


Log:

Code: Select all

2019-06-11 22:04:37.203 (Zigbee) MqttClient::publish zigbee2mqtt/0x000d6ffffefb0ec6/set ({"state": "OFF"})
2019-06-11 22:04:37.087 Status: User: Admin initiated a switch command (659/Zigbee - 0x000d6ffffefb0ec6/Off)
2019-06-11 22:04:40.846 (Zigbee) MqttClient::ping
2019-06-11 22:04:43.805 (Zigbee) MQTT message: zigbee2mqtt/bridge/log {'type': 'zigbee_publish_error', 'meta': {'entity': {'friendlyName': '0x000d6ffffefb0ec6', 'type': 'device', 'ID': '0x000d6ffffefb0ec6'}, 'message': '{"state": "OFF"}'}, 'message': 'Error: AF data request fails, status code: 233. MAC no ack.'}
corthebor
Posts: 13
Joined: Friday 16 October 2015 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by corthebor »

nigels0 wrote: Friday 03 May 2019 13:43 Is there a way to disable the logging? I’m concerned that it will grow too large as I’m using sensors that are reporting every minute or so.
I also wonder how I can minimize the logging of Zigbee2mqtt plugin, because it is too much and too often.
RoWolf
Posts: 2
Joined: Tuesday 02 July 2019 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Zigbee2Mqtt

Post by RoWolf »

Hello,
I'm new to zigbee2mqtt and got myself a CC2531 USB stick with some aquara stuff.
I used the https://www.domoticz.com/wiki/Zigbee2MQTT manual to install this on my pi

Everything went fine and a paired one device which now shows up in the zigbee2mqtt.service logging

I installed the zigbee2mqtt domoticz plugin, as stated as last step in the manual.
After installing the plugin i added zifbee2mqtt as a hardware device in domoticz, My domoticz started not responding anymore.

I could not access domoticz through the webinterface, although the status stated it was running. Webinterface did hardly load and if it said it was offline.

After manually removing the plugin, i could access domoticz again and remove the hardware also.
Tried this several times, because i was not sure i made the correct settings in the hardware (should i used the ip from the pi, or is localhost/127.0.0.1 also valid?), but i left al default so it should be ok. Still every time domoticz hung.

What could be the reason? Is there a minimal python version necessarry, currently running Python Version: 3.4.2
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest