Code Monkey home page Code Monkey logo

domoticz-zigbee2mqtt-plugin's People

Contributors

antoninocanta avatar arno0392 avatar bartrikers6224 avatar berenyibalazs avatar bramvreugd avatar bricamac avatar d-escape avatar davidlb avatar deennoo avatar emc2cube avatar enesbcs avatar fennec622 avatar flyingdomotic avatar heggink avatar hughb8on avatar janjaapko avatar jasonlim97 avatar kovainfo avatar luismalddonado avatar maaakit avatar milvert avatar mvzut avatar pafailler avatar pcurt avatar runenerg avatar sammyke007 avatar soulslider avatar stas-demydiuk avatar vladi1234 avatar wini83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

domoticz-zigbee2mqtt-plugin's Issues

Aqara Square Switch version misinterpretation

I have an Aqara Square Switch, which supports click, double_click, long_click_press and long_click_release

From Zigbee2MQTT:

Nov 01 14:33:37 housespirit npm[1946]: zigbee2mqtt:info 2018-11-1 14:33:37 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001e89451', payload: '{"battery":"100.00","voltage":3035,"linkquality":78,"click":"single"}'
Nov 01 14:33:46 housespirit npm[1946]: zigbee2mqtt:info 2018-11-1 14:33:46 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001e89451', payload: '{"battery":"100.00","voltage":3035,"linkquality":73,"click":"double"}'
Nov 01 14:33:50 housespirit npm[1946]: zigbee2mqtt:info 2018-11-1 14:33:50 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001e89451', payload: '{"battery":"100.00","voltage":3035,"linkquality":65,"action":"hold"}'
Nov 01 14:33:54 housespirit npm[1946]: zigbee2mqtt:info 2018-11-1 14:33:54 MQTT publish, topic: 'zigbee2mqtt/0x00158d0001e89451', payload: '{"battery":"100.00","voltage":3035,"linkquality":34,"action":"release"}'

From Domoticz through the Xiaomi Gateway:
{"cmd":"read_ack","model":"remote.b1acn01","sid":"158d0001e89451","short_id":59627,"data":"{"voltage":3115}"}
{"cmd":"report","model":"remote.b1acn01","sid":"158d0001e89451","short_id":59627,"data":"{"status":"double_click"}"}
{"cmd":"report","model":"remote.b1acn01","sid":"158d0001e89451","short_id":59627,"data":"{"status":"long_click_press"}"}
{"cmd":"report","model":"remote.b1acn01","sid":"158d0001e89451","short_id":59627,"data":"{"status":"long_click_release"}"}
{"cmd":"report","model":"remote.b1acn01","sid":"158d0001e89451","short_id":59627,"data":"{"status":"click"}"}

And it has been recognized incorrectly through the Zigbee2MQTT Plugin, giving me Off, Click, Double Click, Triple Click and Quadruple Click options.

Please, give an attention to the fact that there are a variety of versions of Aqara Square Switch. One of them has a gyro sensor, by the way

It must be presented like that:
aqarasquare02
aqarasquare01

But I've got this crap instead:
aqarasquare04
aqarasquare03

Support for Xiaomi Aqara single key wireless switch model WXKG11LM

click
MQTT publish, topic: 'zigbee2mqtt/0x00158d0002135dcb', payload: '{"click":"single","linkquality":165,"device":{"ieeeAddr":"0x00158d0002135dcb","friendlyName":"0x00158d0002135dcb","type":"EndDevice","nwkAddr":44841,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.remote.b1acn01\u0000\u0000\u0000\u0000\u0000\u0000","status":"online"}}'

MQTT publish, topic: 'zigbee2mqtt/0x00158d0002135dcb', payload: '{"click":"double","linkquality":162,"device":{"ieeeAddr":"0x00158d0002135dcb","friendlyName":"0x00158d0002135dcb","type":"EndDevice","nwkAddr":44841,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.remote.b1acn01\u0000\u0000\u0000\u0000\u0000\u0000","status":"online"}}'

action
MQTT publish, topic: 'zigbee2mqtt/0x00158d0002135dcb', payload: '{"action":"hold","linkquality":162,"device":{"ieeeAddr":"0x00158d0002135dcb","friendlyName":"0x00158d0002135dcb","type":"EndDevice","nwkAddr":44841,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.remote.b1acn01\u0000\u0000\u0000\u0000\u0000\u0000","status":"online"}}'

MQTT publish, topic: 'zigbee2mqtt/0x00158d0002135dcb', payload: '{"action":"release","linkquality":162,"device":{"ieeeAddr":"0x00158d0002135dcb","friendlyName":"0x00158d0002135dcb","type":"EndDevice","nwkAddr":44841,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.remote.b1acn01\u0000\u0000\u0000\u0000\u0000\u0000","status":"online"}}'

Support for Xiaomi Aqara single key wireless wall switch

Please add support for Xiaomi Aqara single key

MQTT message:
zigbee2mqtt/SingleClick {'click': 'single', 'linkquality': 115, 'device': {'type': 'EndDevice', 'modelId': 'lumi.sensor_86sw1\x00lu', 'friendlyName': 'SingleClick', 'manufId': 4151, 'ieeeAddr': '0x00158d00024b402d', 'nwkAddr': 21233, 'manufName': 'LUMI', 'powerSource': 'Battery', 'status': 'online'}}

GLEDOPTO GL-C-008 / GL-S-008Z

Device description
GLEDOPTO dimmer for rgbww strip / E27 RGBWW spot

MQTT message with device information
{"ieeeAddr":"0x00124b001b6aeae5","type":"Router","model":"GL-C-008","friendly_name":"Kleur_1"}]

support for IKEA Tradfri LED1623G12

Hi Stas, can you please take the support for IKEA Tradfri LED1623G12?
If you tell me how I can read the data from the, I'm happy to help!
Thank you

'onMessage' failed 'KeyError'

I've just set this up today using the latest version and i'm getting this error and I'm not seeing any devices in the Device list.

2018-10-27 16:26:14.010 Status: (Zigbee2MQTT) Started.
2018-10-27 16:26:14.215 Status: (Zigbee2MQTT) Entering work loop.
2018-10-27 16:26:14.215 Status: (Zigbee2MQTT) Initialized version 0.0.9
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) 'onMessage' failed 'KeyError'.
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) ----> Line 198 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) ----> Line 123 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) ----> Line 157 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish
2018-10-27 16:26:14.424 Error: (Zigbee2MQTT) ----> Line 23 in '/home/pi/domoticz/plugins/zigbee2mqtt/device_storage.py', function update

Thanks, Matt

Error: (Zigbee2MQTT) failed to load 'plugin.py',

Device description
Raspberry Pi with Domoticz 4.10200

MQTT message with device information
Nov 14 21:00:47 DOMOTICZ npm[756]: zigbee2mqtt:warn 11/14/2018, 9:00:47 PM permit_join set to true in configuration.yaml.
Nov 14 21:00:47 DOMOTICZ npm[756]: zigbee2mqtt:warn 11/14/2018, 9:00:47 PM Allowing new devices to join.
Nov 14 21:00:47 DOMOTICZ npm[756]: zigbee2mqtt:warn 11/14/2018, 9:00:47 PM Set permit_join to false once you joined all devices.
Nov 14 21:00:47 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:47 PM Zigbee: allowing new devices to join.
Nov 14 21:00:47 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:47 PM Connecting to MQTT server at mqtt://localhost
Nov 14 21:00:48 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:48 PM zigbee-shepherd ready
Nov 14 21:00:48 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:48 PM Connected to MQTT server
Nov 14 21:00:48 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:48 PM MQTT publish, topic: 'zigbee2m

MQTT messages from device
Nov 14 21:00:48 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:00:48 PM MQTT publish, topic: 'zigbee2mqtt/PIR-01', payload: '{"illuminance":0,"linkquality":152,"occupancy":false,"battery":"100.00","voltage":3175}'
Nov 14 21:51:16 DOMOTICZ npm[756]: zigbee2mqtt:info 11/14/2018, 9:51:16 PM MQTT publish, topic: 'zigbee2mqtt/PIR-01', payload: '{"illuminance":0,"linkquality":152,"occupancy":false,"battery":"100.00","voltage":3175}'

Domoticz Errors
2018-11-14 22:06:24.594 Error: (Zigbee2MQTT) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/zigbee2mqtt/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2018-11-14 22:06:24.594 Error: (Zigbee) Module Import failed, exception: 'SyntaxError'
2018-11-14 22:06:24.594 Error: (Zigbee) Import detail: File: /home/pi/domoticz/plugins/zigbee2mqtt/devices/switch/color_temp_dimmer_switch.py, Line: 48, offset: 14
2018-11-14 22:06:24.594 Error: (Zigbee) Error Line ' **args,
2018-11-14 22:06:24.594 '
2018-11-14 22:07:32.293 Error: Zigbee hardware (16) thread seems to have ended unexpectedly


For some reason my Domoticz installation doens't want to run the plugin. Ive installed a new Pythonlib 4.3 and everythings else seems to be working fine. Ive deleted the plugin and reinstalled it to no avail.

Plugin stop working

hi guys, issue come back:

when restart domoticz service, sometimes plugin start correctly but not receive data from zigbee2mqtt that send info right.

Cannot connect Trädfri lamps LED1623G12

I tried to add 2 Trädfri lamps LED1623G12 and both failed to connect. Also the suggested reset did not work. What can be the reason as it happens to both? I have installed Trädfri lamps before without any issue. #27

Xiaomi Smart Plug Error

When switching On/Off:

2018-10-27 13:44:06.265 Error: (Zigbee2MQTT) 'onMessage' failed 'TypeError':'int() argument must be a string, a bytes-like object or a number, not 'NoneType''.
2018-10-27 13:44:06.265 Error: (Zigbee2MQTT) ----> Line 198 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2018-10-27 13:44:06.265 Error: (Zigbee2MQTT) ----> Line 123 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage
2018-10-27 13:44:06.265 Error: (Zigbee2MQTT) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage
2018-10-27 13:44:06.265 Error: (Zigbee2MQTT) ----> Line 173 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish
2018-10-27 13:44:06.266 Error: (Zigbee2MQTT) ----> Line 15 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handleMqttMessage
2018-10-27 13:44:06.266 Error: (Zigbee2MQTT) ----> Line 75 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/device.py', function handle_message
2018-10-27 13:44:06.266 Error: (Zigbee2MQTT) ----> Line 9 in '/home/pi/domoticz/plugins/zigbee2mqtt/devices/voltage_sensor.py', function get_numeric_value

Support for OSRAM Smart+ Candle E14 Tunable White

MQTT message:
MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x84182600000e2869"}'

Message in Domoticz Log:
{'type': 'Router', 'friendly_name': '0x84182600000e2869', 'ieeeAddr': '0x84182600000e2869', 'model': 'AB32840'}

Xiaomi Window Sensor Multiple Devices?

Hi Guys

Finally got the components and go this up and running, very excited!

Anyway I've added my first device, a Xiaomi Window Sensor. Its added the device fine, but I also get two additional devices, one which is link quality and another which is battery voltage. Is this correct behaviour and can I remove these from Domoticz?
Also, if I remove these additionals, will the sensor alert Domoticz on Low battery?

Many Thanks

Josh

Xiaomi Wireless Switch bug

2018-10-19 08:54:34.939 Error: (CDevice_update) Button X: Failed to parse parameters: 'nValue', 'sValue', 'Image', 'SignalLevel', 'BatteryLevel', 'Options', 'TimedOut', 'Name', 'TypeName', 'Type', 'Subtype', 'Switchtype', 'Used', 'Description', 'Color' or 'SuppressTriggers' expected.
2018-10-19 08:54:34.939 Error: (Zigbee2MQTT) 'CDevice_update' failed 'TypeError':'argument 2 must be str, not int'.

Add Aqara Motion & Lux sensor

