Ring Doorbell (gen2) with ring-mqtt project

Hi all,

unfortunately openHAB doesn’t come with any official Ring doorbell binding, but I was lucky to find this project on GitHub GitHub · Where software is built

It uses the Ring API, this means your Ring device has to be connected to the Cloud, but a Ring protection plan / subscription is NOT required.

Long story short, using mqtt-ring openHAB will be notified when motion is detected and when someone rings the bell. Even without a Ring protection plan subscription. Eventually I use the chromecast binding to play a DingDong sound on my Google Home devices. On top openHAB sends a Telegram message with a still picture in case someone rings my doorbell (out of the box integration, image provided via mqtt topic by ring-mqtt) or if motion is detected (manual image generation via ffmpeg connecting to the rtsp stream)

Why is the latter needed? Unfortunately “low powered” devices like my doorbell gen 2 (using 8-24V AC input) don’t provide an image snapshot in case motion is detected. At least without a Ring protection plan. This means, once openHAB detects motion I have to use ffmpeg to connect to the ring-mqtt rtsp stream and generate a still image. Then I will send the image via Telegram binding. This is always delayed and very rarely (not sure how to fix) the image is scrambled (google for smearing). However, I’m happy with the result.

I’m using ring-mqtt as docker image. It was really easy to set it up.

Want to know more? Reach out :wink:

best regards

Stefan

Hey @StefanH

sounds really great.
I’m running Openhabian, so I don’t have Docker Hub. I did pull the ring-mqtt docker image from CLI, but thats where my Linux knowledge ends :wink:
Installing it manually (though not recommended) seemed to have worked for me. However, I’m having issue manually starting the service and accessing it via MQTT.

My config.json looks like this (untouched)

{
    "mqtt_url": "mqtt://localhost:1883",
    "mqtt_options": "",
    "livestream_user": "",
    "livestream_pass": "",
    "disarm_code": "",
    "enable_cameras": true,
    "enable_modes": false,
    "enable_panic": false,
    "hass_topic": "homeassistant/status",
    "ring_topic": "ring",
    "location_ids": [
        ""
    ]
}

How does you config look like? Did you simply replace the hass_topic value with your mqtt topic?

Thanks in advance

Hi @StefanH,

I am curious what is the delay between button press and MQTT updates?

I have the doorbell connected as shown here but i face delays. By the time the Google Assistant rings the parcel delivery is often gone.

My config looks like this:

{
“mqtt_url”: “mqtt://MYMQTTUSR:MYMQTTPWD@192.168.2.9:1883”,
“mqtt_options”: “”,
“livestream_user”: “admin”,
“livestream_pass”: “MYADMINPWD”,
“disarm_code”: “”,
“enable_cameras”: true,
“enable_modes”: false,
“enable_panic”: false,
“hass_topic”: “homeassistant/status”,
“ring_topic”: “ring”,
“location_ids”: [
“”
]
}

Have you checked the ring-mqtt logs?

I’d say quick enough, check the video I did record for you.

BUT I need to say that I use two chime systems. One system is an audio group that consists of several Google Home Assitant devices. Once openhab detects the ding event, it will connect to the audiogroup and ask to play a local mp3 file (provided as http URL). The other system is a self-built esp8266 with physical mp3 player and loudspeaker. All in all you will hear three sounds being played. The outside rind doorbell itself, my esp doorbell and the google devices. The esp reacts a bit faster compared to google homes. Anyway, all in all it’s still pretty fast. maybe 500ms delay.

btw guys, now after few weeks testing without a Ring protection plan, I need to admit that the ffmpeg to ring-mqtt connection (to create the still image) isn’t 100% satisfying. The main issues are:

  1. The process to grab the still image is very slow and leads to a delay between motion event and image finally loaded on my smartphone
  2. Quite rare, but sometimes the image is corrupted (seems to be udp issue, but I wasn’t able to make it run using tcp)
  3. It happened to me a few times that ring-mqtt rtsp stream stopped working. then of course you won’t get any image. the developer said he has to implement more errorhandling. so maybe it will work better in the future.

Summarized, I’m thinking about purchasing the ring protection plan. Then AWS will take care about all videos.

I haven’t figured out how to debug and get the logs with the manual install unfortunately :confused:
I did set up the mqtt generic thing in MainUI (using the built-in mqtt broker, not mosquitto), but I guess I have to create the channels manually as well, right (at least that’s how I did it in OH 2.5 with the configuration files). Would you mind sharing your YAML thing definition?

Hi mancer,

I did setup my Ring Doorbell Pro 2 with MQTT Docker. Here is my things file:

//RING Doorbell MQTT 
Thing mqtt:topic:your-ring-id "Ring Doorbell" (mqtt:broker:home) {
Channels:

   Type image:image               "Snapshot"              [stateTopic="ring/your-ring-id/camera/54e01989fd70/snapshot/image"]
   Type string:image_timestamp    "Ring Image Timestamp"  [stateTopic="ring/your-ring-id/camera/54e01989fd70/snapshot/attributes"]
   Type string:ring_motion        "Ring Motion"   [stateTopic="ring/your-ring-id/camera/54e01989fd70/motion/state"]
   Type string:ring        "Ring Ding"   [stateTopic="ring/your-ring-id/camera/54e01989fd70/ding/state"]
   
}

Its really fast. I did setup a test rule to turn on the entrance hall light when detection is notified and it´s really fast, almost no delay.

