DzVents doesn't run scripts  [Solved]

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

Moderator: leecollings

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DzVents doesn't run scripts

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
pgielen
Posts: 91
Joined: Monday 18 February 2019 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Boxmeer
Contact:

Re: DzVents doesn't run scripts

Post 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?
https://robothuis.nl, RPi4B, RFXCOM XL, Aeotec Z-Stick, ESP Easy, Weatherstation, several switches and sensors, Ikea Trädfri, Philips Hue, Foscam, Reolink, Lyric T6, Ring
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DzVents doesn't run scripts

Post 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 2875 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>
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
pgielen
Posts: 91
Joined: Monday 18 February 2019 14:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Boxmeer
Contact:

Re: DzVents doesn't run scripts

Post 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.
https://robothuis.nl, RPi4B, RFXCOM XL, Aeotec Z-Stick, ESP Easy, Weatherstation, several switches and sensors, Ikea Trädfri, Philips Hue, Foscam, Reolink, Lyric T6, Ring
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest