Page 2 of 2

Re: DzVents doesn't run scripts

Posted: Thursday 25 July 2019 10:20
by waaren
pgielen wrote: Wednesday 24 July 2019 23:11 I am also having the same problem. Dzvents just turns off randomly, it seems.
Sorry but I need a bit more information to be able to help.
  • Do you see anything in the log around the time dzVents stops
  • Did you check for an unexpected camera in your domoticz
  • What suggestions made in this topic did you already try
  • Is your domoticz system accessible from the internet and if so did you check that it can only be accessed using a strong password / VPN or similar security level
  • Is your LAN or any system on it that can access domoticz accessible from the internet and if so; secure enough

Re: DzVents doesn't run scripts

Posted: Saturday 27 July 2019 19:07
by pgielen
I'll have to check. It's a bit of a problem now that I am still on vacation, but is there a way to check every 10 minutes or so if dzvents is still active, from within another scripting language (since only dzvents turns off, not the other languages) so I can get a notification when it happens again?

Re: DzVents doesn't run scripts

Posted: Saturday 27 July 2019 20:10
by waaren
pgielen wrote: Saturday 27 July 2019 19:07 Is there a way to check every 10 minutes or so if dzvents is still active, from within another scripting language (since only dzvents turns off, not the other languages) so I can get a notification when it happens again?
Sure. Create a virtual switch 'dzVents' and use this combination of dzVents and Blockly

Code: Select all

return
{
    on  = { timer = { "every minute" }},

    execute = function(dz)
        local dzVents = dz.devices('dzVents')
        dzVents.cancelQueuedCommands()
        dzVents.switchOn().afterSec(120)
    end
}
dzVents check alive Blockly
dzVents check alive Blockly
dzVents.png (62.94 KiB) Viewed 2880 times
copy code below to your clipboard and import into a device triggered Blockly script. The Blockly is set to send an alert using the pushover subsystem but you can easily change that to one of the other notification subsystems.

Code: Select all

<xml xmlns="http://www.w3.org/1999/xhtml"><block type="domoticzcontrols_if" id="6]gTA!5}Pl*[|6#E3j~_" x="16" y="10"><value name="IF0"><block type="logic_compare" id="z#qwCs!QS_oQjYvfb;zN"><field name="OP">EQ</field><value name="A"><block type="switchvariablesAF" id="{i-I2P_61r@i;bT^]0!?"><field name="Switch">2233</field></block></value><value name="B"><block type="logic_states" id="J@+zJxa7/0WbbtbP*WC-"><field name="State">On</field></block></value></block></value><statement name="DO0"><block type="send_notification" id="0kuGPumno2:5XBs2U3?Z"><field name="notificationSubsystem">pushover</field><field name="notificationPriority">0</field><field name="notificationSound">pushover</field><value name="notificationTextSubject"><block type="text" id="`;U[a2LtgRBVQQOS#WTU"><field name="TEXT">dzVents checker</field></block></value><value name="notificationTextBody"><block type="text" id="bW*GzY}qG.gnu}yeY]eG"><field name="TEXT">dzVents eventsystem  disabled</field></block></value></block></statement></block></xml>

Re: DzVents doesn't run scripts

Posted: Sunday 28 July 2019 16:21
by pgielen
Thanks done it and checked it; it works! Now I can wait and see if it happens and examine the log on the right time. Apparently the delayed switch command, once triggered, does not depend anymore on the dzvents systems being active. I only have to remember to switch off the virtual switch manually after turning dzVents back on, otherwise it will stay on.