SOLVED - Problem with script dzvents after update

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

Moderator: leecollings

Post Reply
spacenoun
Posts: 7
Joined: Friday 04 February 2022 14:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

SOLVED - Problem with script dzvents after update

Post by spacenoun »

Hello,
I created a script to automate the roller shutters of my house

Code: Select all

return {
    active = true,
    on = {
        devices = {'dimmer_salon'},
        },
   

data = {lastPosDimSal = { initial = 99 } },
    
    execute = function(domoticz, dimmer_salon)
        --local var_lastPosDimSal = domoticz.variables('var_lastPosDimSal')
        local var_actPosDimSal = domoticz.variables('var_actPosDimSal')
        local var_tpsDec = domoticz.variables('var_tpsDec')
        local var_tpsDecUp = domoticz.variables('var_tpsDecUp')
        
        -- On affiche le niveau et l'état du dimmer
        domoticz.log('dimmer_salon level is')
        domoticz.log(dimmer_salon.level)
        domoticz.log('état dimmer salon')
        domoticz.log(dimmer_salon.state)
        
        -- On défini les variables
        var_actPosDimSal.set(dimmer_salon.level)
        lastPosDimSal=var_actPosDimSal.value
        domoticz.log('la valeur précédente était :')
        domoticz.log(lastPosDimSal)
        
        local fermsal = domoticz.devices('fermeture_salon')
        local ouvsal = domoticz.devices('ouverture_salon')
        
        -- test modif
        if (dimmer_salon.state == 'Open') then
            dimmer_salon.dimTo(99)
        end
        
            
        if (dimmer_salon.state == 'Closed') then
            dimmer_salon.dimTo(1)
        end
        -- fin test
        
        -- condition d'ouverture
        if (dimmer_salon.level < lastPosDimSal) then
            tpsDecDn = (lastPosDimSal - dimmer_salon.level) * var_tpsDec.value
            -- on ferme immédiatement le switch ouverture
            ouvsal.switchOff()
            -- end
            fermsal.switchOn().forSec(tpsDecDn)
            domoticz.log('la valeur est inférieure')
            domoticz.log('le temps de fermeture est de')
            domoticz.log(tpsDecDn)
            -- on réinitialise la variable à 0
            tpsDecDn = (0)
                
        end
        
        -- condition de fermeture
        if (dimmer_salon.level > lastPosDimSal) then
            tpsDecUp = (dimmer_salon.level - lastPosDimSal) * var_tpsDecUp.value
            --o n ferme immédiatement le switch fermeture
            fermsal.switchOff()
            -- end
            ouvsal.switchOn().forSec(tpsDecUp)
            domoticz.log('la valeur est supérieure')
            domoticz.log('le temps d ouverture est de')
            domoticz.log(tpsDecUp)
            -- on réinitialise la variable à 0
            tpsDecUp = (0)
        end
        
    end
    
}


I have a variable 'lastPosDimSal' which I use to store the value of the dimmer.
Two user variables 'var_tpsDec' and 'var_tpsDecDn' which I use to define the rise and fall times of the shutters a 'var_actPosDimSal' which contains the last value of the dimmer before the change of state.
This commands 2 ON/OFF type switches which control an esp-01.

I also put 1% and 99% corresponding to closed and open because otherwise the switches would not go OFF.

