How to create a dashboard virtual switch to disable/enable a saved blockly event?
Moderator: leecollings
-
- Posts: 10
- Joined: Sunday 12 November 2017 20:27
- Target OS: Windows
- Domoticz version:
- Contact:
How to create a dashboard virtual switch to disable/enable a saved blockly event?
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!
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!
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Create a dummy switch and check it's status in your script.
Something like:
if(switch['dummy']=='On') AND ...
Something like:
if(switch['dummy']=='On') AND ...
-
- Posts: 10
- Joined: Sunday 12 November 2017 20:27
- Target OS: Windows
- Domoticz version:
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
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!
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?
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
/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
Last edited by SweetPants on Monday 25 December 2017 10:49, edited 2 times in total.
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
You don't disable your script, you just add another if statement so that the script is only executed when that switch is on.
-
- Posts: 10
- Joined: Sunday 12 November 2017 20:27
- Target OS: Windows
- Domoticz version:
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
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!
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!
- Attachments
-
- Knipsel.PNG (45.34 KiB) Viewed 2116 times
- Denny64
- Posts: 53
- Joined: Friday 03 February 2017 11:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Italy
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
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.
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.
-
- Posts: 10
- Joined: Sunday 12 November 2017 20:27
- Target OS: Windows
- Domoticz version:
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
Thanks Denny64 for the tip, good point! I have updated my script!
love this forum!
love this forum!
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
-
- Posts: 10
- Joined: Sunday 12 November 2017 20:27
- Target OS: Windows
- Domoticz version:
- Contact:
Re: How to create a dashboard virtual switch to disable/enable a saved blockly event?
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?
Spam???googlecustomer wrote:For making this just click on this link
http://www.digitaljournal.com/pr/3600586
Who is online
Users browsing this forum: No registered users and 1 guest