Page 1 of 1
How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 2:11
by edozwart
hi everybody!
merry christmas to everybody! Can you help me out? I am trying to create a virtual switch on my "switches" panel (via hardware/dummy switch) to disable/enable my saved blockly event, but I don't know how to. My goal is that my script is normally enabled, the lights will be off at night, but it can happen that I want them enabled so easily want to disable the script (with my phone for example).
Please let me know if you know how to handle this.
thanks!
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 4:27
by Egregius
Create a dummy switch and check it's status in your script.
Something like:
if(switch['dummy']=='On') AND ...
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 9:09
by edozwart
hi Egregrius,
thanks for pointing me into the right direction! I can create that script using blockly for example but I don't know how to point to the saved event to disable that. Can you help me with that? Can that be done with blockly itself?
Thanks!
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 10:26
by SweetPants
I'm not sure if this also counts for blockly events because I don't use that, but for LUA and dzVentz it works
/json.htm?type=events¶m=updatestatus&eventid=21&eventstatus=0
use this JSON to get the list of events
/json.htm?type=events¶m=list
edit: Should also work for Blockly
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 10:46
by Egregius
edozwart wrote: ↑Monday 25 December 2017 9:09
hi Egregrius,
thanks for pointing me into the right direction! I can create that script using blockly for example but I don't know how to point to the saved event to disable that. Can you help me with that? Can that be done with blockly itself?
Thanks!
You don't disable your script, you just add another if statement so that the script is only executed when that switch is on.
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 16:41
by edozwart
hi sweet and Egregius,
thanks for the quick advice and helping me out! I used the tip from Egregius, works like a charme, thank you very much! Hereby my blockly script, maybe also handy for other people:
thanks guys!
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 18:41
by Denny64
In the last pass I would do:
Else if Time > 22:01 and Living Lamp Ceiling (3) = ON
Set Living Lamp Ceiling (3) = OFF
This to have more precision on the switch log and avoid to send frequent and useless commands on the z-wave network.
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Monday 25 December 2017 19:20
by edozwart
Thanks Denny64 for the tip, good point! I have updated my script!
love this forum!
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Tuesday 26 December 2017 10:30
by SweetPants
Egregius wrote: ↑Monday 25 December 2017 10:46
edozwart wrote: ↑Monday 25 December 2017 9:09
hi Egregrius,
thanks for pointing me into the right direction! I can create that script using blockly for example but I don't know how to point to the saved event to disable that. Can you help me with that? Can that be done with blockly itself?
Thanks!
You don't disable your script, you just add another if statement so that the script is only executed when that switch is on.
Be aware, your script is still fired. If it is time based every minute
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Wednesday 27 December 2017 15:22
by edozwart
hi! I know, I have ordered a dusk sensor to improve this and to avoid to use times.
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Posted: Sunday 31 December 2017 23:15
by matteos1