Then I created a selector with 6 buttons that allows me to select percentages of opening levels
controlled by a blocky script in 'trigger device' modifying the level of the dimmer. (closed, 25%, 50%, 75%, open, light daylight (13%).
script_blocky_volets.png
script_blocky_volets.png (81.39 KiB) Viewed 624 times
It all worked perfectly. But since the last update the script is looping. It automatically resets the last position variable to 99 and never stops.
I admit that I don't understand where the problem comes from, knowing that this is my first attempt at a script.

Any idea that could enlighten me???

Thanks in advance.

Here is an excerpt from the Domoticz log:

Code: Select all

2022-02-04 09:01:02.928 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:02.109 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.109 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.110 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.110 Status: dzVents: Info: 99
2022-02-04 09:01:02.110 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.110 Status: dzVents: Info: Open
2022-02-04 09:01:02.110 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.110 Status: dzVents: Info: 99
2022-02-04 09:01:02.111 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.112 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.152 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:02.284 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.284 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.285 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.285 Status: dzVents: Info: 99
2022-02-04 09:01:02.285 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.285 Status: dzVents: Info: Open
2022-02-04 09:01:02.285 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.285 Status: dzVents: Info: 99
2022-02-04 09:01:02.287 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.287 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.291 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:02.422 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.422 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.423 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.423 Status: dzVents: Info: 99
2022-02-04 09:01:02.423 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.423 Status: dzVents: Info: Open
2022-02-04 09:01:02.423 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.423 Status: dzVents: Info: 99
2022-02-04 09:01:02.424 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.425 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.429 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:02.562 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.562 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.563 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.563 Status: dzVents: Info: 99
2022-02-04 09:01:02.563 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.563 Status: dzVents: Info: Open
2022-02-04 09:01:02.563 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.563 Status: dzVents: Info: 99
2022-02-04 09:01:02.565 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.565 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.567 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:02.734 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.734 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.736 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.736 Status: dzVents: Info: 99
2022-02-04 09:01:02.736 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.736 Status: dzVents: Info: Open
2022-02-04 09:01:02.736 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.736 Status: dzVents: Info: 99
2022-02-04 09:01:02.738 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.739 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.744 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:02.878 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:02.878 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:02.879 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:02.879 Status: dzVents: Info: 99
2022-02-04 09:01:02.879 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:02.879 Status: dzVents: Info: Open
2022-02-04 09:01:02.879 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:02.879 Status: dzVents: Info: 99
2022-02-04 09:01:02.883 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:02.884 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:02.923 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:03.065 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:03.242 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:03.053 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:03.053 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:03.054 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:03.054 Status: dzVents: Info: 99
2022-02-04 09:01:03.054 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:03.054 Status: dzVents: Info: Open
2022-02-04 09:01:03.054 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:03.054 Status: dzVents: Info: 99
2022-02-04 09:01:03.056 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:03.057 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:03.060 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:03.193 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:03.193 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:03.194 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:03.194 Status: dzVents: Info: 99
2022-02-04 09:01:03.194 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:03.194 Status: dzVents: Info: Open
2022-02-04 09:01:03.194 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:03.194 Status: dzVents: Info: 99
2022-02-04 09:01:03.195 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:03.197 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:03.197 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:04.025 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.160 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.338 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.516 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.652 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.830 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:04.968 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.103 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.282 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.461 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.598 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.775 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:05.912 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.090 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.227 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.407 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.544 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.683 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.862 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:06.855 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:06.996 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:06.996 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:06.997 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:06.997 Status: dzVents: Info: 99
2022-02-04 09:01:06.997 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:06.997 Status: dzVents: Info: Open
2022-02-04 09:01:06.997 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:06.997 Status: dzVents: Info: 99
2022-02-04 09:01:06.999 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.044 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.183 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.321 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.458 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.593 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.780 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.958 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:07.000 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.039 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.169 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.170 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.170 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.171 Status: dzVents: Info: 99
2022-02-04 09:01:07.171 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.171 Status: dzVents: Info: Open
2022-02-04 09:01:07.171 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.171 Status: dzVents: Info: 99
2022-02-04 09:01:07.172 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.173 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.176 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.308 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.308 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.309 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.309 Status: dzVents: Info: 99
2022-02-04 09:01:07.309 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.309 Status: dzVents: Info: Open
2022-02-04 09:01:07.309 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.309 Status: dzVents: Info: 99
2022-02-04 09:01:07.311 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.312 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.316 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.445 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.445 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.446 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.446 Status: dzVents: Info: 99
2022-02-04 09:01:07.446 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.446 Status: dzVents: Info: Open
2022-02-04 09:01:07.446 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.446 Status: dzVents: Info: 99
2022-02-04 09:01:07.448 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.449 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.452 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.583 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.583 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.584 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.584 Status: dzVents: Info: 99
2022-02-04 09:01:07.584 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.584 Status: dzVents: Info: Open
2022-02-04 09:01:07.584 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.585 Status: dzVents: Info: 99
2022-02-04 09:01:07.586 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.587 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.589 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.757 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.757 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.758 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.758 Status: dzVents: Info: 99
2022-02-04 09:01:07.758 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.758 Status: dzVents: Info: Open
2022-02-04 09:01:07.758 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.758 Status: dzVents: Info: 99
2022-02-04 09:01:07.760 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.761 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:07.774 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.905 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:07.905 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:07.906 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:07.906 Status: dzVents: Info: 99
2022-02-04 09:01:07.906 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:07.906 Status: dzVents: Info: Open
2022-02-04 09:01:07.906 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:07.906 Status: dzVents: Info: 99
2022-02-04 09:01:07.909 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:07.910 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:07.911 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:08.063 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:08.201 volets_salon: Light/Switch (dimmer_salon)
2022-02-04 09:01:08.050 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:08.050 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:08.051 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:08.051 Status: dzVents: Info: 99
2022-02-04 09:01:08.051 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:08.051 Status: dzVents: Info: Open
2022-02-04 09:01:08.051 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:08.051 Status: dzVents: Info: 99
2022-02-04 09:01:08.053 Status: dzVents: Info: ------ Finished dimmer_salon_ok
2022-02-04 09:01:08.054 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2022-02-04 09:01:08.057 Status: Set UserVariable var_actPosDimSal = 99
2022-02-04 09:01:08.188 Status: dzVents: Info: Handling events for: "dimmer_salon", value: "Open"
2022-02-04 09:01:08.188 Status: dzVents: Info: ------ Start internal script: dimmer_salon_ok: Device: "dimmer_salon (volets_salon)", Index: 288
2022-02-04 09:01:08.189 Status: dzVents: Info: dimmer_salon level is
2022-02-04 09:01:08.189 Status: dzVents: Info: 99
2022-02-04 09:01:08.190 Status: dzVents: Info: état dimmer salon
2022-02-04 09:01:08.190 Status: dzVents: Info: Open
2022-02-04 09:01:08.190 Status: dzVents: Info: la valeur précédente était :
2022-02-04 09:01:08.190 Status: dzVents: Info: 99
2022-02-04 09:01:08.191 Status: dzVents: Info: ------ Finished dimmer_salon_ok
Last edited by spacenoun on Friday 04 February 2022 18:42, edited 1 time in total.
User avatar
waltervl
Posts: 6689
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Problem with script dzvents after update

Post by waltervl »

There were some changes in Blinds configuration and behavior. Perhaps try to use 100 instead of 99.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jvdz
Posts: 2445
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Problem with script dzvents after update

Post by jvdz »

Which ZWAVE interface are you using? (ZWAVEJS2MQTT or OpenZwave ?)

In General 99% isn't Open in Domoticz, but is in ZWAVE, so internally we recalculate "Open"/"Off"/100 to 99 to be send to ZWAVE as 100 means "go to the previous position".
So, when you do the same now in your script you basically create an endless loop.
spacenoun
Posts: 7
Joined: Friday 04 February 2022 14:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: SOLVED - Problem with script dzvents after update

Post by spacenoun »

Hello. I don't use ZWAVE. I solved the problem : I deleted the 'test modif' condition and now it works again. I wasn't the case with the previous version of domoticz.
And thanks Waltervl for the suggetion, now i can use 100 for open and 0 for close.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest