This release adds support for the new Ubiquiti Floodlight device. If found on your Protect Server, it will add a new entity type light, that will expose the Floodlight as a light entity and add support for turning on and off, plus adjustment of brightness.
There will also be support for the PIR motion sensor built-in to the Floodlight, and you will be able to adjust PIR settings and when to detect motion.
You must have UniFi Protect V1.17.0-beta.10+ installed for Floodlight Support. Below that version, you cannot add the Floodlight as a device to UniFi Protect.
THANK YOU again to @bdraco for helping with some of the code and for extensive code review. Without you, a lot of this would not have been possible.
ADDED: New light entity for each Floodlight found. You can use the normal light services to turn on and off. Be aware that brightness in the Protect App only accepts a number from 1-6, so when you adjust brightness from Lovelace or the Service, the number here will be converted to a number between 1 and 6.
ADDED: A Motion Sensor is created for each Floodlight attached. It will trigger motion despite the state of the Light. It will however not re-trigger until the time set in the Auto Shutoff Timer has passed.
ADDED: New service unifiprotect.light_settings. Please see the README file for details on this Service.
FIXED: Missing " in the Services description, prevented message to be displayed to the user. Thank you to @MarcJenningsUK for spotting and fixing this.
CHANGED: Bumped pyunifiprotect to 0.28.8
IMPORTANT: With the official FW 2.0.24 for the CloudKey+ all UniFi Protect Servers are now migrated to UniFiOS. So as of this release, there will be no more development on the Non UniFiOS features. What is there will still be working, but new features will only be tested on UniFiOS. We only have access to very limited HW to test on, so it is not possible to maintain HW for backwards compatability testing.
This release is tested on:
Tested means that either new features work on the below versions or they don’t introduce breaking changes.
CloudKey+ G2: FW Version 2.0.24 with Unifi Protect V1.17.0-beta.13
UDMP: FW Version 1.18.5 with Unifi Protect V1.17.0-beta.13
I’ve been looking around for some projects to help out on and are waiting for some more Protect gear to arrive then i’ll be happy to help test (and develop once i get the hang of the process involved in HA dev).
My setup to arrive within a week that i can help out with the testing should be something like this:
4 Bay Protect NVR (NVR-EU)
1 pc UVC-G3-BULLET
1 pc UVC-G3-FLEX
1 pc UVC-G3-MICRO
(more cameras will be added in time, first out the doorbell when available in Sweden)
I’m currently starting to get involved in some other projects so my time will be somewhat limited but happy to help out in any way I can when all the hardware has arrived, if interested?
I rechecked, and I now get the same behavior BUT only on my G3 series CAM’s. The G4’s all do livestreams in Lovelace. Again, all we do in the Integration is supply an RTSP address, so it must be the stream component in HA.
I am not the expert on streams, but I would assume that there must be a difference in how the RTSP stream is constructed in the G3’s vs. the G4’s since it work with the later.
The difference also shows when clicking on the image. The G4’s start playing immediately, where the G3’s need me to click on the play button.
Hey briis,
With the new Ubiquiti breach I have setup 2fa on my Ubiquiti account. Do you have any way of getting your integration to work with 2-factor authentication enabled on a Ubiquiti account?
This integration is purely local, so it is not using the Ubiquiti SSO. You create a local user that can only be used within your local network (or a VPN connection).
Yeah, don’t know what happened but as soon as I changed my password for my Ubiquiti account and setup 2fa my integration stopped working. You are 100% right, I was able to get it working again just by adding the local user that I forgot I had setup. Not sure what happened but I am back up and working! Thanks
I have had another user reporting this, so it seems that if you activate 2FA after you have created local users, the permissions for these users are reset to Non Admin mode, and you need to re-active the Admin permissions in the UniFi Protect App or Web.
Done - made a comment in the bug.
And btw it is not only on iPads. I can reproduce it on my Mac in both Google and Safari browsers. As said earlier, G4 cameras work fine, but G3 cameras won’t live stream until you press the play button.
Just to ensure this has nothing to do with the Protect Integration, I set up one of the Cameras as this:
camera:
- platform: generic
name: Test Camera
still_image_url: http://192.168.1.xx/snap.jpeg
stream_source: rtsp://192.168.1.1:7447/MY_TOKEN
Hey, really stupid question I’m sure - Brand new user here.
I have a UDMP and with HA installed (.ovf image installed onto QNAP as a VM) as per the instructions.
Instructions say that this is only available via the integrations page. Yet I can’t see the Protect integration available.
Hi – awesome integration, works great for me. I created a binary sensor so I can only be alerted by smart detections of people (g4 cameras). It is able to pick up the motion sensors, however, the binary sensor stays “on” for hours afterwards and only periodically is reset to off (and I’m not sure what triggers the “off”. Below is my template configuration, any thoughts? I thought putting the delay_off would trigger it to go off after 5 minutes. Thanks
The easiest way to detect if person or vehicle in an automation is to watch for the event_object attribute. The G4 cameras will update this, when Smart Detection is triggered.
So you don’t need to create a Template sensor, just add the below to an Automation Trigger (Change Entity to your own Entity)
trigger:
- platform: state
entity_id: binary_sensor.motion_doorbell
to: person
attribute: event_object
It still works very well with CK FW 2.0.26 and UniFi Protect 1.17.2
However, I don’t know why the video are not “live” on my iPad’s Lovelace dashboard.
I need to click on the image and then to click on Play to start the video stream (and there is still a few seconds of delay). Is this a normal behavior? Or is it necessary to do something special on the card to really have the live stream of the camera (G3 Flex)? Thanks.
I don’t have any issue when using the same dashboard on my Mac. The video is live for all my camera.