Blockly examples
Moderator: leecollings
-
- Posts: 60
- Joined: Sunday 20 September 2015 17:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3072
- Location: Sweden
- Contact:
Re: Blockly examples
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?
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?
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly examples
Not sure but try "And" in place of "Or" for your time periods.
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
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.
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.
- thecosmicgate
- Posts: 188
- Joined: Monday 06 April 2015 14:37
- Target OS: Linux
- Domoticz version: newest
- Location: The Netherlands / Hoeven
- Contact:
Re: Blockly examples
Running this somebody home blokckly:
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 ?
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 ?
It's nice to be important, but it's more important to be nice
Scooter ;)
Scooter ;)
- thecosmicgate
- Posts: 188
- Joined: Monday 06 April 2015 14:37
- Target OS: Linux
- Domoticz version: newest
- Location: The Netherlands / Hoeven
- Contact:
Re: Blockly examples
Changed it:thecosmicgate wrote:Running this somebody home blokckly:
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 ?
but the somebody home switch keeps flipping on / off every second
It's nice to be important, but it's more important to be nice
Scooter ;)
Scooter ;)
-
- Posts: 230
- Joined: Sunday 14 July 2013 20:21
- Target OS: Linux
- Domoticz version: 4.10233
- Location: Alkmaar, The Netherlands
- Contact:
Re: Blockly examples
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
- thecosmicgate
- Posts: 188
- Joined: Monday 06 April 2015 14:37
- Target OS: Linux
- Domoticz version: newest
- Location: The Netherlands / Hoeven
- Contact:
Re: Blockly examples
Problem solved ...nextSkippiemanz 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
Sent from my MotoG3 using Tapatalk
It's nice to be important, but it's more important to be nice
Scooter ;)
Scooter ;)
-
- Posts: 2
- Joined: Wednesday 11 November 2015 17:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
I created a Blockly script but how can i run it?
- thecosmicgate
- Posts: 188
- Joined: Monday 06 April 2015 14:37
- Target OS: Linux
- Domoticz version: newest
- Location: The Netherlands / Hoeven
- Contact:
Re: Blockly examples
Domoticz does this for youRichardsnel wrote:I created a Blockly script but how can i run it?
Sent from my MotoG3 using Tapatalk
It's nice to be important, but it's more important to be nice
Scooter ;)
Scooter ;)
-
- Posts: 230
- Joined: Sunday 14 July 2013 20:21
- Target OS: Linux
- Domoticz version: 4.10233
- Location: Alkmaar, The Netherlands
- Contact:
Re: Blockly examples
If you marked the blockly as active
-
- Posts: 2
- Joined: Wednesday 11 November 2015 17:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
I marked it as active but wil it run every our?
-
- Posts: 15
- Joined: Sunday 17 May 2015 21:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: NL
- Contact:
Re: Blockly examples
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.
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.
- Attachments
-
- switch off activity.PNG (10.07 KiB) Viewed 4896 times
Compute RPi 2 : Domoticz latest beta, Synology : Domoticz tested beta on failover system.
Peripherals RFXCOM - RFXtrx433, Z-Wave.Me ZME_UZB1 USB Stick,P1 cable on smartmeter, Logitech Harmony Hub, 3 IP camera's
Peripherals RFXCOM - RFXtrx433, Z-Wave.Me ZME_UZB1 USB Stick,P1 cable on smartmeter, Logitech Harmony Hub, 3 IP camera's
-
- Posts: 14
- Joined: Friday 27 November 2015 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Dalj, Croatia
- Contact:
Re: Blockly examples
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.
Thanks
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.
Thanks
-
- Posts: 234
- Joined: Thursday 09 July 2015 12:03
- Target OS: Linux
- Domoticz version: 2.4538
- Location: Norway
- Contact:
Re: Blockly examples
Sending E-Mail when smokedetector is detecting smoke:
EDIT: And turing on lamp:
also video:
https://sendvid.com/tqnqdxcc
EDIT: And turing on lamp:
also video:
https://sendvid.com/tqnqdxcc
- MarcelMAH
- Posts: 53
- Joined: Friday 04 December 2015 23:35
- Target OS: Linux
- Domoticz version: v3.8025
- Location: Goes, Netherlands
- Contact:
Re: Blockly examples
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
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
Running Domoticz on Ubuntu 16.04 on VMware with RFXCOM - RFXtrx433 and Aeotec Z-Stick Gen5
-
- Posts: 110
- Joined: Friday 20 September 2013 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Finland
- Contact:
Re: Blockly examples
If none of the switches are one then your AND part is ON not OFF.
- MarcelMAH
- Posts: 53
- Joined: Friday 04 December 2015 23:35
- Target OS: Linux
- Domoticz version: v3.8025
- Location: Goes, Netherlands
- Contact:
Re: Blockly examples
You mean this one? Changed it, still no go... it won't turn it on even when everything else is on.alfred_j_kwak wrote:If none of the switches are one then your AND part is ON not OFF.
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
This one works for sure:-
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
- Westcott
- Posts: 423
- Joined: Tuesday 09 December 2014 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK - Glos
- Contact:
Re: Blockly examples
Hi StanHD,
How do you do your Galaxy Geofence?
DomoFence?
How do you do your Galaxy Geofence?
DomoFence?
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly examples
Yes, Domo fence.
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
Who is online
Users browsing this forum: No registered users and 1 guest