Ring Floodlight Cam - Turn Floodlight on and off

THis works perfectly and was my first HA integration so thank you very much for this!

I did notice one error in the logs which i think may be caused be the newest HA update. “Integrations need to be in their own folder. Change light/ring.py to ring/light.py. This will stop working soon.” Can I simply reverse this like the log says or do i need to modify something in the python as well? Wouldn’t this also cause a conflict with the main “RING” integration?

I haven’t updated my HA, so I can’t directly test this for you, but my understanding is that it wouldn’t interfere with the main ring integration because the main one (last I checked) doesn’t support lights? Unfortunately I haven’t kept up on the changes to HA, so I’m not sure how or why they are changing the naming structure. But it does seem that renaming the items as mentioned in the log would be all you need to do.

If for some reason it interferes with the base ring integration, you could probably just rename the integration to something like “ringLight” or “ringCustom” to avoid the conflict. The only conflict I could possibly see is a namespace issue in config, so renaming it like this would fix the issue for you. But I’d definitely save this for last. Try just reversing the order as the error suggests first.

1 Like

I have this setup correctly and made the changes suggested in the log with the most recent version and it works when I go into HA to turn on or off the light. I can then go into the Ring app and see that it has turned it on/off. However, when you manually turn on the floodlight inside of the Ring App or if motion is detected and it comes on, it is still listed as being turned off in HA. Any suggestions?

So i just upgraded to the new HA version and it totally stopped working.

My configuration yaml looks like this:
# ring integration
ring:
username: !secret ring_username
password: !secret ring_password

# ring floodlight
light:
  - platform: ring

If i change the folder / file to ring and light.py it gives an error saying that “Ring” does not support “light”

If i try renaming the folder to ringlight then check config i get this error “Component not found: ringlight”. There must be something no longer detecting it as a custom component i guess? Any help would be appreciated. This was working so well!

Based on what I understand, in .89 and newer, custom components are required to override the entire component (all ring devices), not just a single platform of a component (only lights for Ring).

My super hackish fix for this was to drop the ring.py custom component into the main home assistant component directory, which in my case was /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light

Probably the better thing to do would be to copy all of the ring.py files from the home assistant platforms to custom_component directory but I was too lazy!

I did just prove that copying each ring.py file from the various component directories, renaming them to <component_name>.py and putting them in custom_components/ring along with the file above (name light.py) does work just fine. To make this easier, here’s a zip file that contains the .89 version of the ring components with the light.py component added. Just unzip this into custom_components and you should be good to go.

I’ve been seriously considering adding Ring light/siren control to my Ring Alarm MQTT component because it would be nice to support automations to flash lights/enable siren during alarm events and it would eliminate my dependency on this custom component. If anyone else thinks that would be useful let me know and maybe I’ll bump up the priority on that effort.

4 Likes

@tsightler Thanks for that - working again! I guess because I had the ring integration going (without the files in the custom_components dir) that’s what gave me the error. Thanks again.

@tsightler - would that allow using non-Ring motion and door sensors to trigger Ring alarms via automations? Or at least the siren? I would be very interested in that.

It would allow for triggering of the siren on Ring cameras that have this capability (I believe stickup, spotlight and floodlight cams all have them). This part should be pretty easy.

It might be possible to trigger the “test siren” capability on the alarm base station, just like you can do from the app, but it would not generate an actual alarm event. I would definitely need to do some digging to figure this out as I’d have to determine the commands the app sends to do this.

I don’t believe I could trigger an actual alarm as it appears to me that alarms can only be trigger by “trusted” Z-wave devices locally. This makes sense as the alarm needs to be able to be triggered even in the absence of connectivity to Ring.

Even here you could get creative as it would be pretty easy to take an existing Ring contact sensor and rig it up so that some automation triggers the open/close event, either via mechanical or electronic means, but that’s beyond simple coding.

@tsightler, thanks for the .zip. You are fantastic.

I have two quick questions that I was curious whether you might have answers/tips for:

  1. I couldn’t seem to find a comparable, existing /custom_components/ folder to unzip your files into via my Hassio on R-Pi installation. Any idea per if that’s a hidden folder and/or a folder I can just create somewhere within the folder path of my Hassio installation?

  2. Once I get my Ring Floodlight’s established as a controllable light in HA, do you have any knowledge of or experience with whether HA’s HomeKit: component will allow HA to expose that light control to HomeKit?

Based on the conversation on this thread so far, I’m inferring that you don’t use Hassio for HA and also guessing you may not use HomeKit / Apple’s Home.app either… but I figured it could hurt to ask you and others on the thread if they had any insights/tips.

Thanks again!!

I don’t use hassio but I have played with it a little in an attempt to understand it better. I believe there should be a /config directory and that you have to create custom_components directory in there.

Regarding HomeKit, I don’t use it, but I know a little bit about it just due to the fact that I played a good bit with HomeBridge just learning about the protocol. I believe that the HA component should allow HA to expose the light as it’s just a light entity, there’s nothing special about it.

Good luck!

@tsightler, thanks so much!

I’m actually playing with this now and have all 5 files from your .zip added to config/custom_components/ring/

But when I go to validate configuration.yaml, I get this error:

(I also tried uploading the 5 files to config/custom_components/light/ just to make sure I’m not going nuts.)

In configuration.yaml I have:

ring:
 username: ***********************
 password: ***********************

# Add Ring Doorbell Pro + Floodlight cameras into HASS (works with ffmpeg: and ring: above)
camera:
  - platform: ring
  
 # Add Ring Floodlight into Hass (uses ring: above + files in config/custom_components/ring)
light:
  - platform: ring

# Returns a boolean value for things like when a device sees motion or a doorbell is rung
binary_sensor:
  - platform: ring 

camera: and binary_sensor: were already previously working before I added the files to config/custom_components/, as they’re both part of Hassio’s “built-in” ring: component.

I’m running HA 0.90.2.

Any tips?

Thanks again for the help!

Did you restart Home Assistant between adding the files to custom_components and adding the lines to your configuration? If not, Home Assistant hasn’t loaded the custom component files which is why the config check can’t find them.

One thing to keep in mind is that by overriding all of the ring files you’re not getting any upstream changes to the ring component. This may be good or bad. If upstream ring changes cause the ring light component to break then it might be better to override everything. However, if upstream ring changes are implemented due to changes in ring API, etc., not getting these updates could cause everything with ring to break. I personally just put the light.py in config/custom_components/ring_light and in my configuration.yaml I have platform: ring_light.

@claytonjn, thanks so much for gifting some of your time and knowledge to my issue here!

I definitely restarted (ended up doing so a few times) after adding the 5 files (including light.py) to config/custom_components/ring/

However, before the initial restart, I had removed (i.e., commented out) light: - platform: ring in configuration.yaml after not being able to validate configuration.yaml for fear that I might not be able to get back into HA after a restart with the unvalidated configuration.yaml.

Do you think that was a mistake? Could/should I have safely restarted HA with the unvalidated light: - platform: ring in configuration.yaml?

Either way, it may be worth mentioning that after the first restart following the add of the 5 files (including light.py) to config/custom_components/ring/, I definitely had light: - platform: ring added back into configuration.yaml and tried to validate again (and it failed to validate again telling me “Platform not found: light.ring”).

That said, I can’t remember if any of my restarts thereafter did or didn’t have light: - platform: ring included in configuration.yaml at the time of reboot—I just know that there was no success after each restart, and at one point, my Configurator stopped loading + I lost my other light integrations (Tuya).

By then it was 1am, so I restored a previous snapshot and called it a night.

I was semi-aware of the implications in Hassio per overriding the built-in Ring: component with all 5 of the files (including light.py) added to config/custom_components/ring/. In on eof my attempts, I had also tried deleting all but light.py from config/custom_components/ring/ with a restart and no luck. But your notes above help add clarity and confirmation for me on that front.

I LOVE the suggestion of putting light.py in config/custom_components/ring_light and then trying for:
light:
- platform: ring_light

Before I try that, though, I am hoping you can confirm that it should be safe for me to add both light.py to config/custom_components/ring_light and light: - platform: ring in configuration.yaml at the same time and restart HA (even with the expected configuration.yaml throwing validation errors)?

Or would it be better practice for me to:

  1. Add light.pytoconfig/custom_components/ring_light` then restart

  2. light: - platform: ring_light in configuration.yaml then validate then restart (even if configuration.yaml won’t validate)

Thanks SO MUCH for your help!!

I wouldn’t ever advise ignoring the validation errors, it would always be best to use the two-step method you outlined. Keep in mind, however, that the platform folder and and the configuration need to match. So if you put light.py in config/custom_components/ring_light as you said in step on, then in step 2 you need

light:
  - platform: ring_light

Yep. Totally per the need to match platform: *NAME* to config/custom_components/*NAME*/ folder.

I had typo’d platform: ring (instead of typing platform: ring_light) above accidentally. (Edited that typo above in case future folks reference this thread for the same issue—don’t want to confuse them.)

Immah gonna give 'er a try when I get home from work tonight… FINGERS CROSSED

Thank you so much for your help, @claytonjn. You are AWESOME.

I worked this time around!

Thanks so much for the assist, @claytonjn & @tsightler.

I’m gonna go out on a limb and ask one more question: does anyone know of a way to add controls directly in HA for being able to trigger the Ring Floodlight alarm?

I don’t have a formal alarm system, like Ring Alarm, but am setting up Aqara door sensors and would love to add an automation for when they’re armed and breached that triggers my Ring Floodlight alarm to sound off.

Thanks again for ll the help!

Glad you got it working.

Regarding your query to trigger the floodlight alarm via HA, this is exactly why I’ve been considering adding support for cameras to my ring-alarm-mqtt project (or a separate ring-mqtt project) as I want to be able to automate sounding the camera alarm sound via home assistant. I just haven’t had the time to work on it.

1 Like

2 Day old Home Assistant user here. I got Hassio 0.92.1 installed and up and running.
Can anyone do a step by step for getting the Light control for the Ring Floodlight working?
I downloaded the zip file from “https://drive.google.com/open?id=1XT1uMk3zgRePIPXis-NntjDx_OKNapXb” and placed them in custom_components\ring

Here is my config setup

Ring Component

ring:
username: !secret ring_username
password: !secret ring_password

camera:

  • platform: ring

binary_sensor:

  • platform: ring

When I put in the
light:

  • platform:ring
    in the config I get the config invalid error.

is this feature not working on the latest version of hassio 0.92.1?

There’s a couple issues at play here that might be causing your problem. It would help if you post the exact config invalid error.

Custom components can no longer “extend” official components - they either need to completely replace the official component, or they need to use a different domain. Some users here have chosen to completely replace the official ring component (which is what the zip you linked to would do). I prefer to merely change the domain for reasons outlined here. So for me, I just have the one light.py file, and I have it placed in custom_components\ring_light. This also means that I have - platform: ring_light in my configuration.

In addition to that, there used to be “platforms” and “components”, but now everything has been reclassified as an “integration”. The only real impact of this change is that, in addition to the light.py file I also created an empty __init__.py file in custom_components\ring_light. Some people have been reporting that they need to also have a manifest.json for every custom component, but in my setup with 0.92.0 and 0.92.1 that hasn’t been the case - not sure why it seems to be required in some setups and not others…

If you prefer to override the official component then hopefully someone else here can chime in to help you, either way, posting the configuration error would be the best first step.