Blockly examples
Moderator: leecollings
- CopyCatz
- Developer
- Posts: 123
- Joined: Thursday 11 July 2013 17:28
- Target OS: -
- Domoticz version:
- Location: Outer Heaven
- Contact:
Blockly examples
Post your blockly examples here. Make a screenshot, upload to imgur or something and show it in your post for others to watch and learn.
- Jochen
- Posts: 11
- Joined: Saturday 13 July 2013 10:37
- Target OS: -
- Domoticz version:
- Location: Germany / NRW
- Contact:
Re: SCRIPS - EVENT MANAGEMENT SAMPLE
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)
PS: The device Garagentor is the door (Garagentor = Garagedoor), the light is light is Licht Garage (Light Garage)
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)
PS: The device Garagentor is the door (Garagentor = Garagedoor), the light is light is Licht Garage (Light Garage)
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
-
- Posts: 28
- Joined: Saturday 13 July 2013 9:36
- Target OS: -
- Domoticz version:
- Location: Harderwijk
- Contact:
home ventilation system
I made these 4 events for a home ventilation system. I used a kaku ACM-3500-3 switch to power a itho eco fan with perilex connector.

Edit: This example has been evolved to a more complex situation, for various reasons. See: http://www.domoticz.com/forum/viewtopic ... t=20#p1118

Edit: This example has been evolved to a more complex situation, for various reasons. See: http://www.domoticz.com/forum/viewtopic ... t=20#p1118
Last edited by macaidwin on Thursday 08 August 2013 16:07, edited 1 time in total.
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Events: Blockly examples
I made this event to switch my blinds with KAKU ASUN-650. They go down when the outside temperature is higher then the inside temperature of the livingroom , and this between 10 am and 6 pm.
- Attachments
-
- Blinds01.jpg (78.17 KiB) Viewed 82586 times
-
- Posts: 5
- Joined: Friday 12 July 2013 13:39
- Target OS: -
- Domoticz version:
- Location: Toulon France
- Contact:
-
- Posts: 19
- Joined: Friday 12 July 2013 15:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Events: Blockly examples
Thats interesting. What if all three perilex control lines are powered. Would/could it damage the fan?macaidwin wrote:I made these 4 events for a home ventilation system. I used a kaku ACM-3500-3 switch to power a itho eco fan with perilex connector.
Re: Events: Blockly examples
My first heating scenario.
I am afraid I will need to dig into LUA...
I am afraid I will need to dig into LUA...
-
- Posts: 28
- Joined: Saturday 13 July 2013 9:36
- Target OS: -
- Domoticz version:
- Location: Harderwijk
- Contact:
Re: Events: Blockly examples
In my case, that is no problem. Normally you would power 1 or 1 and 2 or 1 and 3. 1 and 2 and 3 is no problem. I did not yet try only 2 and 3.jackisidore wrote:Thats interesting. What if all three perilex control lines are powered. Would/could it damage the fan?macaidwin wrote:I made these 4 events for a home ventilation system. I used a kaku ACM-3500-3 switch to power a itho eco fan with perilex connector.
-
- Posts: 28
- Joined: Saturday 13 July 2013 9:36
- Target OS: -
- Domoticz version:
- Location: Harderwijk
- Contact:
Re: Events: Blockly examples
Is this working? In my opinion you can't start with 'and' directly after If.bistoury wrote:My first heating scenario.
I am afraid I will need to dig into LUA...
'and' has to be between two options.
Re: Events: Blockly examples
yep, this works.
The only thing that was wrong was the temp condition (xxx = 17 instead of xxx <= 17).
In fact this condition do not start with a 'AND'. It is a standard condition "xxx AND xxx", but I display the statement using 'external input' (right-click on the green and statement).
I find it more readable : I have a temperature condition, then a scene condition (am I already heating @ 19° ?), and then I have my day and time conditions.
As for the moment I have no heating needs
this script went to the trash
Hope this help.
Next time, I will try LUA scripting.
The only thing that was wrong was the temp condition (xxx = 17 instead of xxx <= 17).
In fact this condition do not start with a 'AND'. It is a standard condition "xxx AND xxx", but I display the statement using 'external input' (right-click on the green and statement).
I find it more readable : I have a temperature condition, then a scene condition (am I already heating @ 19° ?), and then I have my day and time conditions.
As for the moment I have no heating needs

Hope this help.
Next time, I will try LUA scripting.
-
- Posts: 28
- Joined: Saturday 13 July 2013 9:36
- Target OS: -
- Domoticz version:
- Location: Harderwijk
- Contact:
Re: Events: Blockly examples
Nice! Learned something new... thanksbistoury wrote:yep, this works.
The only thing that was wrong was the temp condition (xxx = 17 instead of xxx <= 17).
In fact this condition do not start with a 'AND'. It is a standard condition "xxx AND xxx", but I display the statement using 'external input' (right-click on the green and statement).
I find it more readable : I have a temperature condition, then a scene condition (am I already heating @ 19° ?), and then I have my day and time conditions.
As for the moment I have no heating needsthis script went to the trash
Hope this help.
Next time, I will try LUA scripting.
- CopyCatz
- Developer
- Posts: 123
- Joined: Thursday 11 July 2013 17:28
- Target OS: -
- Domoticz version:
- Location: Outer Heaven
- Contact:
Re: Events: Blockly examples
Nice to see that a different notation also worksbistoury wrote:yep, this works..

Re: Events: Blockly examples
I thing next step should be having an ELSE statement.
I know multiple IF is not your 1st target, but the ELSE one is a must have.
have a nice day,
bistoury.
I know multiple IF is not your 1st target, but the ELSE one is a must have.
have a nice day,
bistoury.
Re: SCRIPS - EVENT MANAGEMENT SAMPLE
How did you get that second "if-do" blocked nested?Jochen wrote:
Thats exactly what i need, but I seem unable to do so... (tested in Firefox 22.0 & Chrome 28.0.1500.72)
- CopyCatz
- Developer
- Posts: 123
- Joined: Thursday 11 July 2013 17:28
- Target OS: -
- Domoticz version:
- Location: Outer Heaven
- Contact:
Re: Blockly examples
Currently only one if..do block is supported, that screen is from an older test version.
Re: Blockly examples
Is it going to be re-implemented?
That way the same logic doesn't need to be applied to multiple events.
That way the same logic doesn't need to be applied to multiple events.
- CopyCatz
- Developer
- Posts: 123
- Joined: Thursday 11 July 2013 17:28
- Target OS: -
- Domoticz version:
- Location: Outer Heaven
- Contact:
Re: Blockly examples
It isn't. The idea is that the blockly interface is for users with little experience, who want simple events in the form of a single if..do that are stored individually. For more complex events use lua scripting, there you can implement any logic you want.
- Dynamic
- Posts: 109
- Joined: Friday 12 July 2013 14:50
- Target OS: -
- Domoticz version:
- Location: Enschede
- Contact:
Re: Blockly examples
I made this event to turn on the lights when there is movement outside the bedroom-doors (for example: someone comes out of his bedroom and is on his way to the bathroom or the stairs). In that case the lights are turned on at 100% (if it's before midnight) or at 20% if it's after midnight.
Need to test it tonigt... I'm not sure if the 'set overloop = level 20 % for 1 minute' will work.
Need to test it tonigt... I'm not sure if the 'set overloop = level 20 % for 1 minute' will work.
- Attachments
-
- event-overloop.png (31.89 KiB) Viewed 81170 times
Re: Blockly examples
Hi, I have a question about the first and last post on this thread.
On the first, the person posted an example of a blocky where there is an 'if,do' command within and an 'if,do' command. How do you get Domoticz to create this?
On the last post, the example include an 'else,if' command, I also cant find this on my system.
Just updates to .918
Thanks
On the first, the person posted an example of a blocky where there is an 'if,do' command within and an 'if,do' command. How do you get Domoticz to create this?
On the last post, the example include an 'else,if' command, I also cant find this on my system.
Just updates to .918
Thanks
Who is online
Users browsing this forum: No registered users and 0 guests