Page 20 of 36
Re: Blockly examples
Posted: Saturday 24 December 2016 0:20
by tjabas
StanHD wrote:Similar to this is worth a try:-

i gave it a try, but it didnt work with the timer and sunset block, i had to make a dummy that aktivates by sunset , ant put it where the timer and sunset block was on your description, then it worked.
thanks for your help.
by the way, how can i inaktivate a switch?
is it possible to make a switch unactive during a sertain time, lets say inactivated during sunset, but activated after sunrise, it should be possible to push the inactivated button in domoticz and nothing should happen, until dawn, then when i push it it will work.
thanks again.
Re: Blockly examples
Posted: Wednesday 28 December 2016 20:33
by rhendriks
How can I make that a dummy switch named Alert (on the dashboard) react on a input from the Piface.
For example:
The switch is Always on , if the switch is off then must the dummy(alert-triangle) should be red.
If I do this with an switchdummy it works but not if I used an alarmdummy.
who can give me an idea?
Re: Blockly examples
Posted: Friday 30 December 2016 22:31
by tjabas
Hi!
i have a hardware button that activates a switch in domoticz, but i want to push the hardware button 2 times within a range of 5 seconds to activate the switch in domoticz. and if i push the hardware button twice outside the 5 seconds limit, then the switch in domoticz wont activate.
is this doable in blocky?
Re: Blockly examples
Posted: Saturday 31 December 2016 23:49
by tnegun
Hey guys,
I'm having some trouble with the example below. Each of the nested conditions is matched once the first is matched e.g. If Play Room temp is less than 16, I get email alerts for each condition confirming an match.
Can someone point out the obvious to me

Re: Blockly examples
Posted: Sunday 01 January 2017 4:12
by StanHD
Try re-building without nesting. It should be ok then.

Re: Blockly examples
Posted: Sunday 01 January 2017 11:22
by TacticalLeader
Is it able in Blockly to count seconds passed?
For example: if I want to turn off a switch depends on a temperature
- if the temperature was more than 50 degrees for more than 30 minutes and
- after some time the temperature goes less than 35 degrees and in this case, turn the switch on
Or I should learn LUA

Re: Blockly examples
Posted: Sunday 01 January 2017 12:38
by tnegun
StanHD wrote:Try re-building without nesting. It should be ok then.

Something like this then? It seems to be working

Re: Blockly examples
Posted: Sunday 01 January 2017 17:39
by StanHD
That's it

Re: Blockly examples
Posted: Saturday 07 January 2017 0:12
by NOTORIOUSVR
Can someone advise/clarify please.
Why would this work:
But this not?
I've left out the time variable to simplify, but ideally I'd like to have both PIR's and time (after sunset) involved so avoid triggering the scene when I'm home (as it would override what scene/lights are already on).
EDIT: Oddly enough, this works (one PIR):

Re: Blockly examples
Posted: Saturday 07 January 2017 12:44
by four2six
Sunset as a variable proved to be very unreliable. Make a virtual switch that turns on at sunset and off at sunrise, so you have the "night time" you desire. Use that switch in your blockly instead.
Re: Blockly examples
Posted: Saturday 07 January 2017 12:50
by StanHD
In your middle blockly. Should be:-
[Kitchen Motion Sensor = Off] and [Living Room Motion Sensor = Off]
Re: Blockly examples
Posted: Saturday 07 January 2017 19:27
by NOTORIOUSVR
four2six wrote:Sunset as a variable proved to be very unreliable. Make a virtual switch that turns on at sunset and off at sunrise, so you have the "night time" you desire. Use that switch in your blockly instead.
Thanks for the tip!
StanHD wrote:In your middle blockly. Should be:-
[Kitchen Motion Sensor = Off] and [Living Room Motion Sensor = Off]
Hmm... I think I've tried that combo at some time, but I'll give it another shot and report back maybe the syntax was not quite right.
Re: Blockly examples
Posted: Sunday 08 January 2017 11:43
by tjabas
Hi!
i have made this simple blocky, it is supposed to turn of the fan to my stove when the air temperature goes below 25 degrees celcius, this works very well, but i have problem when i want to start the fan when the air is cold, below 25 degrees the fan turns of emediately, i have to keep a fire in the stove for about 10 minutes before the fan stops from turning off.
is it possible to do it like this , when the air temp reaches 30 degrees then the blocky ive made turns active?
[img]

