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.
Blockly
I think this should work but it doesn't. What I am doing wrong?
Any advice would be helpfull
THX
Blockly script doesn't work
Moderator: leecollings
-
- Posts: 6
- Joined: Tuesday 04 July 2017 20:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script doesn't work
.....realy nobody knows ?
-
- Posts: 156
- Joined: Monday 25 May 2015 22:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2020.2
- Location: Netherlands
- Contact:
Re: Blockly script doesn't work
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
Verstuurd vanaf mijn SM-G920F met Tapatalk
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Blockly script doesn't work
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.
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.

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: 6
- Joined: Tuesday 04 July 2017 20:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script doesn't work
Many thanks to all. I will check tomorow when I come from holidays 

-
- Posts: 6
- Joined: Tuesday 04 July 2017 20:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Blockly script doesn't work
It works like I expected 
Once again, many thanks for both of answers
Boris

Once again, many thanks for both of answers
Boris
Who is online
Users browsing this forum: No registered users and 1 guest