Inobtrusive Automation

For some time now I’ve been in the habit of turning on a beefy Honeywell air filtration system that lives in my bedroom prior to leaving my house in the morning for the office…

… or at least that is what I was doing until my bedroom became my office for the foreseeable future. Peak allergy season, meanwhile, is coinciding with peak COVID-19 and thus I’ve found myself wanting an approach where I could have clean air without the droning of the air filter being my constant companion where I am spending most of my day. Home Assistant to the rescue along with the help of the Aeotec’s Multi Sensor 6 and Smart Switch 6. The ultimate solution ended up being mashup of two earlier automation adventures plus some new techniques.

At first I took the approach of using a Multi Sensor to detect when I was in the bedroom, a Smart Switch to control whether the air filter was on, and some Home Assistant Automations that would engage the Smart Switch whenever the Multi Sensor was not reporting motion and the time of day was outside a conservative approximation of when I might be sleeping. That was OK but kind of disappointing because either I would be wasting time when the filter could be running or risking it kicking on while I was sleeping. I needed another signal. As it turns out my Chilipad Ooler was the perfect candidate since its active state correlates strongly with my sleeping.

And so ultimately the solution involved using two Smart Switches, one as a control mechanism and one as a signal generator, the former gating the filter and the latter inferring my presence from the Chilipad’s power consumption.

automation:
  - alias: Disable Bedroom Air Filter On Trigger
    trigger:
      platform:  state
      entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
      to:        '8'
    action:
      service: switch.turn_off
      entity_id: switch.aeon_labs_zw096_smart_switch_6_switch
  - alias: Disable Bedroom Air Filter On Timer
    trigger:
      platform: time_pattern
      minutes:  "/1"
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
          state:     '8'
        - condition: state
          entity_id: switch.aeon_labs_zw096_smart_switch_6_switch
          state:     'on'
    action:
      service: switch.turn_off
      entity_id: switch.aeon_labs_zw096_smart_switch_6_switch
  - alias: Enable Bedroom Air Filter
    trigger:
      platform: time_pattern
      minutes:  "/1"
    action:
      service: switch.turn_on
      entity_id: switch.aeon_labs_zw096_smart_switch_6_switch
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
          state:     '0'
          for:
            minutes: 5
        - condition: state
          entity_id: switch.aeon_labs_zw096_smart_switch_6_switch
          state:     'off'
        - condition: numeric_state
          entity_id: sensor.aeon_labs_zw096_smart_switch_6_power_2
          below:     1

The above configuration has been running for the past few days and seems to reliably do what I might hope. Within a few minutes of my departing the room the air filter kicks on and I am protected from it ever kicking on while I am trying to sleep. Meanwhile a few fiddly configurations of the Aeotec devices were required to get them to behave as I wanted…

Something along the lines of the first three of the following entries were applied to both Smart Switches via zwave.set_config_parameter to respectively get them to send all of the relevant kinds of data in their reports, to get the reports to ship every minute, and to tell them not to leave their LEDs on all the time. The fourth item was applied to just a single switch where it happened to be plugged into a surge protector strip and I wanted to avoid the potential mayhem of competing protection devices.

{ "node_id" : 4, "parameter" : 101, "value" : 15 }
{ "node_id" : 4, "parameter" : 111, "value" : 60 }
{ "node_id" : 4, "parameter" : 81, "value" : "When the state of the Switch changes, the LED will follow the status (on/off) of its load, but the LED will turn off after 5 seconds." }
{ "node_id" : 5, "parameter" : 3, "value" : "Deactivate Overload Protection" }

I still get a little bit giddy when the system does exactly what I might hope it would.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s