Hi Labtec,
I control my central ventilator based on humidity, which I presume is what you really want in the end (I did not want the blower to start running when just brushing my teeth....). I have a humidity sensor in the bath room, compare that to the humidity in the living room and on a delta between the 2 switch on the blower (when using humidity you really need some comparison value, I started with absolute humidity levels for the bathroom but that drove me crazy because it would start running in the middle of the night which my wife did not appreciate....)
I know this is not an exact answer to your question, but below is what I made, don't know if you can use it......
Setup:
- nest thermo in the living room
- Everspring ST814 in the bathroom (
robbshop, dutch webshop
- a Fibaro FGS222 2 realy switch that I mounted in the manual control switch of the blower, which is located in the kitchen (the blower is named WTW here)
I created a LUA for this:
Code: Select all
----------------------------------------------------------------------------------------------------------
-- Script parameters
----------------------------------------------------------------------------------------------------------
Debug = "NO" -- Turn debugging on ("YES") or off ("NO")
RequestWTW = uservariables["WtwStandReq"] -- Requested WTW stand (pre-load with current)
----------------------------------------------------------------------------------------------------------
-- Script functions
----------------------------------------------------------------------------------------------------------
commandArray = {}
time = os.date("*t")
-- determine switch on/off for WTW due humidity sensor
for deviceName,deviceValue in pairs(devicechanged) do
if (deviceName=='Temp en vocht badkamer_Humidity') then
sBadTemp, sBadHumidity = otherdevices_svalues['Temp en vocht badkamer']:match("([^;]+);([^;]+)")
if Debug=="YES" then
print("event on '"..deviceName.."', value '"..tostring(deviceValue).."'");
end
--determine setpoint
sNestTemp, sNestHumidity = otherdevices_svalues['Nest Temp en Vocht']:match("([^;]+);([^;]+)")
if Debug=="YES" then
print("Nest, temp '" ..tostring(sNestTemp).."' humidity '"..tostring(sNestHumidity).."'")
end
sLevelOn = math.min(math.max(sNestHumidity + 25, 40), 80)
commandArray["Variable:WtwAanLevel"] = tostring(sLevelOn)
sLevelOff = sLevelOn - 10
commandArray["Variable:WtwUitLevel"] = tostring(sLevelOff)
print("setpoints, on '" ..tostring(sLevelOn).."' off '"..tostring(sLevelOff).."'")
if (deviceValue >= sLevelOn) then
--print("humidity high enough to turn on WTW");
commandArray['WTW Aan request'] = 'Off' -- request can be reset
if (otherdevices['WTW stand 3'] == 'Off') then
print("WTW goes On, '"..deviceName.."', value '"..tostring(deviceValue).."'");
RequestWTW = 3
end
end
if (deviceValue <= sLevelOff and otherdevices['WTW stand 3'] == 'On') then
print("WTW goes Off, '"..deviceName.."', value '"..tostring(deviceValue).."'");
RequestWTW = 1
commandArray['Wtw blokkeer'] = 'Off' -- request can be reset
end
end
end
I process the RequestWTW value further on the determine of it needs to be switched on. It is a 3 level ventilator, level 1 is the normal level, level 2 I do not use for the humidity control