There is no device with that name or id
Posted: Sunday 12 November 2023 20:55
Hi,
I have a script, the stock deconzSensors contributed script. It's pretty simple, takes some values and updates a virtual sensor. I added it to the dzEvents as a 'devices' script. It does run when it needs too and find the devices, but it cannot update the virtual sensor.
I created these sensors named Bedroom1 & Bedroom2. You can see them here in the devices list, marked active, so they are certainly there
The problem is, I get this message at the end of the script.
2023-11-12 19:44:34.518 Error: dzVents: Error: (3.1.8) deconzSensors 1.2e: There is no device with that name or id: Bedroom2
I have added some debugging to make sure there is no whitespace etc. You can see from the devices list, there is not there.
Here is my debug output
2023-11-12 19:44:34.517 Status: dzVents: Debug: deconzSensors 1.2e: TemperatureSensor : '$temperature Bedroom2'
2023-11-12 19:44:34.517 Status: dzVents: Debug: deconzSensors 1.2e: Sensor name : 'Bedroom2'
Quotes around the name show no whitespace etc. I have double-checked the names in the interface etc., yet a call to updateTempHum will fail with that error.
Does anyone have any suggestions as to why a device shown in the device list and set active would not be found if searched for by name ie. domoticz.devices('Bedroom2') ? The devices to be updated are 'virtual' ones, if that makes any difference. I have updated a custom sensor like this in the past without any issue, but I am not sure what is happening here.
I just can't figure it out...
Thanks.
I have a script, the stock deconzSensors contributed script. It's pretty simple, takes some values and updates a virtual sensor. I added it to the dzEvents as a 'devices' script. It does run when it needs too and find the devices, but it cannot update the virtual sensor.
I created these sensors named Bedroom1 & Bedroom2. You can see them here in the devices list, marked active, so they are certainly there
The problem is, I get this message at the end of the script.
2023-11-12 19:44:34.518 Error: dzVents: Error: (3.1.8) deconzSensors 1.2e: There is no device with that name or id: Bedroom2
I have added some debugging to make sure there is no whitespace etc. You can see from the devices list, there is not there.
Here is my debug output
2023-11-12 19:44:34.517 Status: dzVents: Debug: deconzSensors 1.2e: TemperatureSensor : '$temperature Bedroom2'
2023-11-12 19:44:34.517 Status: dzVents: Debug: deconzSensors 1.2e: Sensor name : 'Bedroom2'
Quotes around the name show no whitespace etc. I have double-checked the names in the interface etc., yet a call to updateTempHum will fail with that error.
Does anyone have any suggestions as to why a device shown in the device list and set active would not be found if searched for by name ie. domoticz.devices('Bedroom2') ? The devices to be updated are 'virtual' ones, if that makes any difference. I have updated a custom sensor like this in the past without any issue, but I am not sure what is happening here.
I just can't figure it out...
Thanks.