Page 9 of 36
Re: Blockly examples
Posted: Saturday 16 May 2015 18:39
by thecosmicgate
ThinkPad wrote:Some events that i created:
Detect if there is someone home
Almost all my other events are based on this one. This event will tell Domoticz if there is someone home or not.
This event is based on two virtual switches, where one is switched by a geofence app on iPhone, and the other by this script:
http://www.domoticz.com/wiki/Presence_detection

'IemandThuis' translates to 'SomeoneHome'
Switch on lights when we are home, and it is getting dark
This event turns on some lights when we are home, and it is starting to get dark. The variable is used so that the event is only triggered once. Otherwise it would trigger again when we turn off the lights by hand when we go to bed.

The '15min_before_zononder' is a virtual switch that turns on 15 min before sunset, and off at 0:01
Turn on lights when we arrive home and it is dark outside
This event turns on some lights when we arrive home and it is dark outside. The variable is used so that the event is only triggered once. Otherwise it would trigger again when we turn off the lights by hand when we go to bed.

First line ends with "IsDonker = On"
The "IsDonker" switch i use, is a virtual switch that is turned on/off by timers. It is turned on at sunset, and turned off at sunrise. This way it covers the whole 'dark' period of the evening/night. This is easy to use in events. By doing this my lights will never switch on accidentaly at daytime.
Unfortunately they are in Dutch, but i hope they are still useful for someone...
I use this someone home switch, but whe try to open the log the browser crashes.
Are there more people who use this blockly and having this log issue ?
Or maybe better , the solution

Re: Blockly examples
Posted: Sunday 17 May 2015 22:01
by djoeney
Hi,
I have followed a example from this forum only it doesn't work?

Re: Blockly examples
Posted: Sunday 17 May 2015 22:04
by ThinkPad
Hi, welcome to this forum!
The 'IemandThuis = Off' part is not correct. Make it like this:
IemandThuis = Off AND [Anna = On OR Jeroen = On]
Same for the 'ELSE IF' line. The rest of it is correct.
So you have 1 AND block, and inside is:
- IemandThuis = Off
- [Anna = On OR Jeroen = On]
See this one:
http://i.imgur.com/0lQrGcL.png i made (also shown a few posts above)
Re: Blockly examples
Posted: Sunday 17 May 2015 22:24
by djoeney
Hi ThinkPad,
What a warm welcome, thanks for the quick reply. This does the trick, now i can put off the radio in the morning when nobody is home:). Cant wait till my RFXtrx433E is delivered.
Re: Blockly examples
Posted: Sunday 17 May 2015 22:35
by ThinkPad
Hehe this is only the tip of the iceberg

I can guarantee you that you will spend a looooooooooot of time in configuring the most fantastic events and such
Have fun!

Re: Blockly examples
Posted: Wednesday 27 May 2015 8:36
by ThinkPad
I found this nice event which triggers a switch if movement is detected by a motion sensor. If no motion is detected anymore after 1 minute, the light will turn off.
If within that minute there is still motion, the light will stay on until no motion is detected anymore.
Works great!

Credits go to bizziebis:
http://www.domoticz.com/forum/viewtopic ... pir#p14415
Add another (dummy) switch which will switch off after 1 minute (it's a setting of the switch) and call it for example 1 Min Timer (in my example)
Every time the PIR detects motion the timer will be activated again and starts counting down from 60 seconds. Until the last movement is detected, then the light will go off.
Re: Blockly examples
Posted: Thursday 28 May 2015 16:23
by spudgunman
That's great! I am working on making lights turn on around the house when you walk in to rooms automatically. Thanks
Re: SCRIPS - EVENT MANAGEMENT SAMPLE
Posted: Friday 29 May 2015 23:40
by dressie
Jochen wrote:Turn on a Light when open a door
This example will turn on a light when
1. A door is opening
2. It is between 22:00 and 07:00
A notification will be send everytime the is opening (00:00 - 24:00)
dooropenlighton.PNG
PS: The device
Garagentor is the door (Garagentor = Garagedoor), the light is light is
Licht Garage (Light Garage)
How did you get the double IF /DO option?
Re: Blockly examples
Posted: Saturday 30 May 2015 10:43
by havnegata
This is exactly what I want, but where is this setting for the countdown timer?
Re: Blockly examples
Posted: Sunday 31 May 2015 10:13
by dressie
Hello!
I'm new to Domoticz and pretty happy with it! Slowly I'm having Domoticz take over tasks from Homewizard, but I can't seem to figure this "simple" one out. Do you guy know what's going wrong?
The light goes on when the door opens, but it does it for 24hours and not according the set Sunset-Sunrise time. Already did my research in this form, copied many examples but with no success.

Re: Blockly examples
Posted: Sunday 31 May 2015 10:48
by ThinkPad
IF [Frontdoor = Open] AND [Time > Sunset] OR [Time < Sunrise]
DO SET .....
The nesting of the elements (with the AND/OR parts) is not correct.
Build it like this:

Re: Blockly examples
Posted: Sunday 31 May 2015 10:50
by dressie
ThinkPad wrote:IF [Frontdoor = Open] AND [Time > Sunset] OR [Time < Sunrise]
DO SET .....
The nesting of the elements (with the AND/OR parts) is not correct.
How would I be able to solve this one? I haven't figured out the "inline" and "outline" inputs.
I simply want: IF the frondoor opens, and it's between Sunset and Sunrise, turn on the hall-light.
Re: Blockly examples
Posted: Sunday 31 May 2015 10:52
by ThinkPad
I have updated my post with a screenshot. Pay attention to the boxes around items in the screenshot (the brackets in my text written event)
Re: Blockly examples
Posted: Sunday 31 May 2015 11:00
by dressie
ThinkPad wrote:I have updated my post with a screenshot. Pay attention to the boxes around items in the screenshot (the brackets in my text written event)
I start to see it now! Thanks! Just trying to figure out how to make these sepperate "event" between the brackets.
Re: Blockly examples
Posted: Thursday 04 June 2015 7:35
by dressie
Perhaps my Google-skills arn't that great, but I can't seem to find a blockly example of doorbel = send snapshot to email?
This is the last function that's still being done by my HomeWizard

Blockly examples
Posted: Thursday 04 June 2015 7:59
by Luuc_a
You van do this without a blocky. Go to Settings -> More options -> Camera. Select the camera and at the bottom select the doorbell and click on add.
When you've done this and go to switches then to your doorbell you'll see a camera icon.
Re: Blockly examples
Posted: Thursday 04 June 2015 8:55
by leoncornelissen
I created two events to switch on the fan if the humidity is too high but the events won't trigger. Do I need to set something special in the configuration?
Re: Blockly examples
Posted: Thursday 04 June 2015 14:48
by dressie
Luuc_a wrote:You van do this without a blocky. Go to Settings -> More options -> Camera. Select the camera and at the bottom select the doorbell and click on add.
When you've done this and go to switches then to your doorbell you'll see a camera icon.
Thanks! It was that simple!
Re: Blockly examples
Posted: Friday 05 June 2015 8:57
by ThinkPad
leoncornelissen wrote:I created two events to switch on the fan if the humidity is too high but the events won't trigger. Do I need to set something special in the configuration?
No.
Probably there is an error in your event. If you post it here maybe we can help.
Re: Blockly examples
Posted: Sunday 14 June 2015 19:03
by leoncornelissen
I stopped the block service and started it again. Now it works fine. Still limited in functionality but more reason to learn lua