[BETA] ratgdo driver (w/ MQTT firmware)

I have written a ratgdo driver that support ratgdo with MQTT firmware.

I didn't want to deal with a separate dry-contact remote and this seemed like an elegant solution that also didn't require a tilt sensor.

its available to install via HPM using this URL until its officially added to the HPM repository list.

This is heavily inspired by @jrfarrar Garadget driver without which it would have been much harder to piece together how to deal with an MQTT-based device.

Cheers.

3 Likes

I was waiting for this to (back)order one! Order placed. :slight_smile:

1 Like

@Sebastien , what firmware do you anticipate you'll use?

MQTT, Homekit or ESP Home? If the former, what are your plans for a MQTT server? Homelab/Pie or cloud hosted?

I already have a MQTT server (mosquitto) for my HA experiments and for Teslamate but I wonder what others are thinking.

Very good question! I do have an MQTT server for Teslamate, so I might be able to use it. That said, I know nothing of how to set it up… The image just works for Teslamate’s integration to HE.

I have HomeKit, but I would rather have the functionality go directly to Hubitat.

Does Hubitat support MQTT natively? I seem to recall that I read this a little while back… but not sure…

1 Like

You can use ‎MQTT Explorer on the Mac App Store to connect to your MQTT server (if you have a Mac desktop/laptop, otherwise find the Windows or Linux equivalent).

Teslamate's docker compose by default doesn't expose the ports, I don't think:

  mosquitto:
    image: eclipse-mosquitto:2
    restart: always
    command: mosquitto -c /mosquitto-no-auth.conf
    # ports:
    #   - 1883:1883
    volumes:
      - mosquitto-conf:/mosquitto/config
      - mosquitto-data:/mosquitto/data

I think that back when I set it up, I just uncommented that. Recreate the container and use a MQTT client (IP, 1883, no user & password) to connect to it and you should be all set when you get the ratgdo. Note that I don't have mine yet so this is all hypothetical though I can see Teslamate topics flying through MQTT all the time.

2 Likes

Is yours also on Backorder, or were you able to order while there was some in stock?

1 Like

It was on backorder but it's shipped since, due to arrive on Thursday.

2 Likes

Oh nice! That’s pretty quick.

I just ordered mine, but showing backordered. Hopeful that it will ship soon...

I do not have an MQTT server currently, but have Homebridge running on an RPi. So the HomeKit route is what I'm currently thinking.

My primary goal is get my GDO back on my CarPlay display. I'm open to any recommendations to achieve this goal. Currently running a C8.

HomeKit is fine if you don’t need rules that are complex. Otherwise setting up mqtt on the Pie is trivial

Hi, Just received my Ratgdo yesterday and first thing I was trying to set up is Homebridge plugin and your device driver. Unfortunately none of those are working for me. I am using Mosquitto installed on my Synology docker that I had set up for Teslamate. Port 1883 is open but I don't get any responses from HE driver. I have set it up as below :

Can you please help me with it ?

On Mosquitto here is the log not sure why IP showed here is different :slight_smile:

Sure thing, @mail.djain , just keep in mind that while I have tested this with a ratgdo, I haven't connected mine to my Chamberlain yet. Will do so early next week.

A few things to verify:

  1. Make sure you can connect to your MQTT instance and that you know the host name, port and user/password (if you have secured your instance). I use MQTT Explorer on MacOS to confirm that and generally observe
  2. You've flashed the MQTT firmware on the ratgo (via their firmware uploader page
  3. You've configured the ratgdo to connect to your MQTT instance. Please set the ratgdo topic prefix to ratgdo/ for now - make note of your device name. Mine was something like ratgdo-8228, I think it's generated randomly
  4. Add or update the HE virtual driver (I just updated the code, get it from the github raw file - I haven't taken time to make Package Manager work yet though it might, I don't know.) and create the virtual device if you haven't yet (It seems you have)
  5. Enter your ratgdo name in the "Door Name (Topic Name)" field of the HE device. This is different from the topic prefix from above
  6. Turn on logs debugging (Need Help), bring the logs in another window and hit "Initialize" on the device page
  7. Confirm that the log contains something like The HA discovery message w/ name=${deviceName} is for this device (${doorName}), this will show that both your ratgdo and the HE driver are able to connect to the MQTT server. My HE driver listens for the Home Assistant discovery message to set some useful state variables in the device.

Device state should be kinda like this:

  • unique_id : ratgdo-8228_18:2A:8D:CA:A8:C0
  • configuration_url : http://192.168.7.199/
  • name : ratgdo MQTT
  • model : ratgdo
  • version : 0.9.3 - RATGDO MQTT Device Handler version
  • manufacturer : Paul Wieland
  • sw_version : 2.51

Now test the three functions (door open/close, light on/off, remote lock locked/unlocked).

Let me know how you fare, I am happy to help.

Thanks it’s working now. Although I am using it with my Genie opener so I have only connected red and white wires to wall switch ports. Open and close functions work fine of course no status updates just as dumb open/close relay. Thinking of adding a reed switch

Oh nice, @mail.djain . Did you use MQTT explorer and if so, did you see the HA discovery messages? Were there three (light, door, obstruction) or the one for the door?

Can you confirm you got it working with the MQTT firmware and my driver or HomeKit?

Added reed switches. Now status is being reported correctly. I don't remember what I saw on MQTT explorer but I can check and report back when I go home tonight. I am using drycontact (MQTT FW) and your driver along with HE Homekit plugin.
Light switch doesn't work for me and I believe Obstruction sensors also don't work for Genie GDOs.
Thanks so much for your work I have mentioned your driver on a Reddit post in case anyone looking for it.
(1) Genie and RatGDO : homeassistant (reddit.com)

1 Like

Can you give me a run down of how to install this please ? i install mosquitto mqtt broker on my docker and i can connected and tested not problem. i flash the board the the mqtt firmware and its all connected and looks good. now how to do the hubitat part lol, i install the driver code ratgdo MQTT but where do i go from there ? THis is my first time setting mqtt sorry

ok i figured it out it was this step that was not working

step 3 i did not do lol
once i set that ratgdo/ default was blank it started working

2 Likes

Awesome.

Can you confirm what Garage Opener you use and whether the light and obstruction sensing work? I think that for the latter, you have to have the obstruction sensor wired into the ratgdo.

The light should work if it's supported by the opener, I think?

All the features works light and obstruction are working, i have
chamberlain myq 050actwf.

i have the 3 cables wires the red white and black.

thank you for the code

1 Like

@825d60685b34c4f304ab I have it working great except for the dashboard. I can't get the device to show correctly has a question mark (for the light door control and status show as in photo) and no way to stop the door while opening or closing (like in HA) I tried to uncomment and got the stop command icon and the blue light flashes when stop command is sent, but it is not functioning for me. Also just noticed that the light gets out of sync (status not updating when light times out and shuts off)
image