Thermostat Control with Blockly - need help please

Post Reply
stefanwo
Posts: 8
Joined: Sunday 05 November 2017 13:10
Target OS: Raspberry Pi
Domoticz version:
Contact:

Thermostat Control with Blockly - need help please

Post by stefanwo » Wednesday 10 January 2018 22:47

Hi everybody,
I hope someone could help me, please.
I try to controll my thermostats depending on presence and time.
The two switches "StefanHome" and "SimoneHome" are both controlled by the geofence in the android app. The Switch "Zeitschaltung" is a timer controlled virtual switch which is on between 6 oclock 23.30 oclock.
What it should do: If one of us is at home (Simone / StefanHome is on), and its between 0600 and 2330 ("Zeitschaltung" is on) the thermostat "Wohnzimmerheizung" should set to 23degrees if its between 0530 and 0700, and set to 22 degrees if its between 0701 and 0200 oclock and "Küchenheizung" set to 19 degrees. To control that it works a message should be send.
And this first part works. (please read second post) But the Second part does not.
In this part it should do the following. If both of us arent at home (SimoneHome and StefanHome is off) OR its between 2331 and 0559 ("Zeitschaltung" is off) it should set the thermostats to 17 respectively 15 degrees and send annother message for testing matters.
So for example SimoneHome and Zeitschaltung are "ON" it set the two thermostats to right setting, but if i switch Zeitschaltung to off, it doesnt set the thermostats to 17/15 degrees nor sending the message.
What iam doing wrong? Where is my failure.
I hope anybody could please help me with this.

Now i found a second failure. It doesnt matter what time it is the thermostat "Wohnzimmer" is at first set to 23 degrees and then to 22 degrees instant.
2018-01-10 21_24_05-Domoticz.png
2018-01-10 21_24_05-Domoticz.png (49.7 KiB) Viewed 578 times
PS: I know my english is not the best, as you can see its not my native language, but i hope you understand what i try to explain. :?
Last edited by stefanwo on Wednesday 10 January 2018 23:21, edited 1 time in total.

stefanwo
Posts: 8
Joined: Sunday 05 November 2017 13:10
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Thermostat Control with Blockly - need help please

Post by stefanwo » Wednesday 10 January 2018 23:16

Ok sorry for disturbing that much. For test purposes i changed the event to this:
2018-01-10 22_12_13-Domoticz.png
2018-01-10 22_12_13-Domoticz.png (53.51 KiB) Viewed 571 times
The two new switches "Morgens" and "Resttag" are time controlled virtual switches. The problem is, despite the fact that "Morgens" is off the thermostat is set to 23 degrees and instant after that to 22 degrees (and send both messages). So it seems that the embedded if-elseif is not tested and both assignement are set.

The second part of the main if (elseif) is still not working

Thank you so much in advance!

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

Re: Thermostat Control with Blockly - need help please

Post by StanHD » Thursday 11 January 2018 19:33

Hi, the basic problem is probably that nested "If" blocks do not work. Try re-building without the nesting?
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

stefanwo
Posts: 8
Joined: Sunday 05 November 2017 13:10
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Thermostat Control with Blockly - need help please

Post by stefanwo » Friday 12 January 2018 7:23

Yeah, it seems that the nested parts were the problem. I split the whole block into two seperate parts and change the second part to one if-else-if block. Now it works like a charme.
Thanks a lot for the advice. I didnt know that netsted if dont work in blockly. :oops:

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests