[SOLVED] Error: There is no device with that name or id: false

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
stewdyne
Posts: 20
Joined: Friday 20 July 2018 7:55
Target OS: Windows
Domoticz version:
Contact:

[SOLVED] Error: There is no device with that name or id: false

Post by stewdyne »

I regulary get the following error:

Code: Select all

2018-09-24 06:00:00.231 Status: dzVents: Error (2.4.6): There is no device with that name or id: false
Normaly a device name would be wrong. But I have no device called false in my scripts. I searched all my active scripts (no results when looking for 'false').

What could be going wrong?
Last edited by stewdyne on Tuesday 25 September 2018 13:45, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Error: There is no device with that name or id: false

Post by waaren »

Can you please turn logging level for dzVents to "Errors + minimal execution info + generic info" on the Settings -> Other tab and at the bottom -> dzVents) ?
If that does not identify where this error occurs then next step is to enable debug log in every script that starts on a time event ( as your error is likely coming from a script that starts at 6:00 )
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
stewdyne
Posts: 20
Joined: Friday 20 July 2018 7:55
Target OS: Windows
Domoticz version:
Contact:

Re: Error: There is no device with that name or id: false

Post by stewdyne »

Ah! I have a clue... This error occurs every 10 minutes. I have 1 script that executes every 10 minutes. Its the following script:

Code: Select all

return {
	on = {
		timer = { 'every 10 minutes' }
	},
	execute = function(dz, switch)
	    
	    -- Living
	    if ((dz.devices('Lampen_Woon_1').state == 'Off') and (dz.devices('Beweging_Woonkamer').state == 'Off')) then
	         dz.devices('Lampen_Woon_1').switchOff()
	    end
	    
	    -- Kitchen
	    if ((dz.devices('Lampen_Keuken_1').state == 'Off') and (dz.devices('Beweging_keuken').state == 'Off')) then
	         dz.devices('Lampen_Keuken_1').switchOff().afterSec(10)
	    end
	    
	    -- Bedroom
	    if ((dz.devices('Lampen_Slaap_1').state == 'Off') and (dz.devices('Beweging_Slaapkamer').state == 'Off')) then
	         dz.devices('Lampen_Slaap_1').switchOff().afterSec(20)
	    end
	    
	    -- Toilet
	    if ((dz.devices('Lampen_Toilet_2').state == 'Off') and (dz.devices('Beweging_Toilet').state == 'Off')) then
	         dz.devices('Lampen_Toilet_2').switchOff().afterSec(30)
	    end
	    
	    -- Hallway One
	    if ((dz.devices('Lampen_Gang_1').state == 'Off') and (dz.devices('Beweging_Woonkamer').state == 'Off') and (dz.devices('Beweging_keuken').state == 'Off')) then
	         dz.devices('Lampen_Gang_1').switchOff().afterSec(40)
	    end
	         
	    -- Hallway Two
	    if (dz.devices(('Lampen_Gang_2').state == 'Off') and (dz.devices('Beweging_Woonkamer').state == 'Off') and (dz.devices('Beweging_keuken').state == 'Off')) then
	         dz.devices('Lampen_Gang_2').switchOff().afterSec(50)
	    end
	end
}
All the device names are correct in there...

Edit: work with Idx numbers and see if that solves the error?
stewdyne
Posts: 20
Joined: Friday 20 July 2018 7:55
Target OS: Windows
Domoticz version:
Contact:

Re: [SOLVED] Error: There is no device with that name or id: false

Post by stewdyne »

I've found the culprit.

Code: Select all

if (dz.devices(('Lampen_Gang_2').state == 'Off')
Double (( after devices gave the error.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest