jcallaghan / home-assistant-config

My Home Assistant configuration & documentation.
https://www.jcallaghan.com/
MIT License
173 stars 8 forks source link

AEG hob and extractor integration #284

Open jcallaghan opened 3 years ago

jcallaghan commented 3 years ago

We have had an AEG hob installed with our new kitchen. The hob has a button to control the extractor however they don't make an integrated extractor that works with this feature so I'm curious if I can make it work myself. I'll use an ESP32 board with ESPHome to see if I can sniff the IR command that the hob sends.

If I can sniff the commands I may add a Sonoff Zigbee (BASICZBR3) switch to turn the extractor on and off however it would be great to control the speed too. The lights on the extractor also switch off when the extractor door is closed but I'd still like to be able to have these on and may bypass their circuit with my own.

https://esphome.io/components/remote_receiver.html?highlight=infrared

remote_receiver:
  pin: D0
  dump: all

https://esphome.io/components/remote_receiver.html?highlight=infrared#remote-receiver-binary-sensor

jcallaghan commented 3 years ago

Nailed it. After hooking up an IR receiver and placing it on the cupboard above my AEG hob I've been able to decode the commands the HobToHood button sends when pressed on the hob. The button sends five commands (light on, fan speed 1, fan speed 2, fan speed 3 and off). These would be received by a compatible extractor fan however as mentioned above AEG don't make an integrated extractor with this feature.

As I can receive the commands the buttons send I can potentially do anything but on this occasion, I set up a very simple automation to toggle the state of my under cupboard lights.

I was interested to see if I could replicate this feature and see how it was engineered. Turns out it was much easier than I thought. By adding a smart switch or relay to the power of the extractor fan I could very easily ensure this button on my hob isn't redundant. For now, it was fun to get working within 30 minutes or so and now I'll give it some further thought as to if I will use the button sufficiently to warrant the extra work to the extractor power source.

Edit: After cooking a couple of smokey dishes I think there is value in being able to control the fan from the hob but as I know the temperature of the stove vicinity I can automate the fan based on the hob temperature or humidity. I guess I could always use it to trigger an "I give up on cooking" automation which orders my favourite takeaway.

ESPHome config


remote_receiver:
  pin: 4
  dump: all
  tolerance: 60%
  filter: 4us
  idle: 4ms

binary_sensor:

  - platform: remote_receiver
    name: "ESPH ${friendly_name} Off Command"
    raw:
      code: [-646, 1467, -690, 733, -706, 747, -674, 2236, -674, 751, -677, 1489, -650, 1518, -651, 770, -643]
    filters:
      - delayed_off: 5s

  - platform: remote_receiver
    name: "ESPH ${friendly_name} Light Command"
    raw:
      code: [-669, 1466, -691, 733, -1375, 760, -676, 1466, -701, 749, -1346, 2986, -675, 726, -698, 719, -1381]
    filters:
      - delayed_off: 5s

  - platform: remote_receiver
    name: "ESPH ${friendly_name} Fan 1 Command"
    raw:
      code: [-1321, 1496, -673, 1463, -2063, 1503, -676, 1489, -649, 752, -674, 1517, -676, 2231, -650]
    filters:
      - delayed_off: 5s

  - platform: remote_receiver
    name: "ESPH ${friendly_name} Fan 2 Command"
    raw:
      code: [-1319, 1469, -728, 2948, -650, 2258, -3402, 2213, -2060]
    filters:
      - delayed_off: 5s

  - platform: remote_receiver
    name: "ESPH ${friendly_name} Fan 3 Command"
    raw:
      code: [-623, 2224, -2744, 2954, -2060, 730, -707, 2229, -2034]
    filters:
      - delayed_off: 5s

Basic automation


trigger:

  - platform: state
    entity_id: binary_sensor.esph_kitchen_hob_light_command
    to: "on"

condition: []

action:

  - service: light.toggle
    data:
      entity_id: light.under_cabinet_light