Sorry for reviving this old thread. I can’t for the life of me get the MQTT authentification to work. Maybe @Mario084 or @StefanH can help me with this one…
I’m on openHABian running OH 5.2. I just installed mosquitto via openhabian-config and docker as well as ring-mqtt 5.9.2 via SSH.
mosquitto.conf:

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

#bind_address 0.0.0.0
listener 1883
protocol mqtt

password_file /etc/mosquitto/passwd
allow_anonymous false
#allow_anonymous true

docker.compose.yml:


services:
  ring-mqtt:
    image: tsightler/ring-mqtt:latest
    container_name: ring-mqtt
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./data:/data
    ports:
      - 8554:8554
    logging:
      options:
        max-size: 10m
        max-file: "3"
    environment:
      - DEBUG=ring-mqtt
      - MQTTHOST=openhabian
      - MQTTPORT=1883
      - MQTTRINGTOPIC=ring
      - MQTTUSER=<...>
      - MQTTPASSWORD=<...>
      - ENABLECAMERAS=true
      - SNAPSHOTMODE=all

config.json:

{
  "mqtt": {
    "mqtt_url": "mqtt://<...>:<...>@192.168.178.94:1883",
    "mqtt_options": "",
    "disarm_code": "",
    "enable_cameras": true,
    "enable_modes": false,
    "enable_panic": false,
    "ring_topic": "ring",
    "location_ids": [
    ""
    ]
  },
  "ring": {
    "email": "RINGEMAIL",
    "password": "RINGPASSWORD"
  },
  "interval": 20,
  "debug": false
}

If I enable allow_anonymous everything’s working fine, however, if I disable it, I get “connection refused”

ring-mqtt.js version: 5.9.2
Node version v22.21.1
NPM version 10.9.4
git version 2.52.0
-------------------------------------------------------
Running ring-mqtt...
2026-01-24T00:19:15.773Z ring-mqtt Detected runmode: docker
2026-01-24T00:19:15.778Z ring-mqtt Configuration file: /data/config.json
2026-01-24T00:19:16.357Z ring-mqtt Reading latest data from state file: /data/ring-state.json
2026-01-24T00:19:16.366Z ring-mqtt WARNING - Unhandled Promise Rejection
2026-01-24T00:19:16.366Z ring-mqtt Invalid URL
2026-01-24T00:19:16.367Z ring-mqtt TypeError: Invalid URL
    at new URL (node:internal/url:827:25)
    at Config.init (file:///app/ring-mqtt/lib/config.js:49:25)
2026-01-24T00:19:17.010Z ring-mqtt Attempting connection to Ring API using saved refresh token...
2026-01-24T00:19:22.111Z ring-mqtt Successfully established connection to Ring API using saved token
2026-01-24T00:19:22.112Z ring-mqtt Received updated refresh token
2026-01-24T00:19:22.112Z ring-mqtt Saving updated refresh token to state file
2026-01-24T00:19:23.132Z ring-mqtt Successfully saved updated state file: /data/ring-state.json
2026-01-24T00:19:24.111Z ring-mqtt Attempting connection to MQTT broker...
2026-01-24T00:19:24.155Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized

(The “Invalid URL” is thrown in both cases, so I don’t think this has anything to do with it).

Any help on this is highly appreciated.

Any reason you don’t want to use the ring binding which was part of OH 5.0?

It seems to me you have a problem with your mosquitto passwd file. The broker uses its own user database and does not support to use usernames and passwords of host users. You can see this in your mosquitto conf. The content of the passwd file should look like:

cat mosquitto/config/passwd
openhabian:$6$E0k1o562k1lZeb….+LogjVROMA==

I would like to grab snapshots of the camera and show them in MainUI. As far as I know that’s not possible with the binding.

@StefanH Thanks, will check it out later this evening.

/etc/mosquitto/passwd contains both the host user and the one I created for Ring.
Using mosquitto_sub and mosquitto_pub does work - I can send messages to the broker manually. Only when I try it in ring-mqtt I get the “Not authorized” message.
I wonder if the issue is in the communication between mosquitto and the docker container.

Good catch. Try to access the console aka terminal interface of your docker Container. If needed use apt to install mosquitto_sub/pub and check if it works to connect to your broker

It’s not, but it’s on my list.

Further to this, I just worked out how to get the timestamp of the last snapshot, and how to download the snapshot using curl; so now I ‘just’ need to code it :slight_smile:

OK see code at GitHub - psmedley/openhab-addons at ring-snapshots

I’ve dropped a snapshot build at https://smedley.id.au/tmp/org.openhab.binding.ring-5.2.0-SNAPSHOT.jar

I still need to test if I got the ‘upgrade’ xml correct in order to add the new channel group which includes the snapshot.

Sounds good! Let me know if you’re looking for testers :slight_smile:
I’ve got a Ring wired and wireless doorbell camera.

https://smedley.id.au/tmp/org.openhab.binding.ring-5.2.0-SNAPSHOT.jar works except for the upgrade part - so right now, to use it, you need to remove the things and recreate them. Once I work out how to get the upgrade working, I’ll submit a PR and it should be included in OH 5.2.0

Come to think of it, I should just add the new channels to the Device Status group, rather than trying to create a new group….

I force-removed the old things I created with the official release, uninstalled the old binding, restarted, installed the .jar but now I’m stuck with “Invalid username or password” when creating a new Bridge thing.
I left username/pw blank and just added the 2FA code.

You’ll need to add username and password, then when prompted, add the 2FA code