Ring: Device categories occasionally revert (“Fans” → “Lights”)

Created on 12 May 2020  Âˇ  8Comments  Âˇ  Source: dgreif/ring

Bug Report

Describe the Bug

The Ring app for iOS allows you to specify a category for certain devices:
ring-app-device-category

Occasionally, after restarting homebridge-ring, I see messages like this in my logs:

Pruning unused service 00000040-0000-1000-8000-0026BB765291 Living Room Ceiling Fan from Living Room Ceiling Fan

This message indicates that my “Living Room Ceiling Fan” fan device was removed from the Home app. In its place, homebridge-ring has created a new light device. When I check “Living Room Ceiling Fan”’s category in the Ring app, I see that it has been reset from “Fans” back to “Lights” (the default).

Is it possible homebridge-ring is inadvertently overriding device categories on startup?

To Reproduce

Steps to reproduce the behavior:

  1. Add a device to the Ring app (for testing purposes, this can be a light device like the GE Z-Wave Plus Dimmer Switch or an actual fan control like the GE Z-Wave Plus Fan Control).
  2. In the Ring app, set the device’s “category” to “Fans“.
  3. Restart homebridge-ring. Notice that the device is successfully added to HomeKit as a fan.
  4. Wait.
  5. Restart homebridge-ring. It’s possible your device now shows up as a light in the Home and Ring apps.

This describes the circumstances in which I experience the issue. Unfortunately, I don’t have a more specific repro step 4. I’m not sure how much time must elapse, or whether time is incidental to the actual cause.

Expected behavior

I expect devices I configure as “Fans” to remain as “Fans” and not revert to “Lights”.

Screenshots/Logs

To workaround this issue, I set the device category back to “Fans” in the Ring app, then restart homebridge-ring. Then, messages like this appear in my logs, showing that the errant light device is removed (a fan device appears in its place):

Pruning unused service 00000043-0000-1000-8000-0026BB765291 Living Room Ceiling Fan from Living Room Ceiling Fan

Additional context

I run homebridge-ring as a launchd service: com.homebridge.ring.plist

Homebridge Ring Config

{
  "bridge": {
    "name": "Homebridge Ring",
    "username": "02:00:00:00:00:00",
    "port": 50000,
    "pin": "000-00-000"
  },
  "description": "Homebridge Ring",
  "accessories": [],
  "platforms": [{
    "platform": "Ring",
    "refreshToken": "[snip]",
    "hideCameraSirenSwitch": true,
    "hideAlarmSirenSwitch": true,
    "hideDoorbellSwitch": true
  }]
}

Environment

  • OS: macOS Catalina 10.15.4
  • Node.js: 12.16.3
  • Yarn: 1.22.4
  • homebridge-ring: 8.1.0
  • homebridge: 1.0.4
bug

All 8 comments

@smockle I have a couple z-wave fan switches hooked to my Ring Alarm and have definitely seen this issue as well. I haven't looked into it a whole lot yet, but from my original digging (months ago), it seemed like Ring was actually the problem. It seemed like if you set the type to Fan in the Ring app, and then went back later, it would be switched to Light without any outside interaction. If you are noticing that it changes right when homebridge restarts, then it is definitely possible the plugin is causing the issues. I'll look into it again soon as this is definitely annoying 😄

So this is a bit ironic. I changed both of my switches back to Fans in the Ring app 2 days ago and they haven't switched back to lights since. I've restarted homebridge multiple times and turned them on/off from both HomeKit and the Ring app. I know that this was definitely an issue, but maybe Ring fixed it on there end. Can you give it another try and report back in a few days?

Mine finally switched back to lights instead of fans. We had a power blink and I added some new zwave devices around the same time, so I’m not sure the exact cause. My best guess is that the switches report themselves as lights to the z wave hub which causes Ring to change them back. I’ll do some testing this weekend to try to reproduce. If my theory is correct, this is probably something we will need to report to Ring to get it fixed

I had the same issue yesterday and noticed that the ring reported my fan as light. I changed it back to fan in ring app and restarted homebridge again. The home app reported the type as fan correctly. Not sure if this is a ring app issue or switch issue. I am using GE Jasco switch.

@smockle I'm fairly convinced that this is a bug on Rings side, allowing the switch to self-report its type and it always reports as a light switch instead of a fan. If that is true, it will always eventually switch back to a light within Ring, which means homebridge will always eventually remove your fan accessory and add a light. I think the only real option that I have here is using the saved context for the accessory, in which case I can save the _initial_ switch type then always use that type in the future. The problem with this approach is if you have it set to a light in Ring the first time you start homerbidge, you would be unable to change it to a fan without clearing your cached accessories (which is extremely disruptive for all of your other automations). Given the downsides to both approaches, I'm not sure which way to go. Would love to get your input.

Thanks for investigating this @dgreif, and for brainstorming solutions.

I think the only real option that I have here is using the saved context for the accessory, in which case I can save the initial switch type then always use that type in the future.

This makes sense; I’d considered a similar workaround. However, I worry it’d lead to more confusion: “Bring your Ring devices into HomeKit” is, I suspect, a more common mental model for how this plugin works, compared to “bring your Ring devices into HomeKit, unless Ring seems buggy, in which case we’ll bring cached data instead”. Considering the principle of least surprise, I’d suggest _not_ implementing device type caching.

In addition to causing less surprise/confusion, by not implementing caching, we wouldn’t have to remove code in the future when Ring eventually fixes the bug so that a workaround is no longer needed.

I’m okay with closing this issue—we’ve determined the bug is on the Ring side, and the potential workarounds have undesirable trade-offs.

@smockle I completely agree with your logic. There are simply too many issues with handling this bug on the homebridge side. 🤞 maybe Ring will fix it some day

Incidentally, since connecting outlets to my Ring Alarm (which inspired #493), I’ve also noticed outlets occasionally revert to lights.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

parchmaf picture parchmaf  Âˇ  3Comments

divemasterjm picture divemasterjm  Âˇ  7Comments

donavanbecker picture donavanbecker  Âˇ  5Comments

benfysh picture benfysh  Âˇ  6Comments

jchristianj picture jchristianj  Âˇ  4Comments