Hello guys,
I was wondering if it is possible to call / set the level or niveau on blockly by adding some kind of variable to the block? I have a XIaomi gateway which I want to be activated whenever someone walks by for example I have added my script been searching and trying to figure out how this was able to be fixed.
Can't seem to figure out how this could be fixed. Let me know if someone has information please. Thanks in advance!
Calling levels / niveau by Blockly
Moderator: leecollings
-
- Posts: 7
- Joined: Monday 14 May 2018 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Calling levels / niveau by Blockly
- Attachments
-
- alarm-aan.png (183.69 KiB) Viewed 371 times
-
- Posts: 7
- Joined: Monday 14 May 2018 10:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Calling levels / niveau by Blockly
Okay, I did find out how to set the alarm to a certain level now which goes by creating a new switch which I have named 'alarm-set-geluid' I can loop the sound for a certain amount of time but I can't set it to keep looping untill the alarm has been turned off the switch uses the following command at this moment:
But is it also possible to get the sound in a permanent loop untill it has been deactivated, for example this I what I am testing with now..
Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=switchlight&idx=31&switchcmd=Set%20Level&level=30
- Attachments
-
- alarm-aan-flip-sound.jpg (267.42 KiB) Viewed 367 times
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Calling levels / niveau by Blockly
Maybe you can make a dummy switch?
In the "If" and "dummy = off"
in the "Do" set "dummy = on"
Then make an "else if" and make it like:
"If" "dummy = on"
"Do" "set dummy off after 6 sec"
And another "else if" to reset the dummy if the alarm is off:
"If" "alarm = off"
"Do" "set dummy off"
Something like this maybe?
In the "If" and "dummy = off"
in the "Do" set "dummy = on"
Then make an "else if" and make it like:
"If" "dummy = on"
"Do" "set dummy off after 6 sec"
And another "else if" to reset the dummy if the alarm is off:
"If" "alarm = off"
"Do" "set dummy off"
Something like this maybe?
Who is online
Users browsing this forum: No registered users and 1 guest