help with dzVents 2020.2 dim value  [Solved]

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

Moderator: leecollings

Post Reply
colint
Posts: 12
Joined: Friday 25 November 2016 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

help with dzVents 2020.2 dim value

Post by colint »

Hello All,

I am trying to get a dzVents script working but i have no succes.

The script i am using is from this topic viewtopic.php?f=59&t=29345
The problem is that de dim value is not changing at the times set is the script.

here is the script:

Code: Select all

return
{
   on =
   {
      devices = { 'Kinderkamer' },
   },

    logging =
    {
        level = domoticz.LOG_DEBUG,
        marker = 'dim based on time'
    },

   execute = function(dz, item)

        dz.log('Kinderkamer state: ' .. item.state,dz.LOG_DEBUG)

        if item.active and item.lastUpdate.secondsAgo > 4 then 
                if dz.time.matchesRule('at 09:00-21:00') then
                    item.dimTo(100).silent()
                else
                    item.dimTo(20).silent()
                end
        elseif item.lastUpdate.secondsAgo > 4 then
            item.dimTo(0).silent()
        end
    end
} 
here is de log:

Code: Select all

2020-05-09 11:24:36.478 Status: dzVents: Info: Handling events for: "Kinderkamer", value: "On" 
2020-05-09 11:24:36.478 Status: dzVents: Info: dim based on time: ------ Start internal script: Kinderkamer dimstand: Device: "Kinderkamer (Z-wave stick)", Index: 42 
2020-05-09 11:24:36.478 Status: dzVents: Debug: dim based on time: Kinderkamer state: On 
2020-05-09 11:24:36.478 Status: dzVents: Info: dim based on time: ------ Finished Kinderkamer dimstand 
My setup is Rpi 4 with AeonTec zwave+ and qubino dimmers

thanks for the help.

Colin
ronaldbro
Posts: 327
Joined: Thursday 15 November 2018 21:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: help with dzVents 2020.2 dim value

Post by ronaldbro »

I think the correct syntax is ‘between 9:00 and 21:00’
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: help with dzVents 2020.2 dim value

Post by waaren »

colint wrote: Saturday 09 May 2020 11:36 I am trying to get a dzVents script working but i have no succes.

The problem is that de dim value is not changing at the times set is the script.
What is your domoticz / dzVents version ?
between build 11886 and 12002 the lastUpdate value was not correctly send to dzVents

@ronaldBro
between 9:00 and 21:00
and
at 09:00-21:00
are both OK
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
colint
Posts: 12
Joined: Friday 25 November 2016 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: help with dzVents 2020.2 dim value

Post by colint »

My Domoticz version is:

Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 13:47:55
dzVents Version: 3.0.2
Python Version: 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: help with dzVents 2020.2 dim value

Post by waaren »

colint wrote: Saturday 09 May 2020 19:58 My Domoticz version is: Build Hash: b63341bc0, Compile Date: 2020-04-26 13:47:55
Yes this is one of the builds with the lastUpdate issue.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
colint
Posts: 12
Joined: Friday 25 November 2016 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: help with dzVents 2020.2 dim value

Post by colint »

If i go back to 2020.1, the issue wil then be fixed?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: help with dzVents 2020.2 dim value

Post by waaren »

colint wrote: Saturday 09 May 2020 20:22 If i go back to 2020.1, the issue wil then be fixed?
Domoticz will not allow you to go back if you use the same database. Between these versions database schema changes were applied and domoticz will not revert these changes.

My approach would be to make a good backup of your current domoticz directory and update to latest Beta. Check if everything works ok and if so stay on this version and switch off check for updates in the settings system tab.
If you see other issues then stop domoticz, restore your backup and start domoticz again.

beta's in domoticz are just the latest stable with some bugfixes and new features.

You can see on this wiki page what the changes are in the latest beta compared to latest stable.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
colint
Posts: 12
Joined: Friday 25 November 2016 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: help with dzVents 2020.2 dim value  [Solved]

Post by colint »

Updated to beta and it is fixed.

Thanks for your help!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest