Page 12 of 36

Re: Blockly examples

Posted: Wednesday 21 October 2015 9:26
by cattoo
Hi all,
I want my LUX sensor activate my lights between 15:00 and 22:30 when it goes below 60 Lux, and that part is working (ill think)
But when the time is between 06:00 and 09:00 ill want the motion sensor to handle the lights, but it does not work. What have i done wrong?

Image

Re: Blockly examples

Posted: Thursday 22 October 2015 12:47
by StanHD
Not sure but try "And" in place of "Or" for your time periods.

Re: Blockly examples

Posted: Thursday 22 October 2015 15:50
by mrf68
Let's assume it is 12:00 hours and LUX < 60. Then read line 1:

If LUX < 60

that is true, so we continu reading the condition, and because of the OR statement that follows one of the conditions need to be true:
TIME >=15:00
that is not true, but because of the OR we need to check the second condition:
TIME <=22:30
that is true, so it will activate the lights.

Try time = 17:00 hours, then both time conditions are true.
Try time = 23:19 hours, then the first condition (TIME >=15:00) is true.

In my opinion this part will always be true. Same goes for the second part of the script with the Motion sensor.

I must say I make this mistake myself every now and then. And maybe my interpretation at this moment is not correct, please feel free to correct me. :mrgreen:

Re: Blockly examples

Posted: Sunday 25 October 2015 9:54
by thecosmicgate
Running this somebody home blokckly:
Image
But the problem is that the virtual switch flips every second on and off .
As the ping script i'am running chopperRob's script.
As geofence tool we run the android domofence app.

Somebody who can tell me , why the somebody home switch is flipping ?

Re: Blockly examples

Posted: Sunday 25 October 2015 19:23
by thecosmicgate
thecosmicgate wrote:Running this somebody home blokckly:
Image
But the problem is that the virtual switch flips every second on and off .
As the ping script i'am running chopperRob's script.
As geofence tool we run the android domofence app.

Somebody who can tell me , why the somebody home switch is flipping ?
Changed it:
Image

but the somebody home switch keeps flipping on / off every second :(

Re: Blockly examples

Posted: Monday 02 November 2015 21:11
by Skippiemanz
I think if you change the 2nd or in else if to and it will work. Because all the devices have to be off for the system to turn iemand thuis off

Re: Blockly examples

Posted: Wednesday 04 November 2015 20:40
by thecosmicgate
Skippiemanz wrote:I think if you change the 2nd or in else if to and it will work. Because all the devices have to be off for the system to turn iemand thuis off
Problem solved ...next ;-)

Sent from my MotoG3 using Tapatalk

Re: Blockly examples

Posted: Wednesday 11 November 2015 17:32
by Richardsnel
I created a Blockly script but how can i run it?

Re: Blockly examples

Posted: Thursday 12 November 2015 11:53
by thecosmicgate
Richardsnel wrote:I created a Blockly script but how can i run it?
Domoticz does this for you ;-)

Sent from my MotoG3 using Tapatalk

Re: Blockly examples

Posted: Thursday 12 November 2015 17:03
by Skippiemanz
If you marked the blockly as active

Re: Blockly examples

Posted: Thursday 12 November 2015 22:12
by Richardsnel
I marked it as active but wil it run every our?

Re: Blockly examples

Posted: Thursday 19 November 2015 21:39
by djoeney
FYI
Automate turning off AV devices in combination with Logitech Harmony HUB and z-wave power switch (could also be a KAKU device or whatever power switch you use).

The logic is when you turn off activity's with your remote control the poweroff switch is turned ON. When this happens you have 5 minutes after that the power switch is turned off. If you put the power switch back on you have 5 minutes to turn on an activity on the remote otherwise the switch is turned off again.

Re: Blockly examples

Posted: Friday 27 November 2015 17:13
by doxikus
Hi to all,

I try to create simple rule to send notification with blocky, I hope that someone can help me to pint right direction.

Rule will be something like this, if temperature is larger than some value send notification each 5 minutes. I use dummmy/virtual sensor so notification don't work on sensor notification settings. Right now I have this rule but it will send mail each minute. Domoticz is installed on synology.
blocky.jpg
blocky.jpg (43.42 KiB) Viewed 4847 times
Thanks

Re: Blockly examples

Posted: Monday 30 November 2015 22:26
by Evelen
Sending E-Mail when smokedetector is detecting smoke:
Image

EDIT: And turing on lamp:
Image
also video:

https://sendvid.com/tqnqdxcc

Re: Blockly examples

Posted: Saturday 05 December 2015 0:24
by MarcelMAH
I'm trying to create a Blocky to toggle the dummy switch 'Someone home'.
If one of the 4 switches (2x Geo 2x ping) is on then 'Someone home' must me set on.

If none of the 4 switches is on then 'Someone home' must be set to off.

It's not working :(
SomeoneHome.png
SomeoneHome.png (81.79 KiB) Viewed 4747 times

Re: Blockly examples

Posted: Saturday 05 December 2015 23:37
by alfred_j_kwak
If none of the switches are one then your AND part is ON not OFF.

Re: Blockly examples

Posted: Sunday 06 December 2015 12:06
by MarcelMAH
alfred_j_kwak wrote:If none of the switches are one then your AND part is ON not OFF.
You mean this one?
onoff.png
onoff.png (30.29 KiB) Viewed 4704 times
Changed it, still no go... it won't turn it on even when everything else is on.

Re: Blockly examples

Posted: Sunday 06 December 2015 14:53
by StanHD
This one works for sure:-

Image

Re: Blockly examples

Posted: Sunday 06 December 2015 17:34
by Westcott
Hi StanHD,

How do you do your Galaxy Geofence?
DomoFence?

Re: Blockly examples

Posted: Sunday 06 December 2015 21:19
by StanHD
Yes, Domo fence.