What am I missing? (blockly for humidifer based on RH and outside temp)

Must be cleaned all topics go to the right subforum
zolthar
Posts: 2
Joined: Wednesday 11 January 2017 21:05
Target OS: Raspberry Pi
Domoticz version:
Contact:

What am I missing? (blockly for humidifer based on RH and outside temp)

Postby zolthar » Wednesday 11 January 2017 21:14

Hi everyone,

So I made this event in blockly that worked correctly yesterday. It basically turns on a humidifier in our bedroom based on outside temperature and current relative humidity in our bedroom. If it's colder outside it will only run until RH is around 15% (cold as in -25 to -30). If, on the other hand its more like -2, it will run until the humidity is at 40% or higher.

Does anyone see what I'm apparently missing?

When I get a reading in the log from my thermometer in the bedroom nothing more happens in the log. It's as if the if statements in the blockly never become true, but I just can't see why.

Edit:
I'm thinking I might have to rewrite this in LUA, but it's quite an obstacle to overcome for me. The ideal solution would be to skip blocky and instead write a good lua script with an algorithm that seamlessly converts the below numbers into whether the humidifer should be on or off.

E.g. the algorithm would check and if temp is -15, it would run the humidifier until the RH is at around 22.5%.

Recommended levels of indoor relative humiditiy based on outdoor temperature:
Outside temp Max indoor RH at 20C temp
-30 or colder 15%
-30 to -24 20%
-24 to -16 25%
-18 to -12 20%
-12 to 0 40%
Attachments
Blockly malfunction.jpg
Blockly malfunction.jpg (338.23 KiB) Viewed 48 times

zolthar
Posts: 2
Joined: Wednesday 11 January 2017 21:05
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: What am I missing? (blockly for humidifer based on RH and outside temp)

Postby zolthar » Wednesday 11 January 2017 22:08

Fixed it myself, I don't understand how it could work yesterday, maybe because I tried it after midnight? I fixed it by adding an or block with two comparisons of time. One checks if time is between 18:00 and 24:00 and one checks if time is between 00:00 and 03:00.

Before I made the change the script wouldn't fire, since 18:00 is never < than 03:00. Duh. ! :roll:

sion
Posts: 45
Joined: Friday 08 January 2016 13:32
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: What am I missing? (blockly for humidifer based on RH and outside temp)

Postby sion » Wednesday 11 January 2017 22:22

If you have more than one thing that relies on these time conditions, it can be usefully to create a virtual switch that turns on at 18.00 and off at 03.00.
Then you can just query that switch in any blockys or scripts. It also means that if you want to change the times at some point, you just change one timer, not lots of scripts.
running domoticz 3.4834 on rpi2, with
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.

Next: harmony hub.


Return to “Scripts [cleaning in progress]”

Who is online

Users browsing this forum: No registered users and 1 guest