Hi
I’m just taking my first steps with Smartthings integrations. I need to control the humidity inside a fridge and am using a Meross humidity montior to measure the humidity. I have a humidifer and dehumidifer inside the fridge, connected to Meross smart plugs. I want to turn the humdifier on (via the smart plug) when the humidity drops below (say) 72% and the dehumdifier on when it rises above (say) 78%. I don’t want both operating at the same time. The pseudo code is
min_humid = 72 // Lowest humidity
max_humid = 78 // Maximum humidity
humid_on = False // Status of humidifier (initially off)
dehmd_on = False // Status of dehumidifer (initially off)
loop over:
// Humidifier setting
if (humid <= max_humid) and not dehmd_on:
turn_on_humdifier()
humid_on = True
else:
turn_off_humdifier()
humid_on = False
// Dehumidifier setting
if (humid >= min_humid) and not humid_on:
turn_on_dehumdifier()
dehmd_on = True
else:
turn_off_dehumdifier()
dehmd_on = False
I can see how to do some of this in the Smartthings app but not sure how to set/unset the status flags via the app so would appreciate any suggestions. Thanks in advance!