stas-demydiuk / domoticz-zigbee2mqtt-plugin

zigbee2mqtt plugin for domoticz
MIT License
136 stars 98 forks source link

Domoticz features not being added for certain devices #719

Closed russdan closed 2 years ago

russdan commented 3 years ago

Issue description Having upgraded to latest v3.1.0 beta some devices have no Domoticz features created even though the device appears in the zigbee2mqtt custom page and api_transport. So far I have:

  1. Deleted zigbee2mqtt from Hardware tab and therefore removed all devices from Domoticz; re-added zigbee2mqtt hardware - same issue
  2. Deleted zigbee2mqtt from Hardware tab, stopped Domoticz, deleted the plugin completely from Domoticz plugins, git cloned fresh plugin, restarted Domoticz, re-added zigbee2mqtt hardware - same issue
  3. Deleted a sensor without any Domoticz devices and re-added via 'pair new device' - same issue

Some of the same model of zigbee sensors have Domoticz devices, some have nothing. These sensors were all working and recognised prior to the upgrade to v3.1.0 beta.

Looking at the Plugin Configuration tab the devices with no features are missing (see log from plugin configuration in logs section).

Full device list:

Bathroom Light Button   SNZB-01 Wireless button EndDevice   0x00124b001f8ac44a
* Bathroom PIR  RTCGQ11LM   Aqara human body movement and illuminance sensor    EndDevice   0x00158d0004876875
Bedroom Light   ZBMINI  Zigbee two way smart switch Router  0x847127fffe95f838
Bedroom Light Button    SNZB-01 Wireless button EndDevice   0x00124b001f9162d8
Coordinator N/A N/A Coordinator 0x00124b002291d411
Dining Room Light   TS0011  Smart light switch - 1 gang EndDevice   0x847127fffef7cc8b
* Downstairs Smoke Detector TS0205  Smoke sensor    EndDevice   0x847127fffe9c1648
* Downstairs Toilet PIR RTCGQ11LM   Aqara human body movement and illuminance sensor    EndDevice   0x00158d0004514c0e
Electricity Meter   ZHEMI101    Energy meter    EndDevice   0x0015bc001b021c22
* Garage PIR    RTCGQ01LM   MiJia human body movement sensor    EndDevice   0x00158d000632d41c
* Garage_Light  ZBMINI  Zigbee two way smart switch Router  0x84fd27fffe9280e9
* Hive Controller   SLR2    Dual channel heating and hot water thermostat   Router  0x001e5e090209cd73
Hive Thermostat SLT3    Heating thermostat remote control   EndDevice   0x001e5e090217847d
J Bedroom Light ZBMINI  Zigbee two way smart switch Router  0x847127fffe280f13
J Room Radiator TS0601_thermostat   Radiator valve with thermostat  EndDevice   0x847127fffe9f2a45
Kitchen PIR RTCGQ11LM   Aqara human body movement and illuminance sensor    EndDevice   0x00158d00054d2f08
* Landing Smoke Detector    TS0205  Smoke sensor    EndDevice   0x5c0272fffec1b6c0
Living Room Light   ZBMINI  Zigbee two way smart switch Router  0xb4e3f9fffeb1b388
* Living Room Light Switch  WXKG02LM_rev2   Aqara double key wireless wall switch (2018 model)  EndDevice   0x00158d0003faaa79
* Living Room PIR   RTCGQ11LM   Aqara human body movement and illuminance sensor    EndDevice   0x00158d00054bc5f9
ti Router   ti.router   Texas Instruments router    Router  0x00124b00219fb3b9

Devices marked with a * have no Domoticz features. Even devices of the same type have some which are OK and some which aren't, for example 00158d00054d2f08 is a RTCGQ11LM PIR which has all its Domoticz features, but 0x00158d0004876875, 0x00158d000632d41c, 0x00158d0004514c0e and 0x00158d00054d2f08 are missing all Domoticz features...

All of the devices appear in the api_transport device, for example: "friendly_name": "Garage PIR", "ieee_address": "0x00158d000632d41c", "interview_completed": true, "interviewing": false, "manufacturer": "LUMI", "model_id": "lumi.sensor_motion", "network_address": 5685, "power_source": "Battery", "supported": true, "type": "EndDevice"}, {"definition": {"description": "Aqara human body movement and illuminance sensor", "exposes": [{"access": 1, "description": "Remaining battery in %", "name": "battery", "property": "battery", "type": "numeric", "unit": "%", "value_max": 100, "value_min": 0}, {"access": 1, "description": "Indicates whether the device detected occupancy", "name": "occupancy", "property": "occupancy", "type": "binary", "value_off": false, "value_on": true}, {"access": 1, "description": "Measured temperature value", "name": "temperature", "property": "temperature", "type": "numeric", "unit": "\u00b0C"}, {"access": 1, "description": "Voltage of the battery in millivolts", "name": "voltage", "property": "voltage", "type": "numeric", "unit": "mV"}, {"access": 1, "description": "Measured illuminance in lux", "name": "illuminance_lux", "property": "illuminance", "type": "numeric", "unit": "lx"}, {"access": 1, "description": "Measured illuminance in lux", "name": "illuminance", "property": "illuminance", "type": "numeric", "unit": "lx"}, {"access": 1, "description": "Link quality (signal strength)", "name": "linkquality", "property": "linkquality", "type": "numeric", "unit": "lqi", "value_max": 255, "value_min": 0}], "model": "RTCGQ11LM", "supports_ota": false, "vendor": "Xiaomi"}, "endpoints": {"1": {"bindings": [], "clusters": {"input": [], "output": []}

Additional information Zigbee2MQTT version: 1.21.1 commit: 4a51e0c0 Python version: PluginSystem: Python version '3.7.3'. Domoticz version: Domoticz V2021.1 (build 13639) (c)2012-2021 GizMoCuz Status: Build Hash: d20f51ba2, Date: 2021-09-29 06:58:52 Plugin version: plugin: v.3.1.0-beta, zigbee2mqtt: v.1.21.1 (zStack3x0 20210319)

Logs Attach any additional logs here which might be useful: mqtt, domoticz, plugin logs

{
    "aliases": [
        {
            "domoticz": {
                "device_id": "0x847127fffe95f838",
                "legacy_alias": "state",
                "unit": 1
            },
            "zigbee": {
                "address": "0x847127fffe95f838",
                "endpoint": "n/a",
                "feature": "state"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe95f838",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0x847127fffe95f838",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "signal",
                "unit": 1
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "signal"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "cell",
                "unit": 2
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "cell"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "btperc",
                "unit": 3
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "btperc"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "mode",
                "unit": 4
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "mode"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "preset",
                "unit": 5
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "preset"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "week",
                "unit": 6
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "week"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "spoint",
                "unit": 7
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "spoint"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "sp_eco",
                "unit": 8
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "sp_eco"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "sp_cmf",
                "unit": 9
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "sp_cmf"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "temp",
                "unit": 10
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "temp"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "level",
                "unit": 11
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "level"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "wnd",
                "unit": 12
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "wnd"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe9f2a45",
                "legacy_alias": "child",
                "unit": 13
            },
            "zigbee": {
                "address": "0x847127fffe9f2a45",
                "endpoint": "n/a",
                "feature": "child"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b00219fb3b9",
                "legacy_alias": "signal",
                "unit": 1
            },
            "zigbee": {
                "address": "0x00124b00219fb3b9",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f9162d8",
                "legacy_alias": "btperc",
                "unit": 1
            },
            "zigbee": {
                "address": "0x00124b001f9162d8",
                "endpoint": "n/a",
                "feature": "battery"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f9162d8",
                "legacy_alias": "actio",
                "unit": 2
            },
            "zigbee": {
                "address": "0x00124b001f9162d8",
                "endpoint": "n/a",
                "feature": "action"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f9162d8",
                "legacy_alias": "signal",
                "unit": 3
            },
            "zigbee": {
                "address": "0x00124b001f9162d8",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffef7cc8b",
                "legacy_alias": "state",
                "unit": 1
            },
            "zigbee": {
                "address": "0x847127fffef7cc8b",
                "endpoint": "n/a",
                "feature": "state"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffef7cc8b",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0x847127fffef7cc8b",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe280f13",
                "legacy_alias": "state",
                "unit": 1
            },
            "zigbee": {
                "address": "0x847127fffe280f13",
                "endpoint": "n/a",
                "feature": "state"
            }
        },
        {
            "domoticz": {
                "device_id": "0x847127fffe280f13",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0x847127fffe280f13",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f8ac44a",
                "legacy_alias": "btperc",
                "unit": 1
            },
            "zigbee": {
                "address": "0x00124b001f8ac44a",
                "endpoint": "n/a",
                "feature": "battery"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f8ac44a",
                "legacy_alias": "actio",
                "unit": 2
            },
            "zigbee": {
                "address": "0x00124b001f8ac44a",
                "endpoint": "n/a",
                "feature": "action"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00124b001f8ac44a",
                "legacy_alias": "signal",
                "unit": 3
            },
            "zigbee": {
                "address": "0x00124b001f8ac44a",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0xb4e3f9fffeb1b388",
                "legacy_alias": "state",
                "unit": 1
            },
            "zigbee": {
                "address": "0xb4e3f9fffeb1b388",
                "endpoint": "n/a",
                "feature": "state"
            }
        },
        {
            "domoticz": {
                "device_id": "0xb4e3f9fffeb1b388",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0xb4e3f9fffeb1b388",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x001e5e090217847d",
                "legacy_alias": "btperc",
                "unit": 1
            },
            "zigbee": {
                "address": "0x001e5e090217847d",
                "endpoint": "n/a",
                "feature": "battery"
            }
        },
        {
            "domoticz": {
                "device_id": "0x001e5e090217847d",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0x001e5e090217847d",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x0015bc001b021c22",
                "legacy_alias": "power",
                "unit": 1
            },
            "zigbee": {
                "address": "0x0015bc001b021c22",
                "endpoint": "n/a",
                "feature": "power"
            }
        },
        {
            "domoticz": {
                "device_id": "0x0015bc001b021c22",
                "legacy_alias": "signal",
                "unit": 2
            },
            "zigbee": {
                "address": "0x0015bc001b021c22",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "temp",
                "unit": 1
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "temperature"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "btperc",
                "unit": 2
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "battery"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "motion",
                "unit": 3
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "occupancy"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "volt",
                "unit": 4
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "voltage"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "lx",
                "unit": 5d
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "illuminance"
            }
        },
        {
            "domoticz": {
                "device_id": "0x00158d00054d2f08",
                "legacy_alias": "signal",
                "unit": 6
            },
            "zigbee": {
                "address": "0x00158d00054d2f08",
                "endpoint": "n/a",
                "feature": "linkquality"
            }
        }
    ]
}

domoticz.log for the start-up phase of the plugin:

2021-09-29 07:52:47.555  Status: zigbee2mqtt: (zigbee2mqtt) Entering work loop.
2021-09-29 07:52:47.555  zigbee2mqtt hardware started.
2021-09-29 07:52:47.555  Status: zigbee2mqtt: (zigbee2mqtt) Started.
2021-09-29 07:52:47.983  Status: zigbee2mqtt: (zigbee2mqtt) Initialized version 3.1.0-beta
2021-09-29 07:52:47.986  zigbee2mqtt: (zigbee2mqtt) Debug logging mask set to: PYTHON
2021-09-29 07:52:47.987  zigbee2mqtt: (zigbee2mqtt) Installing plugin custom page...
2021-09-29 07:52:47.987  zigbee2mqtt: (zigbee2mqtt) Copying files from /home/pi/domoticz/plugins/zigbee2mqtt/frontend to /home/pi/domoticz/www/templates
2021-09-29 07:52:48.010  zigbee2mqtt: (zigbee2mqtt) Installing plugin custom page completed.
2021-09-29 07:52:48.010  zigbee2mqtt: (zigbee2mqtt) MqttClient::__init__
2021-09-29 07:52:48.010  zigbee2mqtt: (zigbee2mqtt) MqttClient::open
2021-09-29 07:52:48.063  zigbee2mqtt: (zigbee2mqtt) onConnect called
2021-09-29 07:52:48.063  zigbee2mqtt: (zigbee2mqtt) Connected to MQTT Server: 192.168.0.197:1883
2021-09-29 07:52:48.063  zigbee2mqtt: (zigbee2mqtt) MQTT CLIENT ID: 'Domoticz_1632898368_9499'
2021-09-29 07:52:48.114  zigbee2mqtt: (zigbee2mqtt) MqttClient::subscribe
2021-09-29 07:52:48.165  zigbee2mqtt: (zigbee2mqtt) Subscribed to "zigbee2mqtt/#" topic
2021-09-29 07:52:48.166  zigbee2mqtt: (zigbee2mqtt) Zigbee2mqtt bridge is online
2021-09-29 07:52:48.166  zigbee2mqtt: (zigbee2mqtt) Zigbee2mqtt log level is info
2021-09-29 07:52:48.166  zigbee2mqtt: (zigbee2mqtt) Joining new devices is disabled on the zigbee bridge
2021-09-29 07:52:48.172  zigbee2mqtt: (zigbee2mqtt) Received available devices list from bridge
2021-09-29 07:52:48.172  zigbee2mqtt: (zigbee2mqtt) Coordinator address is 0x00124b002291d411
2021-09-29 07:52:48.173  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe95f838(state)
2021-09-29 07:52:48.173  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.173  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "state" key for device with ieeeAddr 0x847127fffe95f838
2021-09-29 07:52:48.177  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe95f838(signal)
2021-09-29 07:52:48.177  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.177  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x847127fffe95f838
2021-09-29 07:52:48.181  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(signal)
2021-09-29 07:52:48.182  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.182  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.186  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(cell)
2021-09-29 07:52:48.186  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.186  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery_voltage" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.191  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(btperc)
2021-09-29 07:52:48.191  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.191  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.196  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(mode)
2021-09-29 07:52:48.196  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.196  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "system_mode" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.202  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(preset)
2021-09-29 07:52:48.202  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.202  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "preset" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.209  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(week)
2021-09-29 07:52:48.209  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.209  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "week" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.215  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(spoint)
2021-09-29 07:52:48.216  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.216  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "current_heating_setpoint" key for device with ieeeAddr 0x847127fffe9f2a4                                                5
2021-09-29 07:52:48.222  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(sp_eco)
2021-09-29 07:52:48.222  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.222  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "eco_temperature" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.229  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(sp_cmf)
2021-09-29 07:52:48.229  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.229  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "comfort_temperature" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.237  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(temp)
2021-09-29 07:52:48.237  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.237  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "local_temperature" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.245  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(level)
2021-09-29 07:52:48.245  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.245  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "position" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.253  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(wnd)
2021-09-29 07:52:48.253  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.253  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "window_detection" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.261  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe9f2a45(child)
2021-09-29 07:52:48.262  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.262  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "child_lock" key for device with ieeeAddr 0x847127fffe9f2a45
2021-09-29 07:52:48.271  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b00219fb3b9(signal)
2021-09-29 07:52:48.271  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.271  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x00124b00219fb3b9
2021-09-29 07:52:48.280  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f9162d8(btperc)
2021-09-29 07:52:48.280  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.280  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x00124b001f9162d8
2021-09-29 07:52:48.290  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f9162d8(actio)
2021-09-29 07:52:48.290  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.290  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "action" key for device with ieeeAddr 0x00124b001f9162d8
2021-09-29 07:52:48.300  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f9162d8(signal)
2021-09-29 07:52:48.300  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.300  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x00124b001f9162d8
2021-09-29 07:52:48.311  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffef7cc8b(state)
2021-09-29 07:52:48.311  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.311  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "state" key for device with ieeeAddr 0x847127fffef7cc8b
2021-09-29 07:52:48.321  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffef7cc8b(signal)
2021-09-29 07:52:48.321  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.322  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x847127fffef7cc8b
2021-09-29 07:52:48.333  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe280f13(state)
2021-09-29 07:52:48.333  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.333  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "state" key for device with ieeeAddr 0x847127fffe280f13
2021-09-29 07:52:48.344  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x847127fffe280f13(signal)
2021-09-29 07:52:48.344  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.344  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x847127fffe280f13
2021-09-29 07:52:48.356  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f8ac44a(btperc)
2021-09-29 07:52:48.356  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.356  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x00124b001f8ac44a
2021-09-29 07:52:48.368  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f8ac44a(actio)
2021-09-29 07:52:48.368  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.369  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "action" key for device with ieeeAddr 0x00124b001f8ac44a
2021-09-29 07:52:48.381  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00124b001f8ac44a(signal)
2021-09-29 07:52:48.381  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.381  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x00124b001f8ac44a
2021-09-29 07:52:48.395  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0xb4e3f9fffeb1b388(state)
2021-09-29 07:52:48.395  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.395  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "state" key for device with ieeeAddr 0xb4e3f9fffeb1b388
2021-09-29 07:52:48.408  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0xb4e3f9fffeb1b388(signal)
2021-09-29 07:52:48.408  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.408  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0xb4e3f9fffeb1b388
2021-09-29 07:52:48.422  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x001e5e090217847d(btperc)
2021-09-29 07:52:48.422  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.422  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x001e5e090217847d
2021-09-29 07:52:48.436  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x001e5e090217847d(signal)
2021-09-29 07:52:48.437  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.437  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x001e5e090217847d
2021-09-29 07:52:48.452  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x0015bc001b021c22(power)
2021-09-29 07:52:48.452  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.452  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "power;energy" key for device with ieeeAddr 0x0015bc001b021c22
2021-09-29 07:52:48.467  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x0015bc001b021c22(signal)
2021-09-29 07:52:48.467  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.467  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "linkquality" key for device with ieeeAddr 0x0015bc001b021c22
2021-09-29 07:52:48.483  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(temp)
2021-09-29 07:52:48.483  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.483  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "temperature" key for device with ieeeAddr 0x00158d00054d2f08
2021-09-29 07:52:48.498  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(btperc)
2021-09-29 07:52:48.498  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.498  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x00158d00054d2f08
2021-09-29 07:52:48.514  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(motion)
2021-09-29 07:52:48.514  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.514  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "occupancy" key for device with ieeeAddr 0x00158d00054d2f08
2021-09-29 07:52:48.530  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(volt)
2021-09-29 07:52:48.531  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.531  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "voltage" key for device with ieeeAddr 0x00158d00054d2f08
2021-09-29 07:52:48.547  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(lx)
2021-09-29 07:52:48.547  zigbee2mqtt: (zigbee2mqtt) No such device found
2021-09-29 07:52:48.547  zigbee2mqtt: (zigbee2mqtt) Creating domoticz device to handle "illuminance" key for device with ieeeAddr 0x00158d00054d2f08
2021-09-29 07:52:48.566  zigbee2mqtt: (zigbee2mqtt) Trying to get legacy device 0x00158d00054d2f08(signal)
2021-09-29 07:52:48.566  zigbee2mqtt: (zigbee2mqtt) No such device found
russdan commented 3 years ago

Hi @stas-demydiuk I have identified the problem which is how features are handled in adapter.py.. there were two issues:

  1. Error: zigbee2mqtt: (zigbee2mqtt) Hive_Controller: can not process binary item "temperature_setpoint_hold" This needed an entry creating to handle this as an on/off switch;
  2. temperature_setpoint_hold_duration is a numeric value but has no unit as its just a number, so the code fails with Error: zigbee2mqtt: (zigbee2mqtt) 'onMessage' failed 'KeyError':'('unit',)'. as it assumes all keys with setpoint in them contain a unit, so I added a try/except to read feature['unit'] and add as a custom value in the except.

All devices identified after the failure of temperature_setpoint_hold_duration were therefore not processed which is why they don't have any features.

I have fixed these issues on my local branch but don't have permission to push to create a PR - can you give me permission to do so please?

russdan commented 3 years ago

As I can't create a PR I created a diff patch so you can check and apply if you're happy with the changes...

git diff adapter.py ~/adapter.py
diff --git a/adapter.py b/home/pi/adapter.py
index 9e96e39..420bf13 100644
--- a/adapter.py
+++ b/home/pi/adapter.py
@@ -171,6 +171,11 @@ class UniversalAdapter(Adapter):
             self._add_device(alias, feature, ContactSensor, ' (Consumer Connected)')
             return

+        if (feature['name'] == 'temperature_setpoint_hold' and state_access and write_access):
+            alias = self._generate_alias(feature, 'temphld')
+            self._add_device(alias, feature, OnOffSwitch)
+            return
+
         if (feature['name'] == 'state' and state_access and write_access):
             alias = self._generate_alias(feature, 'state')
             self._add_device(alias, feature, OnOffSwitch)
@@ -257,16 +262,25 @@ class UniversalAdapter(Adapter):
             self._add_device(alias, feature, CurrentSensor, ' (Current)')
             return

-        if 'setpoint' in feature['name'] and feature['unit'] == '<C2><B0>C' and write_access:
-            alias = self._generate_alias(feature, 'spoint')
-            self._add_device(alias, feature, SetPoint, ' (Setpoint)')
+        if 'setpoint' in feature['name']:
+            try:
+                unit=feature['unit']
+            except:
+                unit=''
+
+            if unit == '<C2><B0>C' and write_access:
+                alias = self._generate_alias(feature, 'spoint')
+                self._add_device(alias, feature, SetPoint, ' (Setpoint)')
+            elif unit == '':
+                alias = self._generate_alias(feature, 'duration')
+                self._add_device(alias, feature, CustomSensor, ' (Hold Duration)')
             return

         if (feature['name'] == 'position' and state_access):
             alias = self._generate_alias(feature, 'level')
             self._add_device(alias, feature, LevelSwitch)
             return
-
+
         if (feature['name'] == 'color_temp_startup' and state_access):
             return
odelma commented 3 years ago

Hi, even though this was about sensors, do you think the root cause is the same as here: https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin/issues/707

russdan commented 3 years ago

Possibly - what I had in the logs which I'd dismissed as irrelevant was

2021-09-28 12:51:00.435  Error: zigbee2mqtt: (zigbee2mqtt) Hive Controller: can not process binary item "temperature_setpoint_hold"
2021-09-28 12:51:00.435  Error: zigbee2mqtt: (zigbee2mqtt) 'onMessage' failed 'KeyError':'('unit',)'.
2021-09-28 12:51:00.435  Error: zigbee2mqtt: (zigbee2mqtt) Exception traceback:
2021-09-28 12:51:00.435  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 298 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/plugin.py', function onMessage
2021-09-28 12:51:00.435  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 137 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/plugin.py', function onMessage
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 167 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/mqtt.py', function onMessage
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 166 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/plugin.py', function onMQTTPublish
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 45 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/devices_manager.py', function set_devices
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 47 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/adapter.py', function __init__
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 59 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/adapter.py', function _add_features
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 71 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/adapter.py', function _add_feature
2021-09-28 12:51:00.436  Error: zigbee2mqtt: (zigbee2mqtt) ----> Line 260 in '/home/pi/domoticz/plugins/zigbee2mqtt-plugin/adapter.py', function add_numeric_device

but actually this caused the feature creation to stop for any devices after/including the Hive Controller device, so it could be the same for your devices - as @stas-demydiuk asked in #707 what do you see in the domoticz.log? If you see adapter.py messages in the domoticz.log its probably a similar condition which needs trapping / handling in the code...

I would say remove the plugin (Delete it from Devices), re-add the plugin again (to ensure all devices cleared) and then ensure you capture the zigbee2mqtt messages from the log - I have Domoticz logging to /var/log/domoticz.log so its easy to cat the log and grep for a pattern (eg cat /var/log/domoticz.log | grep adapter.py).... adapter.py is where the features get added so if there's an issue its likely to be in that class...

stas-demydiuk commented 3 years ago

@russdan, anyone could create a PR to this repo, you just need to fork it, push your changes to the fork and then create a PR. But nevermind, thanks to your diff, I've already pushed the update, thanks!

Bartekn86 commented 3 years ago

DIYRuZ_Flower still do not show soil_moisture DIYRuZ_Geiger still do not show radioactive_events_per_minute etc. thank you