2018-9-28 22:26:20 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001e551f5', payload: '{"illuminance":19,"linkquality":13,"occupancy":true,"device":{"ieeeAddr":"0x00158d0001e551f5","friendlyName":"0x00158d0001e551f5","type":"EndDevice","nwkAddr":18081,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_motion.aq2","status":"online"}}'

Support for IKEA TRADFRI bulb E27 WS opal 980lm

MQTT message:
zigbee2mqtt/Led1545G12 {'state': 'ON', 'device': {'type': 'Router', 'modelId': 'TRADFRI bulb E27 WS opal 980lm', 'friendlyName': 'Led1545G12', 'manufId': 4476, 'ieeeAddr': '0xd0cf5efffe216e85', 'nwkAddr': 54317, 'manufName': 'IKEA of Sweden', 'powerSource': 'Mains (single phase)', 'status': 'online'}}

zigbee2mqtt/<DEVICE_ID>/set

{
  "state": "ON",   "brightness": 255,   "transition": 3, "color_temp": 50
}

Xiaomi Switch WXKG01LM - 'onMessage' failed 'ValueError':''long' is not in list'

(Zigbee2MQTT) Initialized version 0.0.2

After long click I have this error in log

2018-10-01 09:05:36.859 Error: (Zigbee2MQTT) 'onMessage' failed 'ValueError':''long' is not in list'.
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 166 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/plugin.py, function onMessage
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 107 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/plugin.py, function onMessage
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 126 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/mqtt.py, function onMessage
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 141 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/plugin.py, function onMQTTPublish
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 66 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/adapters/adapter.py, function handleMqttMessage
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 43 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/adapters/selector_switch.py, function update_device
2018-10-01 09:05:36.860 Error: (Zigbee2MQTT) ----> Line 16 in '/home/domoticz/domoticz/plugins/zigbee2mqtt/adapters/lumi/sensor_switch.py, function get_level_name

Ikea LED 1623G12 Error

2018-11-16 20:09:58.896 Status: User: Admin initiated a switch command (756/Zigbee Stick - 0x000b57fffe302fd0/Off)
2018-11-16 20:09:59.103 (Zigbee Stick) MQTT message: zigbee2mqtt/bridge/state offline
2018-11-16 20:09:59.103 (Zigbee Stick) Zigbee2mqtt bridge is offline
2018-11-16 20:10:03.612 (Zigbee Stick) MQTT message: zigbee2mqtt/bridge/state online
2018-11-16 20:10:03.612 (Zigbee Stick) Zigbee2mqtt bridge is online
2018-11-16 20:10:03.612 (Zigbee Stick) MqttClient::Publish zigbee2mqtt/bridge/config/devices ()
2018-11-16 20:10:03.612 (Zigbee Stick) MqttClient::Publish zigbee2mqtt/bridge/config/permit_join (true)
2018-11-16 20:10:03.612 (Zigbee Stick) Joining new devices is enabled on the zigbee bridge
2018-11-16 20:10:03.612 (Zigbee Stick) MQTT message: zigbee2mqtt/Terrarium Button {'device': {'nwkAddr': 63279, 'type': 'EndDevice', 'status': 'online', 'friendlyName': 'Terrarium Button', 'ieeeAddr': '0x00158d0001f9efde', 'manufId': 4151, 'modelId': 'lumi.sensor_swit', 'powerSource': 'Battery', 'manufName': 'LUMI'}, 'battery': 100, 'voltage': 3045, 'linkquality': 102}
2018-11-16 20:10:03.616 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - Aqara Button"
2018-11-16 20:10:03.616 (Zigbee Stick) MQTT message: zigbee2mqtt/Ikea Dimmer {'device': {'nwkAddr': 28454, 'type': 'EndDevice', 'status': 'offline', 'friendlyName': 'Ikea Dimmer', 'ieeeAddr': '0x000b57fffe2ba3da', 'manufId': 4476, 'modelId': 'TRADFRI wireless dimmer', 'powerSource': 'Battery', 'manufName': 'IKEA of Sweden'}, 'brightness': 0}
2018-11-16 20:10:03.616 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - Ikea Dimmer (Link Quality)"
2018-11-16 20:10:03.671 (Zigbee Stick) MQTT message: zigbee2mqtt/bridge/config/devices
2018-11-16 20:10:03.671 (Zigbee Stick) Unhandled message from zigbee2mqtt: zigbee2mqtt/bridge/config/devices
2018-11-16 20:10:03.672 (Zigbee Stick) MQTT message: zigbee2mqtt/bridge/config/permit_join True
2018-11-16 20:10:03.672 (Zigbee Stick) Unhandled message from zigbee2mqtt: zigbee2mqtt/bridge/config/permit_join True
2018-11-16 20:10:03.672 (Zigbee Stick) MQTT message: zigbee2mqtt/bridge/log {'message': [{'ieeeAddr': '0x00158d0001f9efde', 'friendly_name': 'Terrarium Button', 'type': 'EndDevice', 'model': 'WXKG12LM'}, {'ieeeAddr': '0x000b57fffe2ba3da', 'friendly_name': 'Ikea Dimmer', 'type': 'EndDevice', 'model': 'ICTC-G-1'}, {'ieeeAddr': '0x000b57fffe302fd0', 'friendly_name': '0x000b57fffe302fd0', 'type': 'Router', 'model': 'LED1623G12'}], 'type': 'devices'}
2018-11-16 20:10:03.672 (Zigbee Stick) Received available devices list from bridge
2018-11-16 20:10:03.672 (Zigbee Stick) Device WXKG12LM 0x00158d0001f9efde (Terrarium Button)
2018-11-16 20:10:03.672 (Zigbee Stick) Device ICTC-G-1 0x000b57fffe2ba3da (Ikea Dimmer)
2018-11-16 20:10:03.672 (Zigbee Stick) Device LED1623G12 0x000b57fffe302fd0 (0x000b57fffe302fd0)
2018-11-16 20:10:07.629 (Zigbee Stick) Heartbeating...
2018-11-16 20:10:07.629 (Zigbee Stick) MqttClient::Ping
2018-11-16 20:10:17.646 (Zigbee Stick) Heartbeating...
2018-11-16 20:10:17.646 (Zigbee Stick) MqttClient::Ping
2018-11-16 20:10:27.663 (Zigbee Stick) Heartbeating...
2018-11-16 20:10:27.663 (Zigbee Stick) MqttClient::Ping

Status update broken when debug disabled

I have a problem with an Osram plug and status update in domoticz when using the physical button on the Osram switch..

2018-12-08 20:38:17.250 (Zigbee2MQTT) Received 66 bytes of data
2018-12-08 20:38:17.250 (Zigbee2MQTT) 30 40 00 1e 7a 69 67 62 65 65 32 6d 71 74 74 2f 30 78 38 34 [email protected]/0x84
2018-12-08 20:38:17.250 (Zigbee2MQTT) 31 38 32 36 30 30 30 30 30 65 62 38 66 30 7b 22 73 74 61 74 182600000eb8f0{"stat
2018-12-08 20:38:17.250 (Zigbee2MQTT) 65 22 3a 22 4f 46 46 22 2c 22 6c 69 6e 6b 71 75 61 6c 69 74 e":"OFF","linkqualit
2018-12-08 20:38:17.250 (Zigbee2MQTT) 79 22 3a 38 31 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. y":81}
2018-12-08 20:38:17.251 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x84182600000eb8f0 {'linkquality': 81, 'state': 'OFF'}
2018-12-08 20:38:17.252 (Zigbee2MQTT - 0x84182600000eb8f0 (Link Quality)) Updating device from 84:'84' to have values 81:'81'.
2018-12-08 20:38:17.254 (Osram Plug) Updating device from 1:'On' to have values 0:'Off'.

The last line show it is working while having debug enabled, but when plugin debug is disabled the switch in domoticz does not change status when using the physical button on the switch.

Domoticz version 4.10266
Plugin dowloaded today.

Looking for the proper way to ignore unnecessary PIR switches

I have several RTCGQ11LM "Xiaomi Human Body Sensor" PIR's. They frequently send updates on the occupancy state which result in unnecessary On/Off events in Domoticz. Looking at the source code of your plugin I could not find a proper way to ignore the on/off events if Domoticz already has the correct state.

Could this be accomplished on a per-devicetype basis with the adapter files? There are other devices that do benefit from resending the same state (like buttons / remote controls), so I didn't want to change this behavior globally (like in plugin.py itself).
Besides, I still would want the plugin to update the battery and link status, just filter out the occupancy state when it is repeated.

Support MQTT broker authentication

Hi,
MQTT Broker can require auhentication and the plugin does not support it for the moment.
If I have time, I'll try to do a patch before end of year.
David

Suppotr 324131092621Philips Hue dimmer switch RWL021

Stas, can you please add 24131092621 Philips Hue dimmer switch.

2018-11-24 17:42:57.372 (Zigbee Stick) MQTT message: zigbee2mqtt/0x0017880103e4518f {'device': {'type': 'EndDevice', 'friendlyName': '0x0017880103e4518f', 'powerSource': 'Battery', 'manufId': 4107, 'status': 'offline', 'nwkAddr': 51236, 'manufName': 'Philips', 'modelId': 'RWL021', 'ieeeAddr': '0x0017880103e4518f'}, 'linkquality': 39, 'battery': 100, 'action': 'on'} 2018-11-24 17:42:57.376 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - 0x0017880103e4518f"

2018-11-24 17:43:49.629 (Zigbee Stick) MQTT message: zigbee2mqtt/0x0017880103e4518f {'device': {'type': 'EndDevice', 'friendlyName': '0x0017880103e4518f', 'powerSource': 'Battery', 'manufId': 4107, 'status': 'offline', 'nwkAddr': 51236, 'manufName': 'Philips', 'modelId': 'RWL021', 'ieeeAddr': '0x0017880103e4518f'}, 'linkquality': 52, 'battery': 100, 'action': 'off'} 2018-11-24 17:43:49.634 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - 0x0017880103e4518f"

2018-11-24 17:44:10.325 (Zigbee Stick) MQTT message: zigbee2mqtt/0x0017880103e4518f {'device': {'type': 'EndDevice', 'friendlyName': '0x0017880103e4518f', 'powerSource': 'Battery', 'manufId': 4107, 'status': 'offline', 'nwkAddr': 51236, 'manufName': 'Philips', 'modelId': 'RWL021', 'ieeeAddr': '0x0017880103e4518f'}, 'linkquality': 39, 'battery': 100, 'brightness': 100, 'action': 'up-press'} 2018-11-24 17:44:10.330 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - 0x0017880103e4518f" 2018-11-24 17:44:11.683 (Zigbee Stick) MQTT message: zigbee2mqtt/0x0017880103e4518f {'device': {'type': 'EndDevice', 'friendlyName': '0x0017880103e4518f', 'powerSource': 'Battery', 'manufId': 4107, 'status': 'offline', 'nwkAddr': 51236, 'manufName': 'Philips', 'modelId': 'RWL021', 'ieeeAddr': '0x0017880103e4518f'}, 'linkquality': 23, 'battery': 100, 'brightness': 150, 'action': 'up-press'} 2018-11-24 17:44:11.686 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - 0x0017880103e4518f"

2018-11-24 17:44:31.271 (Zigbee Stick) MQTT message: zigbee2mqtt/0x0017880103e4518f {'device': {'type': 'EndDevice', 'friendlyName': '0x0017880103e4518f', 'powerSource': 'Battery', 'manufId': 4107, 'status': 'offline', 'nwkAddr': 51236, 'manufName': 'Philips', 'modelId': 'RWL021', 'ieeeAddr': '0x0017880103e4518f'}, 'linkquality': 23, 'battery': 100, 'brightness': 100, 'action': 'down-press'} 2018-11-24 17:44:31.276 (Zigbee Stick) Received heartbeat message from device "Zigbee Stick - 0x0017880103e4518f" 2018-11-24 17:44:34.431 (Zigbee Stick) Heartbeating... 2018-11-24 17:44:34.431 (Zigbee Stick) MqttClient::Ping

WXKG12LM onMessage' failed 'TypeError

Hello Stas, problem with WXKG12LM

Version: 4.10111
Build Hash: 29095def

Initialized version 0.0.10

2018-10-28 07:25:31.984 (Zigbee Stick) MQTT message: zigbee2mqtt/0x00158d0001f9efde {'linkquality': 52, 'click': 'single', 'voltage': 3025, 'device': {'nwkAddr': 5778, 'powerSource': 'Battery', 'status': 'online', 'manufName': 'LUMI', 'modelId': 'lumi.sensor_swit', 'friendlyName': '0x00158d0001f9efde', 'ieeeAddr': '0x00158d0001f9efde', 'type': 'EndDevice', 'manufId': 4151}, 'battery': '99.00'} 2018-10-28 07:25:31.984 Error: (Zigbee Stick) 'onMessage' failed 'TypeError':''ZigbeeMessage' object is not subscriptable'. 2018-10-28 07:25:31.984 Error: (Zigbee Stick) ----> Line 200 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:31.984 Error: (Zigbee Stick) ----> Line 125 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:31.984 Error: (Zigbee Stick) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage 2018-10-28 07:25:31.984 Error: (Zigbee Stick) ----> Line 175 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish 2018-10-28 07:25:31.985 Error: (Zigbee Stick) ----> Line 12 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handleMqttMessage 2018-10-28 07:25:31.985 Error: (Zigbee Stick) ----> Line 22 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/lumi/WXKG12LM.py', function convert_message 2018-10-28 07:25:37.044 (Zigbee Stick) Heartbeating... 2018-10-28 07:25:37.044 (Zigbee Stick) MqttClient::Ping 2018-10-28 07:25:38.498 (Zigbee Stick) MQTT message: zigbee2mqtt/0x00158d0001f9efde {'linkquality': 78, 'click': 'double', 'voltage': 3025, 'device': {'nwkAddr': 5778, 'powerSource': 'Battery', 'status': 'online', 'manufName': 'LUMI', 'modelId': 'lumi.sensor_swit', 'friendlyName': '0x00158d0001f9efde', 'ieeeAddr': '0x00158d0001f9efde', 'type': 'EndDevice', 'manufId': 4151}, 'battery': '99.00'} 2018-10-28 07:25:38.498 Error: (Zigbee Stick) 'onMessage' failed 'TypeError':''ZigbeeMessage' object is not subscriptable'. 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 200 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 125 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 175 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 12 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handleMqttMessage 2018-10-28 07:25:38.498 Error: (Zigbee Stick) ----> Line 22 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/lumi/WXKG12LM.py', function convert_message 2018-10-28 07:25:46.312 (Zigbee Stick) MQTT message: zigbee2mqtt/0x00158d0001f9efde {'linkquality': 55, 'device': {'nwkAddr': 5778, 'powerSource': 'Battery', 'status': 'online', 'manufName': 'LUMI', 'modelId': 'lumi.sensor_swit', 'friendlyName': '0x00158d0001f9efde', 'ieeeAddr': '0x00158d0001f9efde', 'type': 'EndDevice', 'manufId': 4151}, 'voltage': 3025, 'action': 'shake', 'battery': '99.00'} 2018-10-28 07:25:46.313 Error: (Zigbee Stick) 'onMessage' failed 'TypeError':''ZigbeeMessage' object is not subscriptable'. 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 200 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 125 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMessage 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py', function onMessage 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 175 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py', function onMQTTPublish 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 12 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/base_adapter.py', function handleMqttMessage 2018-10-28 07:25:46.313 Error: (Zigbee Stick) ----> Line 24 in '/home/pi/domoticz/plugins/zigbee2mqtt/adapters/lumi/WXKG12LM.py', function convert_message 2018-10-28 07:25:47.065 (Zigbee Stick) Heartbeating... 2018-10-28 07:25:47.065 (Zigbee Stick) MqttClient::Ping

Support for Xiaomi Aqara (vibration, tilt, fall) Sensor DJT11LM

MQTT message: zigbee2mqtt/0x00158d0002b435ed {'action': 'vibration', 'device': {'ieeeAddr': '0x00158d0002b435ed', 'friendlyName': '0x00158d0002b435ed', 'modelId': 'lumi.vibration.aq1', 'status': 'online', 'powerSource': 'Battery', 'manufName': 'LUMI', 'manufId': 4151, 'nwkAddr': 837, 'type': 'EndDevice'}, 'voltage': 3145, 'linkquality': 134, 'battery': '100.00'}

MQTT message: zigbee2mqtt/0x00158d0002b435ed {'action': 'drop', 'device': {'ieeeAddr': '0x00158d0002b435ed', 'friendlyName': '0x00158d0002b435ed', 'modelId': 'lumi.vibration.aq1', 'status': 'online', 'powerSource': 'Battery', 'manufName': 'LUMI', 'manufId': 4151, 'nwkAddr': 837, 'type': 'EndDevice'}, 'voltage': 3145, 'linkquality': 134, 'battery': '100.00'}

MQTT message: zigbee2mqtt/0x00158d0002b435ed {'action': 'tilt', 'angle_y_absolute': 60, 'linkquality': 139, 'angle_x_absolute': 90, 'angle_y': 30, 'angle_x': 0, 'angle_z': 60, 'angle': 46, 'device': {'ieeeAddr': '0x00158d0002b435ed', 'friendlyName': '0x00158d0002b435ed', 'modelId': 'lumi.vibration.aq1', 'status': 'online', 'powerSource': 'Battery', 'manufName': 'LUMI', 'manufId': 4151, 'nwkAddr': 837, 'type': 'EndDevice'}}

MQTT message: zigbee2mqtt/0x00158d0002b435ed {'angle_y_absolute': 90, 'angle_z': 90, 'linkquality': 134, 'angle_x_absolute': 90, 'angle_y': 0, 'angle_x': 0, 'battery': '100.00', 'voltage': 3145, 'device': {'ieeeAddr': '0x00158d0002b435ed', 'friendlyName': '0x00158d0002b435ed', 'modelId': 'lumi.vibration.aq1', 'status': 'online', 'powerSource': 'Battery', 'manufName': 'LUMI', 'manufId': 4151, 'nwkAddr': 837, 'type': 'EndDevice'}}

Unsupported zigbee device type with model "DJT11LM"

MCCGQ11LM - aqara door sensor

Device description
MCCGQ11LM
aqara door sensor

MQTT message with device information
PUT here the device data you receive when publish message with topic
zigbee2mqtt/bridge/config/devices, as example

2018-10-28 16:06:37 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"devices","message":[{"ieeeAddr":"0x00158d00023866e9","type":"EndDevice","model":"MCCGQ11LM","friendly_name":"0x00158d00023866e9"}]}'

MQTT messages from device
Put here examples of MQTT messages with different states you've received from device, as example

node[shape=record];
  "0x00124b0018ed1bb0" [label="{0x00124b0018ed1bb0|Coordinator|No model information available|online}"];
  "0x00158d00023866e9" [label="{0x00158d00023866e9|EndDevice|Xiaomi Aqara door & window contact sensor (MCCGQ11LM)|online}"];
  "0x00158d00023866e9" -> "0x00124b0018ed1bb0" [label="36"]
}'
2018-10-28 16:12:06 - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"devices","message":[{"ieeeAddr":"0x00158d00023866e9","type":"EndDevice","model":"MCCGQ11LM","friendly_name":"0x00158d00023866e9"}]}'
2018-10-28 16:12:10 - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"devices","message":[{"ieeeAddr":"0x00158d00023866e9","type":"EndDevice","model":"MCCGQ11LM","friendly_name":"0x00158d00023866e9"}]}'
2018-10-28 16:12:14 - info: MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"devices","message":[{"ieeeAddr":"0x00158d00023866e9","type":"EndDevice","model":"MCCGQ11LM","friendly_name":"0x00158d00023866e9"}]}'
2018-10-28 16:17:11 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d00023866e9', payload: '{"contact":false,"linkquality":47}'
2018-10-28 16:17:13 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d00023866e9', payload: '{"contact":true,"linkquality":52}'

Innr 165 Bulb odd behaviour

I have an Innr 165 White bulb as part of my setup, it mostly works, however its status is reported weirdly in domoticz.
When i turn the light on at the socket, it comes on at full brightness (expected behavior), however Domoticz shows the light as off with the dimmer showing 0%. If i move the slider up to say 50%, the light will show as on and the light will dim. However if i then go back to adjust the light a short time later, it will show off and on 0% again (even though its on and at 50% for example). Its like something is just setting the display value to off but not actually triggering the bulb itself..?

Add Ikea Tradfri wireless dimmer

Hi, please add TRADFRI wireless dimmer
{"brightness":255,"device":{"ieeeAddr":"0x000b57fffe29ee14","friendlyName":"0x000b57fffe29ee14","type":"EndDevice","nwkAddr":6252,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Battery","modelId":"TRADFRI wireless dimmer","status":"online"}}

Error message in 0.0.12 for non supported device

I updated to 0.0.12 and have these error message in the domoticz log ?
The WXKG03LM was working correctly in previous versions? not true, my mistake

Did remove and create all devices already

2018-11-01 13:15:32.105 (ZMa) Device WXKG03LM 0x00158d00024b402d (0x00158d00024b402d)
2018-11-01 13:15:32.106 (ZMa) Creating domoticz device to handle "state" key for device with ieeeAddr 0x00158d00024b402d
2018-11-01 13:15:32.106 (ZMa) Device WXKG11LM 0x00158d0002135dcb (0x00158d0002135dcb)
2018-11-01 13:15:32.106 (ZMa) Device WXKG11LM 0x00158d0001ef879b (0x00158d0001ef879b)
2018-11-01 13:15:32.106 Error: Expected: myVar = Domoticz.Device(Name="myDevice", Unit=0, TypeName="", Type=0, Subtype=0, Switchtype=0, Image=0, Options={}, Used=1)
2018-11-01 13:15:32.106 Error: (ZMa) 'CDevice_init' failed 'TypeError':''subtype' is an invalid keyword argument for this function'.
2018-11-01 13:15:32.106 Error: Device creation failed, Device object is not associated with a plugin.

Xiaomi Mija Temp and Hum issue

The plugin shows separately temperature and humidity sensors, not giving them together. Moreover, no info about battery level.
zigbeeissue

Xiaomi MiJia wireless switch - "false click"

Hi,
I have found, that there is "false click" because Xiaomi switch sends heartbeat every hour.

HeartBeat message:

{
  "battery" : "100.00",
  "voltage" : 3042,
  "linkquality" : 115,
  "device" : {
    "ieeeAddr" : "0x00158d000228709c",
    "friendlyName" : "0x00158d000228709c",
    "type" : "EndDevice",
    "nwkAddr" : 29140,
    "manufId" : 4151,
    "manufName" : "LUMI",
    "powerSource" : "Battery",
    "modelId" : "lumi.sensor_switch",
    "status" : "online"
  }
}

Domoticz log:

2018-10-17 16:09:19.612 (Zigbee2MQTT) 30 32 32 38 37 30 39 63 22 2c 22 66 72 69 65 6e 64 6c 79 4e 0228709c","friendlyN
2018-10-17 16:09:19.612 (Zigbee2MQTT) 61 6d 65 22 3a 22 30 78 30 30 31 35 38 64 30 30 30 32 32 38 ame":"0x00158d000228
2018-10-17 16:09:19.612 (Zigbee2MQTT) 37 30 39 63 22 2c 22 74 79 70 65 22 3a 22 45 6e 64 44 65 76 709c","type":"EndDev
2018-10-17 16:09:19.612 (Zigbee2MQTT) 69 63 65 22 2c 22 6e 77 6b 41 64 64 72 22 3a 32 39 31 34 30 ice","nwkAddr":29140
2018-10-17 16:09:19.612 (Zigbee2MQTT) 2c 22 6d 61 6e 75 66 49 64 22 3a 34 31 35 31 2c 22 6d 61 6e ,"manufId":4151,"man
2018-10-17 16:09:19.612 (Zigbee2MQTT) 75 66 4e 61 6d 65 22 3a 22 4c 55 4d 49 22 2c 22 70 6f 77 65 ufName":"LUMI","powe
2018-10-17 16:09:19.613 (Zigbee2MQTT) 72 53 6f 75 72 63 65 22 3a 22 42 61 74 74 65 72 79 22 2c 22 rSource":"Battery","
2018-10-17 16:09:19.613 (Zigbee2MQTT) 6d 6f 64 65 6c 49 64 22 3a 22 6c 75 6d 69 2e 73 65 6e 73 6f modelId":"lumi.senso
2018-10-17 16:09:19.613 (Zigbee2MQTT) 72 5f 73 77 69 74 63 68 22 2c 22 73 74 61 74 75 73 22 3a 22 r_switch","status":"
2018-10-17 16:09:19.613 (Zigbee2MQTT) 6f 6e 6c 69 6e 65 22 7d 7d .. .. .. .. .. .. .. .. .. .. .. online"}}
2018-10-17 16:09:19.614 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x00158d000228709c {'voltage': 3042, 'device': {'type': 'EndDevice', 'powerSource': 'Battery', 'friendlyName': '0x00158d000228709c', 'status': 'online', 'manufName': 'LUMI', 'nwkAddr': 29140, 'modelId': 'lumi.sensor_switch', 'ieeeAddr': '0x00158d000228709c', 'manufId': 4151}, 'battery': '100.00', 'linkquality': 115}
2018-10-17 16:09:19.616 (Spínač) Updating device from 1:'10' to have values 1:'10'.

Click message:

{
  "battery" : "100.00",
  "voltage" : 3042,
  "linkquality" : 126,
  "click" : "single",
  "device" : {
    "ieeeAddr" : "0x00158d000228709c",
    "friendlyName" : "0x00158d000228709c",
    "type" : "EndDevice",
    "nwkAddr" : 29140,
    "manufId" : 4151,
    "manufName" : "LUMI",
    "powerSource" : "Battery",
    "modelId" : "lumi.sensor_switch",
    "status" : "online"
  }
}

Domoticz Log

2018-10-17 16:10:01.764 (Zigbee2MQTT) 30 c3 02 00 1e 7a 69 67 62 65 65 32 6d 71 74 74 2f 30 78 30 0�...zigbee2mqtt/0x0
2018-10-17 16:10:01.764 (Zigbee2MQTT) 30 31 35 38 64 30 30 30 32 32 38 37 30 39 63 7b 22 62 61 74 0158d000228709c{"bat
2018-10-17 16:10:01.764 (Zigbee2MQTT) 74 65 72 79 22 3a 22 31 30 30 2e 30 30 22 2c 22 76 6f 6c 74 tery":"100.00","volt
2018-10-17 16:10:01.764 (Zigbee2MQTT) 61 67 65 22 3a 33 30 34 32 2c 22 6c 69 6e 6b 71 75 61 6c 69 age":3042,"linkquali
2018-10-17 16:10:01.765 (Zigbee2MQTT) 74 79 22 3a 31 32 36 2c 22 63 6c 69 63 6b 22 3a 22 73 69 6e ty":126,"click":"sin
2018-10-17 16:10:01.765 (Zigbee2MQTT) 67 6c 65 22 2c 22 64 65 76 69 63 65 22 3a 7b 22 69 65 65 65 gle","device":{"ieee
2018-10-17 16:10:01.765 (Zigbee2MQTT) 41 64 64 72 22 3a 22 30 78 30 30 31 35 38 64 30 30 30 32 32 Addr":"0x00158d00022
2018-10-17 16:10:01.765 (Zigbee2MQTT) 38 37 30 39 63 22 2c 22 66 72 69 65 6e 64 6c 79 4e 61 6d 65 8709c","friendlyName
2018-10-17 16:10:01.765 (Zigbee2MQTT) 22 3a 22 30 78 30 30 31 35 38 64 30 30 30 32 32 38 37 30 39 ":"0x00158d000228709
2018-10-17 16:10:01.765 (Zigbee2MQTT) 63 22 2c 22 74 79 70 65 22 3a 22 45 6e 64 44 65 76 69 63 65 c","type":"EndDevice
2018-10-17 16:10:01.765 (Zigbee2MQTT) 22 2c 22 6e 77 6b 41 64 64 72 22 3a 32 39 31 34 30 2c 22 6d ","nwkAddr":29140,"m
2018-10-17 16:10:01.765 (Zigbee2MQTT) 61 6e 75 66 49 64 22 3a 34 31 35 31 2c 22 6d 61 6e 75 66 4e anufId":4151,"manufN
2018-10-17 16:10:01.765 (Zigbee2MQTT) 61 6d 65 22 3a 22 4c 55 4d 49 22 2c 22 70 6f 77 65 72 53 6f ame":"LUMI","powerSo
2018-10-17 16:10:01.766 (Zigbee2MQTT) 75 72 63 65 22 3a 22 42 61 74 74 65 72 79 22 2c 22 6d 6f 64 urce":"Battery","mod
2018-10-17 16:10:01.766 (Zigbee2MQTT) 65 6c 49 64 22 3a 22 6c 75 6d 69 2e 73 65 6e 73 6f 72 5f 73 elId":"lumi.sensor_s
2018-10-17 16:10:01.766 (Zigbee2MQTT) 77 69 74 63 68 22 2c 22 73 74 61 74 75 73 22 3a 22 6f 6e 6c witch","status":"onl
2018-10-17 16:10:01.766 (Zigbee2MQTT) 69 6e 65 22 7d 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. ine"}}
2018-10-17 16:10:01.767 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x00158d000228709c {'voltage': 3042, 'click': 'single', 'device': {'type': 'EndDevice', 'powerSource': 'Battery', 'friendlyName': '0x00158d000228709c', 'status': 'online', 'manufName': 'LUMI', 'nwkAddr': 29140, 'modelId': 'lumi.sensor_switch', 'ieeeAddr': '0x00158d000228709c', 'manufId': 4151}, 'battery': '100.00', 'linkquality': 126}
2018-10-17 16:10:01.768 (Spínač) Updating device from 1:'10' to have values 1:'10'.

Support for IKEA TRADFRI bulb E27 CWS opal 600lm

MQTT message:
zigbee2mqtt/0x90fd9ffffeea833d {'state': 'ON', 'device': {'type': 'Router', 'modelId': 'TRADFRI bulb E27 CWS opal 600lm', 'friendlyName': '0x90fd9ffffeea833d', 'manufId': 4476, 'ieeeAddr': '0x90fd9ffffeea833d', 'nwkAddr': 47867, 'manufName': 'IKEA of Sweden', 'powerSource': 'Mains (single phase)', 'status': 'online'}}

zigbee2mqtt/<DEVICE_ID>/set

{
  "state": "ON",   "brightness": 255,   "transition": 3,
  "color": {     // XY color     "x": 0.123,     "y": 0.123,
    // OR 
    // RGB color     "r": 46,     "g": 102,     "b": 193   }
}

transition specifies the number of seconds the transition to this state takes (0 by default).

When I tested this using mqtt-spy, I have to send for each attribute an single message?

Xiaomi Mijia Wireless Switch - Multiple events registered, maybe filter them?

Pressing the switch one time (long click in this example) results in multiple events in zigbee2mqtt and thus in domoticz. This device has a weak link because of the distance. Is this a problem which needs to be solved on the zigbee2mqtt side or can it be managed by the domoticz plugin? With the original gateway these problems are not existing.

2018-10-21 08:11:52 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:52 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:52 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:52 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:53 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:53 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"long_release","duration":238,"device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'
2018-10-21 08:11:53 - info: MQTT publish, topic: 'zigbee2mqtt/0x00158d0001f3772b', payload: '{"battery":"100.00","voltage":3022,"linkquality":0,"click":"single","device":{"ieeeAddr":"0x00158d0001f3772b","friendlyName":"0x00158d0001f3772b","type":"EndDevice","nwkAddr":32384,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_switch","status":"online"}}'

fail to add devices on my adapter (nanoleaf NL08_0800)

Hi,

I created a new adapter based on the base adapter for the Nanoleaf smart ivy NL08_0800 (supported by Zigbee2Mqtt) and took the following stepos:

created folder "nanoleaf" in "adapters"
copied "base_adaper.py" and renamed to "NL08_0800.py"

from adapters.base_adapter import Adapter
from devices.dimmer_switch import DimmerSwitch

class NL08_0800(Adapter):
    def __init__(self, devices):
        super().__init__(devices)
        self.devices.append(DimmerSwitch(devices, 'dimmer', 'brightness'))

next, I updated 'plugin.py':
from adapters.nanoleaf.NL08_0800 import NL08_0800
onStart method:

      self.adapter_by_model = {
           'NL08-0800': NL08_0800,  # Nanoleaf Ivy smart bulb

Then, I create the hardware in Domoticz (logging to 'debug'). I see the messages coming in from MQTT with the (in my case 3) bulbs in the device list:
2018-10-16 21:53:55.583 (Zigbee2MQTT) MQTT message: zigbee2mqtt/bridge/log {'message': [{'type': 'EndDevice', 'friendly_name': 'Bar1', 'model': 'NL08-0800', 'ieeeAddr': '0x000d6f000b4ab0c5'}, {'type': 'EndDevice', 'friendly_name': 'Bar2', 'model': 'NL08-0800', 'ieeeAddr': '0x000d6f000b49be9a'}, {'type': 'EndDevice', 'friendly_name': 'Bar3', 'model': 'NL08-0800', 'ieeeAddr': '0x000d6f000b49880c'}], 'type': 'devices'}
But no devices are being created. What am I doing wrong?

I obviously copied all files to the correct location. I'm running Domoticz v4.10051 on a Raspberry Pi 3. I updated Raspian yesterday.

Support for SmartThings Arrival Sensor

Device description
SmartThings Arrival Sensor STS-PRS-251 / STS-PRS-250

MQTT message with device information
PUT here the device data you receive when publish message with topic
zigbee2mqtt/bridge/config/devices, as example

{"ieeeAddr":"0x24fd5b0001056a99","type":"EndDevice","model":"tagv4","friendly_name":"Arrival Sensor"}

MQTT messages from device
Put here examples of MQTT messages with different states you've received from device, as example

 zigbee2mqtt:info 2018-11-24 02:12:33 MQTT publish, topic: 'zigbee2mqtt/Arrival Sensor', payload: '{"presence":true,"linkquality":49,"battery":"20.00","voltage":2600}'

MQTT state change commands
If device supports state change put MQTT topics + payload examples to change device state here

Support CC2530.ROUTER

Stas can you please Zigbee router integrate

2018-12-20 21:23:39.836 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'NEIGHBOR', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '23304/0x90FD9FFFFE164FE7', 'state': False, 'linkquality': 26, 'rssi': 43} 2018-12-20 21:23:39.836 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER" 2018-12-20 21:23:39.837 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'COORD', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '0/0x00124B0014D9D6F9', 'state': False, 'linkquality': 23, 'rssi': 27} 2018-12-20 21:23:39.837 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER" 2018-12-20 21:23:39.938 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'CHILD_RFD', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '28454/0x000B57FFFE2BA3DA', 'state': False, 'linkquality': 26, 'rssi': 170} 2018-12-20 21:23:39.938 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER" 2018-12-20 21:23:39.938 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'CHILD_FFD_RXI', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '51639/0x000B57FFFE302FD0', 'state': False, 'linkquality': 26, 'rssi': 1} 2018-12-20 21:23:39.938 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER" 2018-12-20 21:23:39.938 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'NEIGHBOR', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '25051/0x000B57FFFEEC7449', 'state': False, 'linkquality': 26, 'rssi': 1} 2018-12-20 21:23:39.938 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER" 2018-12-20 21:23:39.939 (Zigbee Stick) MQTT message: zigbee2mqtt/Router {'type': 'NEIGHBOR', 'device': {'type': 'Router', 'powerSource': 'Mains (single phase)', 'status': 'online', 'manufName': 'LUMI', 'manufId': 4447, 'ieeeAddr': '0x00124b0018ed3e7b', 'friendlyName': 'Router', 'nwkAddr': 2536, 'modelId': 'lumi.router'}, 'description': '23304/0x90FD9FFFFE164FE7', 'state': False, 'linkquality': 26, 'rssi': 42} 2018-12-20 21:23:39.939 (Zigbee Stick) Unsupported zigbee device type with model "CC2530.ROUTER"

Support for Domoticz's Log

I don't see any events from zigbee2mqtt plugin in Domoticz log. So need to have another tool or open Linux console to see the output from Zigbee2mqtt. It would be useful to get zigbee2mqtt events in Domoticz itself to see relationships between different events in the system.

Support for JTYJ-GD-01LM/BW Xiaomi MiJia Honeywell smoke detector (smoke)

Device description

Xiaomi MiJia Honeywell smoke detector (smoke)

MQTT message with device information
From pressing the test-button
2018-12-10 16:04:49 - info: MQTT publish, topic: 'zigbee2mqtt/Smoke', payload: '{"battery":100,"voltage":3075,"linkquality":81,"device":{"ieeeAddr":"0x00158d0001d64498","friendlyName":"Smoke","type":"EndDevice","nwkAddr":34503,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_smoke","status":"online"},"smoke":false}'
2018-12-10 16:04:50 - info: MQTT publish, topic: 'zigbee2mqtt/Smoke', payload: '{"battery":100,"voltage":3075,"linkquality":81,"device":{"ieeeAddr":"0x00158d0001d64498","friendlyName":"Smoke","type":"EndDevice","nwkAddr":34503,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_smoke","status":"online"},"smoke":false}'
2018-12-10 16:04:50 - info: MQTT publish, topic: 'zigbee2mqtt/Smoke', payload: '{"battery":100,"voltage":3075,"linkquality":84,"device":{"ieeeAddr":"0x00158d0001d64498","friendlyName":"Smoke","type":"EndDevice","nwkAddr":34503,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.sensor_smoke","status":"online"},"smoke":false}'

MQTT messages from device
Same as above.

**MQTT state change commands**
Not applicable

'onMessage' failed 'KeyError'

Aqara Door Sensor

On:

2018-09-28 19:05:35.375 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x00158d00020921ca {'battery': '88.33', 'voltage': 2965, 'linkquality': 0, 'contact': True}

These errors happen:

2018-09-28 19:05:35.376 Error: (Zigbee2MQTT) 'onMessage' failed 'KeyError'.
2018-09-28 19:05:35.376 Error: (Zigbee2MQTT) ----> Line 160 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py, function onMessage
2018-09-28 19:05:35.376 Error: (Zigbee2MQTT) ----> Line 106 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py, function onMessage
2018-09-28 19:05:35.376 Error: (Zigbee2MQTT) ----> Line 126 in '/home/pi/domoticz/plugins/zigbee2mqtt/mqtt.py, function onMessage
2018-09-28 19:05:35.377 Error: (Zigbee2MQTT) ----> Line 131 in '/home/pi/domoticz/plugins/zigbee2mqtt/plugin.py, function onMQTTPublish
2018-09-28 19:05:35.378 Error: (Zigbee2MQTT) ----> Line 12 in '/home/pi/domoticz/plugins/zigbee2mqtt/zigbee_message.py, function get_device_model

Same for contact: False event.

No device is being created under devices.

Plugin stop working

Hi, my zigbee2mqtt service works perfectly and send regular updates but my domoticz plugin after a while stops working and seems not to receive data, anyone that have this issue?
Thanks

problema con el progin

My problem is the following:

2018-11-19 22:10:51.242 (Dispositivo_Xiaomi) Heartbeating...
2018-11-19 22:10:51.242 (Dispositivo_Xiaomi) Reconnecting
2018-11-19 22:10:51.242 (Dispositivo_Xiaomi) MqttClient::Open
2018-11-19 22:10:51.293 (Dispositivo_Xiaomi) onConnect called
2018-11-19 22:10:51.293 (Dispositivo_Xiaomi) MQTT connected successfully.
2018-11-19 22:10:51.294 (Dispositivo_Xiaomi) MqttClient::Connect
2018-11-19 22:10:51.294 (Dispositivo_Xiaomi) MQTT CONNECT ID: 'Domoticz_1542661851'
2018-11-19 22:10:51.345 (Dispositivo_Xiaomi) MqttClient::Subscribe
2018-11-19 22:10:51.345 (Dispositivo_Xiaomi) MqttClient::onDisonnect Disconnected from: localhost:1883
2018-11-19 22:10:51.345 (Dispositivo_Xiaomi) MqttClient::Close
2018-11-19 22:10:51.345 (Dispositivo_Xiaomi) onMQTTDisconnected
2018-11-19 22:10:51.345 Error: (Dispositivo_Xiaomi) No transport, write directive to 'localhost' ignored.

in homeassistant it works fine, so if the problem is with the plugin, I understand

Xiaomi Smart Plug (ZNCZ02LM )

There are a problem with (Xiaomi Smart Plug), the plug works correctly, but the measures don't show in Domoticz.

Versions:
Zigbee2MQTT server : 0.2.0
Zigbee2MQTT domoticz plugin: 0.0.15

Logs:
server
: 2018-12-3 20:42:53 - info: MQTT publish, topic: 'zigbee2mqtt/enchufe_kodi', payload: '{"state":"ON","linkquality":52,"power":1.16,"voltage":null,"consumption":45.28,"temperature":33}'
plugin
2018-12-03 20:42:53.156 (Zigbee2MQTT) Received 124 bytes of data 2018-12-03 20:42:53.157 (Zigbee2MQTT) 30 7a 00 18 7a 69 67 62 65 65 32 6d 71 74 74 2f 65 6e 63 68 0z..zigbee2mqtt/ench 2018-12-03 20:42:53.157 (Zigbee2MQTT) 75 66 65 5f 6b 6f 64 69 7b 22 73 74 61 74 65 22 3a 22 4f 4e ufe_kodi{"state":"ON 2018-12-03 20:42:53.157 (Zigbee2MQTT) 22 2c 22 6c 69 6e 6b 71 75 61 6c 69 74 79 22 3a 35 32 2c 22 ","linkquality":52," 2018-12-03 20:42:53.157 (Zigbee2MQTT) 70 6f 77 65 72 22 3a 31 2e 31 36 2c 22 76 6f 6c 74 61 67 65 power":1.16,"voltage 2018-12-03 20:42:53.158 (Zigbee2MQTT) 22 3a 6e 75 6c 6c 2c 22 63 6f 6e 73 75 6d 70 74 69 6f 6e 22 ":null,"consumption" 2018-12-03 20:42:53.158 (Zigbee2MQTT) 3a 34 35 2e 32 38 2c 22 74 65 6d 70 65 72 61 74 75 72 65 22 :45.28,"temperature" 2018-12-03 20:42:53.158 (Zigbee2MQTT) 3a 33 33 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. :33} 2018-12-03 20:42:53.159 (Zigbee2MQTT) MQTT message: zigbee2mqtt/enchufe_kodi {'power': 1.16, 'consumption': 45.28, 'linkquality': 52, 'state': 'ON', 'temperature': 33, 'voltage': None} 2018-12-03 20:42:53.161 (Zigbee2MQTT - enchufe_kodi (Link Quality)) Updating device from 49:'49' to have values 52:'52'. 2018-12-03 20:42:53.167 (Enchufe Kodi) Updating device from 1:'On' to have values 1:'On'. 2018-12-03 20:42:53.190 (Zigbee2MQTT - enchufe_kodi) Updating device from 1:'1.12' to have values 1:'1.16'.

captura

Item 206 doesn't show the flash, and consumption is 0,0

Any suggestion??

IKEA TRADFRI control outlet (E1603)

Device description
Put general device information here

MQTT message with device information
PUT here the device data you receive when publish message with topic
zigbee2mqtt/bridge/config/devices, as example

  "0xd0cf5efffe6d24eb" [label="{0xd0cf5efffe6d24eb|Router|IKEA TRADFRI control outlet (E1603)|online}"];
  "0xd0cf5efffe6d24eb" -> "0x00124b0018ed1bb0" [label="1"]

{"ieeeAddr":"0xd0cf5efffe6d24eb","type":"Router","model":"E1603","friendly_name":"0xd0cf5efffe6d24eb"}]}'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.