Liftmaster Sub $10 MQTT hack job

I’ve wanted for a long time to extend the range of my garage door opener but using the existing radio signal just wasn’t feasible. The wall unit is the 888LM which uses rolling codes and I’m not sophisticated enough to get into that protocol. I looked at the MyQ gateway a lot and ended up deciding against it because my existing setup was a little bit unreliable and adding more seemed like a great way to make it more unreliable.

I found this link that described a slightly different model wall unit and tore mine down to see if it was feasible.

Sure enough, a tactile button actuates the hand press on the controller and by connecting to Wemos D1 mini with a relay shield I was able to get one of them up and running. It was stable for a month with no unexpected openings.

I then moved to the 2nd garage door controller, and wanted to use the same the Wemos D1 mini (NB: it’s easy to confuse pin D1 with the Wemos D1 when reading this). The problem was that the relay shields use pin D1 for the relay so you can only piggyback one shield per Wemos D1 and I wanted (for no good reason) to stay with the relay shields. I was able to solder headers and use a long extension that comes with the D1 to put a relay above and below the Wemos D1. I yanked the D1 header pin out when I was soldering and soldered a bridge across pin D2 and D1 on the relay (which is not connected to pin D1 on the board and goes to relay 1). So now I have a single Wemos D1 Mini with two piggybacked relay shields simulating a keypress on the wall unit.

It’s truly an analog approach to a digital problem.

After using this for 3 weeks and having no errant MQTT messages or unintended activations, I moved to the next phase: Mains Power.

For this I tapped into an existing circuit for overhead lights, used a HLK-PM01 that I’ve been using in my ESP8266 Projects with a fuse.

Review on the Converter

I need to add a varistor for component protection and will order some today for the final installation.

UPDATE: 20170925

I’ve completed most of the project and have attached a link to a gallery of kinda crappy pics I took during the installation. Picture gallery

For control, I’m using the arduino MQTT communication with the addition of the second relay described here.

A debt of gratitude to EJ for laying the groundwork.

The final touch will be drywall repair and a vented cover for the single gang box that allows access to the power supply and relays/D1.

I’m stupid proud of this. If anyone sees anything that I did that’s unnecessarily dangerous, please let me know.

For others, the time/labor alone would justify the cost of the liftmaster gateway, but that isn’t why we do this, is it?

3 Likes

I had pretty much and identical project that started me off. Things you might want to look at: door state - can you tell if your door is open or closed? Obstruction: can you tell if your car or something is blocking the door?

Otherwise - nice work :slight_smile: - what’s next?

I’m building a pressure sensor for my pool filter with a bonus pool temp monitor…

I had given a bit of thought to the door state. By my reckoning, it would require another sensor and transmitting module on the door with a switch and I was thinking something like this . Otherwise it would be a reed switch or another type of noncontact switch.

Did you end up implementing a state sensor for the door?

Liftmaster takes care of the obstruction and safety measures with beam sensor and resistance sensors on the motor. It might be interesting to see if the beam data can be exploited to pipe the info to an ESP and then out to HA via MQTT. Again, another module would be required for my house since the wall units are along way away from the doors.

I’m setting up tasker with autolocation to trigger the garage door when I come home, but it has a lot of bugs to be teased out. It would be a lot easier to have an MQTT message sent when wifi is acquired but then I’d have to be in proximity to open the door anyway.

I did.

The way I did it was to place the reed switch (and magnet on the door) pair at the botom of the garage door. The door had to be physically closed (successfully - my door motor/controller will re-open if obstructed) for the reed switch to be activated. I ran a wire pair back up to the NodeMCU (esp8266 variant) and published that state to the MQTT cover topic I had.

I’m going to add either a laser range or ultrasonic range finder. I’m going to bind this into a script that I can use to have a “leaving garage” action (bound to either a spare button on the RF door controller or just in the HA UI. This will let the wife or I hit the button - and the range finder will report the distance measured from the ceiling. When a car rolls out the range finder distance will increase - and after a small pause it will close the garage auto-magically…

As for opening - I’m yet to find a satisfactory automation :slight_smile:

That is a great solution for closed state. If you use android, you could use tasker to trigger an “if door open when wifi disconnects, then close door” scenario. Much like any other solution, this has problems if the door is moving.

The phone solution would save a sensor and at least one order of complexity.

I have a workshop in the garage and have applied the following script:
This cracks the garage door, turns on the exhaust fan, and pulls air through the open door for a slider set time. Then closes the door and shuts off the fan.

I was using an automation to turn the door switch relay off (the 1 sec delay required for the 888LM to register the keypress), but found that once an automation was triggered, it interrupted the script. Not sure if that’s a known behavior but I sidestepped it by putting it all in a script.

  toggle_garage_door_vent:
  alias: Ventilate Garage
  sequence: 
    - service: switch.turn_on
      entity_id: switch.garage_door_geoff
    - delay: 1
    - service: switch.turn_off
      entity_id: switch.garage_door_geoff
    - delay: 1
    - service: switch.turn_on
      entity_id: switch.garage_door_geoff
    - delay: 1
    - service: switch.turn_off
      entity_id: switch.garage_door_geoff  
    - service: switch.turn_on
      entity_id: switch.exhaust_fan   
    - delay: '00:{{ states.input_slider.slider2.state | int }}:00'
    - service: switch.turn_off
      entity_id: switch.exhaust_fan   
    - service: switch.turn_on
      entity_id: switch.garage_door_geoff
    - delay: 1
    - service: switch.turn_off
      entity_id: switch.garage_door_geoff  

I use Macrodroid on my mobile as the trigger to open. I started with connecting to wifi as the trigger but found that sometimes my phone wouldn’t connect until I powered the screen on. Not very convenient when on a motorbike. In the rain. At night :expressionless:
I’ve set a 500m zone around my house. When I enter this zone Macrodroid sends a http request which triggers the door to open. The door opening also triggers the light to come on using a sonoff with ESPeasy.

Macrodroid also has plugins for mqtt.

That looks like a standard US junction box, will the sonoff fit in there with a wall plate? I have been thinking of using sonoffs in wall for a few things and it would be great if it could be concealed in the box.

You are correct that it is a standard junction box. I did a test fit and it’s really tight and with thick stranded or solid wires, I don’t think it’ll fit in a way that wouldn’t make me worry. It squeezes in diagonally. There would be a lot of strain on the board terminals. A printed wall plate with the sonoff facing out would be ideal, and still give access to the LED and reset button. What would be even better is a plate that the sonoff board snapped into without its shell that had the LED and button access but concealed the terminals

1 Like

Here is my ghetto wall plate until I can find a satisfactory printed plate. My wife actually like this because she can still see the relays being actuated by their on board LED, one door is red, one orange.

It’s a 2 piece wall plate with hardware cloth under it.

I went looking for the schematic of the in wall 5V power supply and found I had not linked it.

This has been crowdsourced and the general consensus is that you probably won’t get more safe.

For other projects, I use this with a buck going to a bare ESP12. I have used the 1117 3.3v linear reg with no problems either. 1441152226761-hlk-pm01-wiring

All credit to: MySensors