Blockly script not working
Moderator: leecollings
-
- Posts: 5
- Joined: Tuesday 04 November 2014 13:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Blockly script not working
I made a blockly script and for some reason it doesn't work, but I cannot find out what I am doing wrong:
The logfile states the following:
I'm sure for the experts it's easy to spot, but I cannot figure it out myself.
The logfile states the following:
I'm sure for the experts it's easy to spot, but I cannot figure it out myself.
-
- Posts: 1601
- Joined: Friday 18 October 2013 23:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Arnhem/Nijmegen Nederland
- Contact:
Re: Blockly script not working
mmm
What is badkamer... [ looks Light switch.. is that correct? ]
Time must be. xxx OR xxx
What is badkamer... [ looks Light switch.. is that correct? ]
Time must be. xxx OR xxx
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
-
- Posts: 5
- Joined: Tuesday 04 November 2014 13:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script not working
Badkamer is indeed the bathroom light switch, which is supposed to turn the bathroom ventilation and mirror lights/heating on.
I've tried changing AND to OR, but still get the same error.
I've tried changing AND to OR, but still get the same error.
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly script not working
The Badkamer is a dimmer switch? If so, just to test, try using "not = Off".
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 script not working
time >= 6.00 or time <= 10.30Time must be. xxx OR xxx
is 24 hours...
time >= 6.00 and time <= 10.30
is 4 and 1/2 hours and 1 minute (minus 1 millisecond) between (including) 6.00 and 10.30
fyi.
Confusing... i think you mean:try using "not = Off".
If it is a switch why check >10%? and not if it's on?
e.g. if badkamer = on and time >= 6.00 and time <= 10.30
-
- Posts: 5
- Joined: Tuesday 04 November 2014 13:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script not working
Sorry for the confusion guys, indeed it is a dimmer and not a switch per say. On another dimmer I found that "if dimmer = on" only triggered above a certain dimmer level, like 30% or more. I therefor figured setting it to 10% would work more reliable in my situation. It's only temporary, until I've figured out why the on/off trigger doesn't work like it is supposed to.
The event is to be true between 6.00 and 10.30, so I think OR was correct.
But that still leaves it a big mystery why I get an error.
The event is to be true between 6.00 and 10.30, so I think OR was correct.
But that still leaves it a big mystery why I get an error.
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly script not working
The reason to test "Not = Off" (ie any level except off) is because a dimmer sometimes doesn't respond to "on" or the problem may be with the Level %. So if it works with "Not = Off" then the level % part is the problem, not the time criteria.
This works OK:-
Not an answer to the problem but a possible work around?
This works OK:-
Not an answer to the problem but a possible work around?
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 script not working
I got confused with NOT = Off I interpreted it as 'NOT' = Off (as an identifier not as an operator in programming terms)
never excepted that and read it all wrong! Will include that in [≠, <> or !=] data set
never excepted that and read it all wrong! Will include that in [≠, <> or !=] data set
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly script not working
Sorry, my fault I didn't know how to type those characters on my tablet
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: 5
- Joined: Tuesday 04 November 2014 13:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script not working
Thanks Stan, that did the trick! Now my script is changed in a minor way, but it's working:
- Attachments
-
- Schermafbeelding 2016-07-16 om 09.52.49.png (112.8 KiB) Viewed 2008 times
Who is online
Users browsing this forum: No registered users and 0 guests