Page 1 of 1

Xiaomi Gateway Volume - DzVents 2.4.22 - SwitchSelector - failed

Posted: Tuesday 04 June 2019 21:03
by szemisun
Hi Guys,

I recently updated dzVents to 2.4.22 from 2.4.21 and my script has been broken and there are exceptions in the following line

Code: Select all

XGVolume.switchSelector(10)
XGDoorBell.switchSelector(10)
XGDoorBell.switchOff().afterSec(5)
XGVolume.switchOff().afterSec(5)

Code: Select all

2019-06-04 20:49:47.023 Status: dzVents: Debug: ElőszobaWirelessButton: Processing device-adapter for Xiaomi Gateway Volume: Switch device adapter
2019-06-04 20:49:47.024 Status: dzVents: Debug: ElőszobaWirelessButton: Processing device-adapter for Xiaomi Gateway Doorbell: Switch device adapter
2019-06-04 20:49:47.024 Status: dzVents: Error (2.4.22): ElőszobaWirelessButton: An error occured when calling event handler ElőszobaWirelessButton
2019-06-04 20:49:47.024 Status: dzVents: Error (2.4.22): ElőszobaWirelessButton: ...moticz/dzVents/runtime/device-adapters/switch_device.lua:117: attempt to get length of field 'levelNames' (a nil value)
I had not found any instruction, what do i need to modify my script to work

Can anybody help me or give guidance?

Best regards,
SzemiSun

Re: Xiaomi Gateway Volume - DzVents 2.4.22 - SwitchSelector - failed  [Solved]

Posted: Tuesday 04 June 2019 21:19
by waaren
szemisun wrote: Tuesday 04 June 2019 21:03 I recently updated dzVents to 2.4.22 from 2.4.21 and my script has been broken and there are exceptions in the following line

Code: Select all

XGVolume.switchSelector(10)
XGDoorBell.switchSelector(10)
It looks like you use the switchSelector method for a device that is not a selector.
You might want to try

Code: Select all

XGVolume.dimTo(10)
XGDoorBell.dimTo(10)

Re: Xiaomi Gateway Volume - DzVents 2.4.22 - SwitchSelector - failed

Posted: Tuesday 04 June 2019 21:27
by szemisun
You are right, It works, thank You