- kamin.PNG (6.81 KiB) Viewed 3466 times
[/img]
Re: Blockly examples
Posted: Sunday 08 January 2017 11:54
by DutchHans
Cant you use "off after 10 minutes" and maybe put your switch temperature to 23 or 24?
Cheers, Hans
Re: Blockly examples
Posted: Sunday 08 January 2017 12:03
by tjabas
DutchHans wrote:Cant you use "off after 10 minutes" and maybe put your switch temperature to 23 or 24?
Cheers, Hans
i was also thinking about putting a delay in the of command, but i guess that i just put a delay in the off swith, even if the temp goes over 25 dgr , and the of command has been made, i just delay the off command with 10 min.
Re: Blockly examples
Posted: Monday 09 January 2017 11:25
by tjabas
tjabas wrote:Hi!
i have made this simple blocky, it is supposed to turn of the fan to my stove when the air temperature goes below 25 degrees celcius, this works very well, but i have problem when i want to start the fan when the air is cold, below 25 degrees the fan turns of emediately, i have to keep a fire in the stove for about 10 minutes before the fan stops from turning off.
is it possible to do it like this , when the air temp reaches 30 degrees then the blocky ive made turns active?
[img]kamin.PNG[/img]
i have noticed that this blocky config is constantly turning the fan of after it has passed 25c degrees and down, domoticz it constantly sending an off command as soon as it passes 25degrees and down.
how can i change this so it only sends just one off command when it passes 25c?
Re: Blockly examples
Posted: Monday 09 January 2017 19:36
by tozzke
tjabas wrote:tjabas wrote:Hi!
i have made this simple blocky, it is supposed to turn of the fan to my stove when the air temperature goes below 25 degrees celcius, this works very well, but i have problem when i want to start the fan when the air is cold, below 25 degrees the fan turns of emediately, i have to keep a fire in the stove for about 10 minutes before the fan stops from turning off.
is it possible to do it like this , when the air temp reaches 30 degrees then the blocky ive made turns active?
[img]kamin.PNG[/img]
i have noticed that this blocky config is constantly turning the fan of after it has passed 25c degrees and down, domoticz it constantly sending an off command as soon as it passes 25degrees and down.
how can i change this so it only sends just one off command when it passes 25c?
Add/create a variable '25C_passed?' (integer 1/0 or string yes/no) and add it into the blockly so you'll get something like this:
Code: Select all
If [Kamin temp < 25] and [variable 25_passed? = 0]
Do [set Kamin = Off]
[set variable 25_passed? = 1]
and change it back to 0 when it reaches another temp with an 'else if'
Re: Blockly examples
Posted: Monday 09 January 2017 20:30
by tjabas
ok, i will try this, but im a but unsecure in this blocky thing, how do make a variable '25C_passed?
im not so good at this blocky yet, but im getting there.
Re: Blockly examples
Posted: Monday 09 January 2017 22:56
by tjabas
]i did it like this: [img]

- Skärmklipp.PNG (9.86 KiB) Viewed 3385 times
[/img]
Re: Blockly examples
Posted: Tuesday 10 January 2017 1:13
by sion
tjabas wrote:Hi!
i have a hardware button that activates a switch in domoticz, but i want to push the hardware button 2 times within a range of 5 seconds to activate the switch in domoticz. and if i push the hardware button twice outside the 5 seconds limit, then the switch in domoticz wont activate.
is this doable in blocky?
I do something like this with one of my outside sensor where if we are not in, and it is triggered twice within a couple of mins, it sets off a light sequence inside resembling someone going through the house.
There is probably an easier way to do this, but this works for me.
You will need 3 dummy switches.
Link one of them to the hardware switch. (SwitchA)
So when button is pressed it turnes on.
Something like:
If:switchA = on. And switchB = off
Do:
turn on switchB.
turn off switchB after 5 seconds.
Else if: switchA =on and switchB = on
Do:
turn on switchC
Turn off switchB.