Issue with Blockly script Topic is solved

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

Issue with Blockly script

Post by Prutsium » Tuesday 14 August 2018 22:17

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: 354
Joined: Wednesday 21 December 2016 10:11
Target OS: Raspberry Pi
Domoticz version: current
Contact:

Re: Issue with Blockly script

Post by blauwebuis » Tuesday 14 August 2018 22:43

Search for problem with Blockly's IF statement on the board. It doesn't work properly.

User avatar
StanHD
Posts: 588
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 » 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.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Domoticz Slave - Asrock Ion - Linux, Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa

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

Re: Issue with Blockly script

Post by Prutsium » Thursday 16 August 2018 8:41

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: 62
Joined: Monday 18 June 2018 11:31
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Germany / Netherlands
Contact:

Re: Issue with Blockly script

Post by Prutsium » Friday 17 August 2018 9:22

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: 588
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 » Friday 17 August 2018 13:45

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
Domoticz Slave - Asrock Ion - Linux, Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests