Page 1 of 1

help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 11:36
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

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 15:30
by ronaldbro
I think the correct syntax is ‘between 9:00 and 21:00’

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 16:13
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

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 19:58
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]

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 20:15
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.

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 20:22
by colint
If i go back to 2020.1, the issue wil then be fixed?

Re: help with dzVents 2020.2 dim value

Posted: Saturday 09 May 2020 20:35
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.

Re: help with dzVents 2020.2 dim value  [Solved]

Posted: Sunday 10 May 2020 18:19
by colint
Updated to beta and it is fixed.

Thanks for your help!