Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 27 forks source link

Getting continuous "Can't Update Unit" errors in the domoticz log #71

Closed jordindc closed 3 years ago

jordindc commented 3 years ago

Hi all,

I'm using Conbee II controller and deconz domoticz plugin for 3 months now. I got occasionally some errors in domoticz log, but nothing to be worried about. But lately I'm getting dozens of errors about two sensors:

Can't Update Unit > 32 (sensors) : {'nValue': 1, 'sValue': 'On'} Can't Update Unit > 33 (sensors) : {'nValue': 1, 'sValue': '1'} Can't Update Unit > 32 (sensors) : {'nValue': 0, 'sValue': 'Off'} Can't Update Unit > 33 (sensors) : {'nValue': 0, 'sValue': '0'} , in this case sValue can take the value -1 or 2

This two sensors are not created intentionally. When I get sensors list from deconz API, I get: "32": { "config": { "duration": 60, "on": true, "reachable": true }, "etag": "5de9b2b9a552d0ce653b4a8340fd8510", "manufacturername": "Phoscon", "modelid": "PHOSCON_VPIR", "name": "VPIR Encendre escala despatx", "state": { "lastupdated": "2020-10-02T08:44:10.801", "presence": false }, "swversion": "1.0", "type": "CLIPPresence", "uniqueid": "vpir-1600961012781" }, "33": { "config": { "on": true, "reachable": true }, "etag": "49e3f9e3028a5e8c5b08e15af10d8b2e", "manufacturername": "Phoscon", "modelid": "PHOSCON_FSM_STATE", "name": "FSM_STATE Encendre escala despatx", "state": { "lastupdated": "2020-10-02T06:08:42.203", "status": 0 }, "swversion": "1.0", "type": "CLIPGenericStatus", "uniqueid": "fsm-state-1600961012781" }

So I assume they are automatically created by Phoscon once I created following sensor: "13": { "config": { "alert": "none", "battery": 47, "delay": 60, "duration": 62, "group": "25925", "on": true, "reachable": true }, "ep": 1, "etag": "5de9b2b9a552d0ce653b4a8340fd8510", "lastseen": "2020-10-02T08:43Z", "manufacturername": "IKEA of Sweden", "modelid": "TRADFRI motion sensor", "name": "Motion sensor Escala Despatx", "state": { "dark": true, "lastupdated": "2020-10-02T08:44:13.401", "presence": false }, "swversion": "1.2.214", "type": "ZHAPresence", "uniqueid": "d0:cf:5e:ff:fe:c0:93:fe-01-0006" }

In fact, when this sensor is set 'On' or 'Off' is when the said errors arises in domoticz log. And the action linked to the correctly included sensor (#13), is rightly executed.

Any suggestion about what is going on? May I, simply, delete those fake sensors?

Thanks in advance,

Jordi

Smanar commented 3 years ago

Hello, thoses sensors are virtual one, they are created by phoscon for scenario for exemple, so if you don't need them you can delete them yes (but it will broken your scenario/scene)

But I m curious why they cause problem ! Wich one plugin version you have ?

This error mean the device is not in domoticz. You can have other error message just before or after if you enable more log ("debug info only"), but this device have nothing special, it can be added itself in domoticz when the plugin detect it.

Or in worst situation when you restart the plugin.

Thoses devices (32 and 33) are realy not visible in domoticz ? in the "device" tab ?

jordindc commented 3 years ago

Thanks @Smanar,

You were right, these sensors were not in domoticz. For any reason, these sensors were not included in domoticz when they were automatically created by phoscon (probably domoticz had disabled the inclusion of new devices at that moment). Now they are included and the error has gone. But I'm still not sure of the usefullness of these virtual devices.

Thanks again and regards

Smanar commented 3 years ago

had disabled the inclusion of new devices at that moment

Ha yes, realy need to put a debug message for that ...

For the usefullness it depend on how you use deconz, if you use phoscon feature (for exemple for a scene to change temperature for a bulb), yes they are usefull, and better to let phoscon delete them itself if you disable them.