I have no idea how you set up your blocky... it looks like you start with and, but shouldn't there be something on the left of the and?StanHD wrote:This one works for sure:-
Blockly examples
Moderator: leecollings
- MarcelMAH
- Posts: 53
- Joined: Friday 04 December 2015 23:35
- Target OS: Linux
- Domoticz version: v3.8025
- Location: Goes, Netherlands
- Contact:
Re: Blockly examples
Running Domoticz on Ubuntu 16.04 on VMware with RFXCOM - RFXtrx433 and Aeotec Z-Stick Gen5
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly examples
It works as it reads line by line:-
If any 1 of the conditions is true ("or" block) and another condition is true ("and" block) then do something.
Else if all of the conditions is true ("and" block) then do something else.
I hope that doesn't confuse things, but as above, just read across line by line.
If any 1 of the conditions is true ("or" block) and another condition is true ("and" block) then do something.
Else if all of the conditions is true ("and" block) then do something else.
I hope that doesn't confuse things, but as above, just read across line by line.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Re: Blockly examples
I've got a Zipator RGBW and would like to change the colors through blockly. So far I only see actions around on/off or dimming. Is it possible to use blockly for changing the color?
If not, does someone have a lua color change example maybe?
Update: possible through json
/json.htm?type=command¶m=setcolbrightnessvalue&idx=5&hue=30&brightness=100&iswhite=false
viewtopic.php?f=4&t=5302&p=33981&hilit= ... lor#p33981
If not, does someone have a lua color change example maybe?
Update: possible through json
/json.htm?type=command¶m=setcolbrightnessvalue&idx=5&hue=30&brightness=100&iswhite=false
viewtopic.php?f=4&t=5302&p=33981&hilit= ... lor#p33981
- remb0
- Posts: 499
- Joined: Thursday 11 July 2013 22:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Blockly examples
I have an nodemcu connected to my buva remote control.
and with 4 virtual switches I can control the buttons.
-- 1
http://192.168.0.60/control?cmd=GPIO,13,1
http://192.168.0.60/control?cmd=GPIO,13,0
-- 2
http://192.168.0.60/control?cmd=GPIO,12,1
http://192.168.0.60/control?cmd=GPIO,12,0
-- 3
http://192.168.0.60/control?cmd=GPIO,14,1
http://192.168.0.60/control?cmd=GPIO,14,0
-- 4
http://192.168.0.60/control?cmd=GPIO,15,1
http://192.168.0.60/control?cmd=GPIO,15,0
Now there is a multistate selector/switch I have created an blocky.
if stand = 1 then virtuele switch 1 = on.
is it possible to remove my 4 switches and add this to blocky:
if stand = 1 then http://192.168.0.60/control?cmd=GPIO,13,1
when i open url, log give me:
2016-01-03 10:17:21.020 Stand 4
2016-01-03 10:17:21.020 EventSystem: Fetching url...
2016-01-03 10:17:21.021 Error: EventSystem: Malformed action sequence!
and with 4 virtual switches I can control the buttons.
-- 1
http://192.168.0.60/control?cmd=GPIO,13,1
http://192.168.0.60/control?cmd=GPIO,13,0
-- 2
http://192.168.0.60/control?cmd=GPIO,12,1
http://192.168.0.60/control?cmd=GPIO,12,0
-- 3
http://192.168.0.60/control?cmd=GPIO,14,1
http://192.168.0.60/control?cmd=GPIO,14,0
-- 4
http://192.168.0.60/control?cmd=GPIO,15,1
http://192.168.0.60/control?cmd=GPIO,15,0
Now there is a multistate selector/switch I have created an blocky.
if stand = 1 then virtuele switch 1 = on.
is it possible to remove my 4 switches and add this to blocky:
if stand = 1 then http://192.168.0.60/control?cmd=GPIO,13,1
when i open url, log give me:
2016-01-03 10:17:21.020 Stand 4
2016-01-03 10:17:21.020 EventSystem: Fetching url...
2016-01-03 10:17:21.021 Error: EventSystem: Malformed action sequence!
-
- Posts: 234
- Joined: Thursday 09 July 2015 12:03
- Target OS: Linux
- Domoticz version: 2.4538
- Location: Norway
- Contact:
Re: Blockly examples
This blockly send me a notification when robot vacuum cleaner is finished.
If the vacuum cleaner is not back on docking in 90 min it sed a notification because it probably jammed EDIT: Still som bugs in this, trying to fix
If the vacuum cleaner is not back on docking in 90 min it sed a notification because it probably jammed EDIT: Still som bugs in this, trying to fix
-
- Posts: 7
- Joined: Wednesday 06 January 2016 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v 3.4834
- Location: Sweden
- Contact:
Re: Events: Blockly examples
I can't get multiple inputs after an "and", how is that done?bistoury wrote:My first heating scenario.
I am afraid I will need to dig into LUA...
- MarcelMAH
- Posts: 53
- Joined: Friday 04 December 2015 23:35
- Target OS: Linux
- Domoticz version: v3.8025
- Location: Goes, Netherlands
- Contact:
Re: Events: Blockly examples
I had the same... right click and choose External Inputs, or when they are, Inline inputs.darne wrote:I can't get multiple inputs after an "and", how is that done?bistoury wrote:My first heating scenario.
I am afraid I will need to dig into LUA...
Running Domoticz on Ubuntu 16.04 on VMware with RFXCOM - RFXtrx433 and Aeotec Z-Stick Gen5
-
- Posts: 7
- Joined: Wednesday 06 January 2016 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v 3.4834
- Location: Sweden
- Contact:
Re: Events: Blockly examples
Figured out the rightklick manouver right after iv'e sent the question, thanx anyway for extremely fast response!MarcelMAH wrote:I had the same... right click and choose External Inputs, or when they are, Inline inputs.darne wrote:I can't get multiple inputs after an "and", how is that done?bistoury wrote:My first heating scenario.
I am afraid I will need to dig into LUA...
-
- Posts: 234
- Joined: Thursday 09 July 2015 12:03
- Target OS: Linux
- Domoticz version: 2.4538
- Location: Norway
- Contact:
Re: Events: Blockly examples
Like this: viewtopic.php?f=15&t=9774darne wrote:I can't get multiple inputs after an "and", how is that done?bistoury wrote:My first heating scenario.
I am afraid I will need to dig into LUA...
-
- Posts: 8
- Joined: Monday 30 December 2013 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
I'm trying to make a blocky sending a notificantion. But i can't find Pushalot in the dropdown list inside the blocky.
How can i use blocky to send a notification with Pushalot?
How can i use blocky to send a notification with Pushalot?
-
- Posts: 68
- Joined: Wednesday 30 December 2015 23:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Poland
- Contact:
Re: Blockly examples
Like I have written in another topic, for URL containing ',' (comma sign, sigh!), one needs to urlencode it to %2C - then it works fine.remb0 wrote:I have an nodemcu connected to my buva remote control.
and with 4 virtual switches I can control the buttons.
-- 1
http://192.168.0.60/control?cmd=GPIO,13,1
http://192.168.0.60/control?cmd=GPIO,13,0
-- 2
http://192.168.0.60/control?cmd=GPIO,12,1
http://192.168.0.60/control?cmd=GPIO,12,0
-- 3
http://192.168.0.60/control?cmd=GPIO,14,1
http://192.168.0.60/control?cmd=GPIO,14,0
-- 4
http://192.168.0.60/control?cmd=GPIO,15,1
http://192.168.0.60/control?cmd=GPIO,15,0
Now there is a multistate selector/switch I have created an blocky.
if stand = 1 then virtuele switch 1 = on.
is it possible to remove my 4 switches and add this to blocky:
if stand = 1 then http://192.168.0.60/control?cmd=GPIO,13,1
when i open url, log give me:
2016-01-03 10:17:21.020 Stand 4
2016-01-03 10:17:21.020 EventSystem: Fetching url...
2016-01-03 10:17:21.021 Error: EventSystem: Malformed action sequence!
Last edited by mKotek on Tuesday 12 January 2016 17:42, edited 1 time in total.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
-
- Posts: 8
- Joined: Tuesday 05 January 2016 12:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
Hi,
My first Blocky script, but it's not working, what is wrong? I want my curtains to close at sunrise and sunset, but don't want to use the > or <, because maybe you want to open or close the curtains afterwards (example enter the balcony).
My first Blocky script, but it's not working, what is wrong? I want my curtains to close at sunrise and sunset, but don't want to use the > or <, because maybe you want to open or close the curtains afterwards (example enter the balcony).
-
- Posts: 247
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: Blockly examples
You don't select it within BlocklyFutureCow wrote:I'm trying to make a blocky sending a notificantion. But i can't find Pushalot in the dropdown list inside the blocky.
How can i use blocky to send a notification with Pushalot?
Go to the domoticz settings, in the section "notifications" you select and configure the type of notifications you want to use. Then in blockly you use "Send notification with subject.." and the notification will be sent with (all) the type of notifications you configured
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blockly examples
The If and Else if lines are good but I think that the Do Set had to be On and/or Off in stead of Closed/Openrtulp wrote:Hi,
My first Blocky script, but it's not working, what is wrong? I want my curtains to close at sunrise and sunset, but don't want to use the > or <, because maybe you want to open or close the curtains afterwards (example enter the balcony).
-
- Posts: 247
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: Blockly examples
I don't know about curtains but with blinds you use Off for open and On for closed
-
- Posts: 8
- Joined: Tuesday 05 January 2016 12:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
Thanks! That makes sense!elmortero wrote:I don't know about curtains but with blinds you use Off for open and On for closed
-
- Posts: 32
- Joined: Wednesday 27 January 2016 16:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Blockly examples
Hi Thinkpad,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 tried to get your example working at home, but without any luck. I can't get the "var" part to work.
I managed to make a working switch "IemandThuis" but the second and third part of your examples are a problem.
Can you please tell me how you made the variable parts: "Schemer_licht_aan" and "Thuiskomen_licht_aan" and do i need to make scripts and put them in the scripts folder?
I couldn't find it anywhere. I'm new
You can PM me in dutch aswell!
Thanks in advance!
Aeon Labs Gen5 USB
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1
-
- Posts: 94
- Joined: Monday 30 November 2015 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
no, you need to make a variable named "schemer_licht_aan" as integer and set value 0.
after that blockly can change the value as in the example above.
after that blockly can change the value as in the example above.
-
- Posts: 32
- Joined: Wednesday 27 January 2016 16:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Blockly examples
Thank you very much! Got it working now, and understand the blocky!maomanna wrote:no, you need to make a variable named "schemer_licht_aan" as integer and set value 0.
after that blockly can change the value as in the example above.
Sorry just a beginner
Aeon Labs Gen5 USB
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1
-
- Posts: 53
- Joined: Wednesday 20 January 2016 20:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blockly examples
Hello everybody,
Maybe someone can help me out with this small issue. These are my blocks:
This works but when one phone is off and one phone is on the switch Iemand Thuis (Someone Home) is switching every second from on to off. When the second phone is coming online the switch keeps on like ik should. Why, when one phone is off, the switch is switching from on to off?
Maybe someone can help me out with this small issue. These are my blocks:
This works but when one phone is off and one phone is on the switch Iemand Thuis (Someone Home) is switching every second from on to off. When the second phone is coming online the switch keeps on like ik should. Why, when one phone is off, the switch is switching from on to off?
Who is online
Users browsing this forum: No registered users and 0 guests