Page 1 of 1

There is no device with that name or id

Posted: Sunday 12 November 2023 20:55
by pjsgsy
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
chrome_LoGhyUxDfg.jpg
chrome_LoGhyUxDfg.jpg (31.32 KiB) Viewed 482 times
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.

Re: There is no device with that name or id

Posted: Sunday 12 November 2023 20:59
by pjsgsy
LOL! I do not believe it! After messing for some hours and posting this. Just before I gave up, I decided to restart the Domoticz service. What do I see? The 2 virtual sensors immediately update!!! OMG. I am sure I had restarted before, no difference!

I will leave this here in case it helps someone else.

If anyone can comment on this though, I'd appreciate some insight. I did not think restarts were needed after adding new sensors etc., Thanks!