Labels

Thursday, July 12, 2018

HomeLink HA Interface #1 - Development of a RPi Based Integration with a Liftmaster 850LM and Home Assistant

Not long ago I became interested in Home Automation.  This occurred as a result of making plans to add some more living space to my house.  I figured if I was going to spend some money on my house I should add some new capabilities as well.  I found out about Home-Assistant and was intrigued by the idea of being able to integrate disparate manufacturer's devices into the same mix along with being able to control them from the same source.  The problem with going to any one vendor is that they want you in their ecosystem; hence when you have many devices you end up with say many apps on your phone.  I wanted to do everything with one, or do it by voice, but be able to pick and choose what device I want where.  The war between Insteon and Z-Wave be damned.

So here is the brain-fart.  I have a Subaru Forester that has a set of HomeLink buttons on the auto-dimming rear-view mirror.  I don't have a garage, but I do have a porch with lights.  So, my first interaction was to add a Chamberlain light switch to the porch lights which I can command to go on and off from one of the HomeLink buttons.  Now I can turn on the porch lights when I get home late, and turn them off when I get in the house.  That was very little effort and I did that before I decided to go into Home Automation.  I removed a dimmer switch to put in the Chamberlain light switch.  I miss the ability to dim the lights on the front porch.  Why can't I have both a dimming capability and a HomeLink turn on and off ability.  In fact, why can't I use the HomeLink buttons to key off a "scene" like turn on the porch lights (if it's dark outside), turn off the living room lights, lock the door, set the alarm, wait for x minutes so you can get out of the driveway before turning off the porch lights?  Then, when I come home I just use a different HomeLink button to do the reverse?  Hence my desire to integrate something into the Home Automation sequence using HomeLink.

I was able to locate / buy a Liftmaster 850LM switch which has the ability to integrate with the HomeLink switches and garage door opener remote controls.  Normally it is used to control a garage door, but interestingly enough, I can sense the latches with an ESP8266 / Arduino / Raspberry Pi (take your pick) and push out the state of those latches using MQTT to the Home Assistant automation platform.  If I want, I discovered that the 850LM can run on as little as 9 volt DC input.  The Adafruit 757 bi-directional logic level converter has a max input on the high side of 10 volts which means that I could go through the 757 from the 850LM to whatever device I want to sense the state change.  I can then use the chosen device to use MQTT to send state information changes to the Home-Assistant center.  If I am real smart I can use a length of time timer that a HomeLink button is held down to increase the number of different states that I can report and if I use an RPi with Docker I can do other things at the same time.  Oh, and two clicks within 1 second would give me a third level, but let’s not get ahead of ourselves.  Anyway, it's worth investigating.

So now to get from Brain-Fart to working system.