I am using the command: dimTo(20) command in a script to switch a Zwave dimmer on at 20% level.
This often works, but strangely not always.
In the log I can see messages like "Constructed timed-command: Set Level 20", however sometimes the dimmer does not change state, and also the log of the dimmer shows no state change.
So question is, is this a bug? Or should I alway follow dimTo(level) with a switchOn() command?
* EDIT * if I follow the dimTo with a switchOn command the dimmer is always set at 100%
Dimmer sometimes not switched on after dimTo command? [SOLVED]
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dimmer sometimes not switched on after dimTo command?
I don't see this behavior on my dimmers but I don't have any Zwave dimmer. If possible it would help if you can describe in what circumstances you see this and if any other commands / scripts could be of any influence.Bikey wrote: ↑Tuesday 29 January 2019 23:29 I am using the command: dimTo(20) command in a script to switch a Zwave dimmer on at 20% level.
This often works, but strangely not always.
In the log I can see messages like "Constructed timed-command: Set Level 20", however sometimes the dimmer does not change state, and also the log of the dimmer shows no state change.
So question is, is this a bug? Or should I alway follow dimTo(level) with a switchOn() command?
* EDIT * if I follow the dimTo with a switchOn command the dimmer is always set at 100%
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 331
- Joined: Sunday 22 February 2015 12:19
- Target OS: Linux
- Domoticz version: 2020.x
- Location: Netherlands
- Contact:
Re: Dimmer sometimes not switched on after dimTo command?
I have not found out if there are specific circumstances. It all works fine in a normal Lua script where a use:
a command like: commandArray[DimmableSwitch]='Set Level 15'
Now that I have replaced that script with the DZVents version, with the dimTo(15) it behaves differently.
Btw. I also looks like the script (triggered by a PIR-sensor) is also less responsive with DZvents then with regular Lua.
a command like: commandArray[DimmableSwitch]='Set Level 15'
Now that I have replaced that script with the DZVents version, with the dimTo(15) it behaves differently.
Btw. I also looks like the script (triggered by a PIR-sensor) is also less responsive with DZvents then with regular Lua.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dimmer sometimes not switched on after dimTo command? [SOLVED]
dzVents dimTo(15) sends the exact same command to domoticz as the Lua commandArray 'Set level' so I would really like to understand when the different behavior occurs and under what circumstances.Bikey wrote: ↑Wednesday 30 January 2019 23:55 I have not found out if there are specific circumstances. It all works fine in a normal Lua script where a use:
a command like: commandArray[DimmableSwitch]='Set Level 15'
Now that I have replaced that script with the DZVents version, with the dimTo(15) it behaves differently.
Btw. I also looks like the script (triggered by a PIR-sensor) is also less responsive with DZvents then with regular Lua.
A dzVents, Lua or Blockly script can looks to be less responsive if it need to wait for another script to finish. Domoticz event system is single threaded meaning that only one script can be active at any time. Script 1 has to finish before script 2 starts. That is a design principle of the domoticz event system.
Now most of the script finish in milliseconds but some can take a bit longer especial if they need to wait for osCommands to return control to the script.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest