switch the wrong switch id

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

Moderator: leecollings

Post Reply
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

switch the wrong switch id

Post 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 214 times
after
Attachments
Screenshot 2021-08-27 200741.png
Screenshot 2021-08-27 200741.png (14.77 KiB) Viewed 214 times
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: switch the wrong switch id

Post 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 :-)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: switch the wrong switch id

Post 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
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: switch the wrong switch id

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hestia
Posts: 361
Joined: Monday 25 December 2017 23:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Paris
Contact:

Re: switch the wrong switch id

Post 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...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest