Issue with Blockly script Topic is solved

Moderator: leecollings

Post Reply
Prutsium
Posts: 92
Joined: Monday 18 June 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany / Netherlands
Contact:

Issue with Blockly script

Post by Prutsium »

Hi there,

I want to switch the IR filter from my camera with a Blockly based on Sunset and Sunrise.
Made a small script and activating this script manually works good so i assume somehow the Blockly is something wrong.

Image

This should call 1 of the 2 scripts irOn or irOff and as said when i run these scripts manually no problem but Blockly doesn't want to work somehow.

Could anybody guide me what i do wrong?
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: Issue with Blockly script

Post by blauwebuis »

Search for problem with Blockly's IF statement on the board. It doesn't work properly.
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Issue with Blockly script

Post by StanHD »

The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.
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
Prutsium
Posts: 92
Joined: Monday 18 June 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany / Netherlands
Contact:

Re: Issue with Blockly script

Post by Prutsium »

StanHD wrote: Tuesday 14 August 2018 23:15 The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.
Thanks will try that one.
Prutsium
Posts: 92
Joined: Monday 18 June 2018 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany / Netherlands
Contact:

Re: Issue with Blockly script

Post by Prutsium »

StanHD wrote: Tuesday 14 August 2018 23:15 The "after sunset and before sunrise" should be:- "after sunset OR before sunrise".
This is due to the midnight (00:00) threshold that resets the day.

I have many blocklys with multiple "if" and "else if" statements all working correctly once you understand how they work.
Confirmed that it works. Thanks!!!
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Issue with Blockly script

Post by StanHD »

Good news, glad it works :)
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest