I have just started using Domoticz (on a synology NAS).
Currently I have 5 folding curtains in my house which I can open and close by using Domoticz. these are configured as blinds in the switch tab.
Now I want to implement another feature of these curtains in domotics.
By pressing and holding the 'stop' button on the original remote for about 3 seconds these curtains will move to a middle position.
pressing the stop button in the switch tab a couple of times triggers the curtains to move to the middle position.
I do not know how to implement the 'stop' command in dzVents.
below is the code used to test this. when a dummy switch is set 'on', the curtain moves upwards and after 5 seconds it should stop.
currently the stop command is not recognized. An I see the following error in the log:
2019-06-20 09:30:27.164 Status: dzVents: Error (2.4.19): An error occured when calling event handler Script #1 Vouwgordijnen open op tussenstand
2019-06-20 09:30:27.164 Status: dzVents: Error (2.4.19): ..._scripts/Script #1 Vouwgordijnen open op tussenstand.lua:12: attempt to call field 'switchStop' (a nil value)
Code: Select all
return {
on = {
devices = {
'Dummy gordijnen open'
}
},
execute = function(domoticz, switch)
if (switch.state == 'On') then
domoticz.log('Goodmorning, gordijnen op tussenstand')
domoticz.devices('Vouwg. Keuken achterzijde').switchOff()
domoticz.devices('Vouwg. Keuken achterzijde').switchStop().afterSec(5)
else
end
end
}