Need some inteligence..

Moderator: leecollings

Post Reply
R0yk3
Posts: 37
Joined: Sunday 24 July 2016 21:51
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: the Netherlands
Contact:

Need some inteligence..

Post by R0yk3 »

Hello,
i have got a script hich togles a fan in my bathroom if the hum. is > 70% then spins for an hour, or if in the mentime the hum. is < 60% is turns off.
All works wel except now the outside hum. is >70% so in the bathroom is does not come below 70% and the fann keeps spinning.
i upped it now to 72% otherwise it keeps going on all day and night.. :|

See the script
http://prntscr.com/fwl6xz
Image

So how do i give the inteligence that if the outside hum. is > 70% it just runs for 1 hour in blockly.
Like,
If outside hum is >69% and inside is >70% run 1 hour (then stop) <- but turn on if the hum. rises again if i take a shower. :?:

or start fan if hum. rises 5% then run 1 hour, but i have no reference. :evil:

I cannot fgure this out, BTW i have no fysical switch. :|

Help.. :?
Raspberry PI 3, raspbian, ZwaveMe, RFLink
mrf68

Re: Need some inteligence..

Post by mrf68 »

Determine how fast the hum. rises 5% when using the shower. Check hum. and store the value in a variable. Check hum. again after the earlier determined time period and calculate the difference. If difference > 5% then turn fan on for one hour. BTW, I would use LUA for this.

Regards,
Martin
leoncornelissen
Posts: 24
Joined: Monday 27 April 2015 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8258
Location: Netherlands
Contact:

Re: Need some inteligence..

Post by leoncornelissen »

I created a Lua script to overcome this. Next to that, if the humidity is 50% and you take a shower, you also want the fan to work

I check each minute what the delta is, If I have a raise of 2% in 2 minutes it is definitely someone in the shower or at least in the bathroom. The script saves the lowest value of the last two minutes and each time the script runs it checks if the current value is lower than the previous to determine the highest humidity.
If the peak of the humidity is determined the script will calculate the target humidity (min + 0,4 *(max - min)). So it should at least reduce the humidity increase by 60%.

It is possible to make it in a blocky but I'm not fancy about it.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest