Page 1 of 1

switch the wrong switch id

Posted: Friday 27 August 2021 20:08
by hestia
Hi
2 devices with different id but same name

Code: Select all

return {
    
     logging =   {   level   =  domoticz.LOG_DEBUG, },
	
    
	on = {
		devices = {205},
	},
	

	execute = function(dz, triggeredItem)
	    
	    dz.devices(1987).switchOn()

	end
}
before
Screenshot 2021-08-27 200635.png
Screenshot 2021-08-27 200635.png (12.58 KiB) Viewed 215 times
after

Re: switch the wrong switch id

Posted: Friday 27 August 2021 20:13
by waltervl
For some reason dzVents does not like the same names for different devices. It is a known issue. Easy fix is to rename 1 :-)

Re: switch the wrong switch id

Posted: Friday 27 August 2021 20:25
by hestia
ok, but strange when you only use id in the script!
"For some reason" it is because inside the names are used sometimes instead of the id
"known issue" not for me ;-)
"Easy fix" yes after the diagnostic (1 hour) because I didn't jump on that conclusion immediately

Re: switch the wrong switch id

Posted: Friday 27 August 2021 21:50
by waltervl
I follow the forum a little bit and on the zwave2mqtt topic people are moving a lot of devices from OZW to zwave2mqtt having the same issues with double device names in dzVents. I must admit that your use case did not occur there.
As @waaren has sadly fallen away from us I hope someone can step up and fix this kind of dzVents issues.

Re: switch the wrong switch id

Posted: Saturday 28 August 2021 17:00
by hestia
Yes, bad news for waaren :-(
The duplicated names are not the fault of zwave2mqtt, but mine.
zwave2mqtt initiated the devices with unique names, but I didn't like them!
I renamed some of them manually with temporary names to better understand the devices, and so I've set lots of duplicated!
I need to change them...