Need help with simple task
Moderator: leecollings
- slowdowndave
- Posts: 1
- Joined: Wednesday 24 February 2016 16:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Location: Ontario, CAN
- Contact:
Need help with simple task
This is my first attempt at using blockly for what seems like it should be a simple task. I want to turn a fan on for 5 minutes every hour or half hour if the humidity is above 50%. I'm not exactly sure how Blockly works but I assume it follows through each line and then starts back at the beginning. Here's what I have.
This what is happening, the fan comes on for 5 minutes and then off for 2.5 minutes.
- K3rryBlue
- Posts: 77
- Joined: Tuesday 07 February 2017 22:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10xx
- Location: Netherlands
- Contact:
Re: Need help with simple task
You need to add a ELSEIF to the Blocky, now you running in loops.
The lowest value you can reach is 50% and that causes the blocky to keep repeating itself.
Your last step 5 minutes only last the cycle time of the blockly statement (I believe every 30 seconds)
Always remember that if you switch via Blockly, you create a step to exit the statement, as Blockly run in a loop.
The lowest value you can reach is 50% and that causes the blocky to keep repeating itself.
Your last step 5 minutes only last the cycle time of the blockly statement (I believe every 30 seconds)
Always remember that if you switch via Blockly, you create a step to exit the statement, as Blockly run in a loop.
Code: Select all
rh = current value
IF rh >= 50
DO turn FAN on 5 min
ELSEIF rh < 50
DO turn FAN off 30 min
Domoticz V4.10717, RPi2 -> Linux raspberrypi 4.4.47-v7+ , RFXCOM - RFXtrx433 USB 433.92MHz ,RAZBERRY2 and OpenZWave USB Version: 1.4-2363-g1f10253-dirty
Who is online
Users browsing this forum: No registered users and 1 guest