Blockly examples
Moderator: leecollings
-
- Posts: 36
- Joined: Monday 20 November 2017 3:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Australia
- Contact:
Re: Blockly examples
Your right in using the 10% for the gateway as that will play the siren sound. What your problem is that while the 300 second wait is happening the code then moves to the next line and cancels it after the 5 seconds. You need to combine the wait time and the off time together in the same line.
-
- Posts: 3
- Joined: Friday 28 December 2018 22:08
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Blockly examples Script not found
Hello I am new on this forum
I use Domoticz on a Synology NAS to control some ESP Easy units
Version: 4.9700
Build Hash: a3a4590-modified
Compile Date: 2018-06-23 16:24:51
dzVents Version: 2.4.6
Python Version: None
With one switch I want to send 2 HTTP commands to the ESP easy unit
So I use blockly to make the 2 commands with One switch see screenshoot attached The file is named "A"
In the switch setting I have put : On action : script://A
When I turn on the switch I have a log error as follow :
2018-12-28 22:00:34.299 (Switches) Light/Switch (Open-Close)
2018-12-28 22:00:34.298 Status: User: Admin initiated a switch command (8/Open-Close/On)
2018-12-28 22:00:34.298 Error: SQLHelper: Error script not found '/usr/local/domoticz/var/scripts/A'
Can somebody tell me what I am doing wrong ?
Thanks in advance
Patou
I use Domoticz on a Synology NAS to control some ESP Easy units
Version: 4.9700
Build Hash: a3a4590-modified
Compile Date: 2018-06-23 16:24:51
dzVents Version: 2.4.6
Python Version: None
With one switch I want to send 2 HTTP commands to the ESP easy unit
So I use blockly to make the 2 commands with One switch see screenshoot attached The file is named "A"
In the switch setting I have put : On action : script://A
When I turn on the switch I have a log error as follow :
2018-12-28 22:00:34.299 (Switches) Light/Switch (Open-Close)
2018-12-28 22:00:34.298 Status: User: Admin initiated a switch command (8/Open-Close/On)
2018-12-28 22:00:34.298 Error: SQLHelper: Error script not found '/usr/local/domoticz/var/scripts/A'
Can somebody tell me what I am doing wrong ?
Thanks in advance
Patou
- Attachments
-
- 2018-12-28_22h43_28.png (14.35 KiB) Viewed 4519 times
-
- 2018-12-28_22h57_10.png (2.95 KiB) Viewed 4519 times
-
- Posts: 3
- Joined: Friday 28 December 2018 22:08
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Blockly examples Script not found
Hello again,
I found my mistake ....
The 2 blocks must be linked with the else if statement
Hope this can help somebody else ...
Patou
I found my mistake ....
The 2 blocks must be linked with the else if statement
Hope this can help somebody else ...
Patou
- Attachments
-
- 2018-12-28_23h39_38.png (13.98 KiB) Viewed 4515 times
-
- Posts: 4
- Joined: Friday 08 September 2017 18:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
Why is this not working?
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly examples
Try with the other "if" block that does not have the blue gear icon. The one you have used needs an "else if" to work.frigide wrote:
Why is this not working?
Sent from my SM-T820 using Tapatalk
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
-
- Posts: 4
- Joined: Friday 08 September 2017 18:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
Thanks for answering. But if that is it, why is this not working?
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blockly examples
Which version of Domoticz are you running? In the older versions you can select what type of event you want it to be, All/Device/Security/Time/Uservariable. In the newer versions of Domoticz this dropdown menu doesn't exist anymore and I don't know whether the event can trigger on a variable
- MarcelMAH
- Posts: 53
- Joined: Friday 04 December 2015 23:35
- Target OS: Linux
- Domoticz version: v3.8025
- Location: Goes, Netherlands
- Contact:
Re: Blockly examples
Hi,
I'm trying to create a Blocky for the following, but I keep getting errors (tried multiple ways, all result in errors with syntax in the Domoticz logs):
Enable a scene when it's 07:00 but only when sunrise is after 07:00 and then enable another scene when sunrise is now.
Any help would be appreciated.
I'm trying to create a Blocky for the following, but I keep getting errors (tried multiple ways, all result in errors with syntax in the Domoticz logs):
Enable a scene when it's 07:00 but only when sunrise is after 07:00 and then enable another scene when sunrise is now.
Any help would be appreciated.
Running Domoticz on Ubuntu 16.04 on VMware with RFXCOM - RFXtrx433 and Aeotec Z-Stick Gen5
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blockly examples
Something like this should work I'd say:
'Light' should be one of the devices from the scene to prevent retriggering, or you could use user variables
'Light' should be one of the devices from the scene to prevent retriggering, or you could use user variables
-
- Posts: 8
- Joined: Wednesday 20 June 2018 22:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
i have the Blocky below running to turn a light on when a PC is turned on but only in the evening, but i noticed in the log that the ON command every minute is resend due to this Blockly, what is the trick that it doesnt send it continously ? my best guess is some sort of check that when light is on it should not be resending a ON command?
-
- Posts: 153
- Joined: Tuesday 28 June 2016 16:38
- Target OS: Windows
- Domoticz version: Beta
- Location: Amersfoort NL
- Contact:
Re: Blockly examples
Or add a "and Bureaulamp Wendy = Off" to the IF line.
-
- Posts: 8
- Joined: Wednesday 20 June 2018 22:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
Thank you for your quick reply.JimmyH1969 wrote: ↑Thursday 24 January 2019 16:07 Or add a "and Bureaulamp Wendy = Off" to the IF line.
i added the line like below, i hope the sequence is correctly, i will find out this evening.
-
- Posts: 153
- Joined: Tuesday 28 June 2016 16:38
- Target OS: Windows
- Domoticz version: Beta
- Location: Amersfoort NL
- Contact:
Re: Blockly examples
Looks good to me
-
- Posts: 8
- Joined: Wednesday 20 June 2018 22:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly examples
and it works good too, tnx
-
- Posts: 153
- Joined: Tuesday 28 June 2016 16:38
- Target OS: Windows
- Domoticz version: Beta
- Location: Amersfoort NL
- Contact:
Re: Blockly examples
- PetervandePol
- Posts: 23
- Joined: Wednesday 09 January 2019 11:24
- Target OS: Linux
- Domoticz version:
- Location: Scherpenzeel, GLD, NL
- Contact:
Re: Blockly examples
Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
-
- Posts: 79
- Joined: Tuesday 02 December 2014 22:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Blockly examples
A day is from 00:00 till 23:59.PetervandePol wrote:Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
You need to adjust your blockley like sunset till 23:59 and a second line from 00:00 till sunrise
Verzonden vanaf mijn iPhone met Tapatalk
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Blockly examples
There is no such timePetervandePol wrote: ↑Wednesday 30 January 2019 14:34 Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
Try > sunset OR < sunrise
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blockly examples
what @geezerrr and @waaren said with the addition that the Set part should be split in two. So you'll have to add a Set block for YeeLight 1 and another Set block for YeeLight 2, you can't use the 'and' block in the outputPetervandePol wrote: ↑Wednesday 30 January 2019 14:34 Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
Also the 'On for x minutes' doesn't always react as you might think it does. When the device is off when the 'if' is triggered, it'll turn on and after the set time it'll turn off like you'd expect. Is the device already on however (when the 'if' is triggered) it won't turn off but will turn to the state it was at the trigger, so "back" on in that case.
- PetervandePol
- Posts: 23
- Joined: Wednesday 09 January 2019 11:24
- Target OS: Linux
- Domoticz version:
- Location: Scherpenzeel, GLD, NL
- Contact:
Re: Blockly examples
Thank you, @tozzke.tozzke wrote: ↑Thursday 31 January 2019 21:46what @geezerrr and @waaren said with the addition that the Set part should be split in two. So you'll have to add a Set block for YeeLight 1 and another Set block for YeeLight 2, you can't use the 'and' block in the outputPetervandePol wrote: ↑Wednesday 30 January 2019 14:34 Hi,
I am afraid I need some help. I can't figure out how to switch two lamps on between sunset and sunrise with a motion sensor. It works without the time restiction, but I do not want the lights on and off during the day. Based on the examples in this forum I have made this:
But nothing happens Where do I go wrong?
Also the 'On for x minutes' doesn't always react as you might think it does. When the device is off when the 'if' is triggered, it'll turn on and after the set time it'll turn off like you'd expect. Is the device already on however (when the 'if' is triggered) it won't turn off but will turn to the state it was at the trigger, so "back" on in that case.
I changed to:
... and this works to switch "on" but like you predicted the lights do go on, but not off. How do I achieve that then?
Who is online
Users browsing this forum: No registered users and 1 guest