Blockly script doesn't work

Post Reply
bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Blockly script doesn't work

Post by bkrajnc » Tuesday 04 July 2017 20:16

Hi all
I have dht22 and switch/relay connected on esp8266. When I enable/disable switch in domoticz everything works fine, relay turns on or off. Now I try with Blockly logic. I would like to enable switch when the temperature measured with dht22 is equal or higher than 31 degrees and turn off when temperature is lower than 29 degrees.
ScreenHunter_302 Jul. 04 18.58.jpg
Switch configuration
ScreenHunter_302 Jul. 04 18.58.jpg (151.39 KiB) Viewed 701 times
Blockly
ScreenHunter_305 Jul. 04 19.57.jpg
logic
ScreenHunter_305 Jul. 04 19.57.jpg (114.65 KiB) Viewed 701 times
I think this should work but it doesn't. What I am doing wrong?
Any advice would be helpfull
THX

bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly script doesn't work

Post by bkrajnc » Tuesday 11 July 2017 12:43

.....realy nobody knows ?

dressie
Posts: 108
Joined: Monday 25 May 2015 22:44
Target OS: Linux
Domoticz version: V3.8153
Location: Netherlands
Contact:

Re: Blockly script doesn't work

Post by dressie » Tuesday 11 July 2017 17:19

Ad the state of the switch in the first line, so if temp=31 and switch is off set switch on.

Verstuurd vanaf mijn SM-G920F met Tapatalk

User avatar
StanHD
Posts: 541
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Blockly script doesn't work

Post by StanHD » Thursday 13 July 2017 18:06

I think this cannot work because:-

1. You have used an "If / Else If" block without an Else If. This will not work, use the other "If " block without the blue gear symbol.
2. You have joined 2 of these together. This will not work either.

Try to redo this with a single If / Else If block something like:-

If living room temp > 30 and Relay = Off
Do set Relay = On
Else If living room temp < 30 and Relay = On
Do set Relay = Off

Hope that helps.
Domotica - Intel nuc Celeron, Domoticz - Windows, RFXTRX433E. 1-Wire USB. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub, Broadlink RM2, HA-Bridge with Amazon Echo / Alexa.

bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly script doesn't work

Post by bkrajnc » Thursday 13 July 2017 18:48

Many thanks to all. I will check tomorow when I come from holidays ;)

bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Blockly script doesn't work

Post by bkrajnc » Friday 14 July 2017 19:57

It works like I expected ;-)

Once again, many thanks for both of answers
Boris

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests