Hi Paul,
Yes it is. This is the current accepted Device Class in Home Assistant. We could need another device class for this type of devices, but it is not currently there.
The Ring implementation uses the same setup, as an example.
CloudKey goes UnifiOS
There is now a beta release out (UniFi Cloud Key Firmware 2.0.18), that migrates the CloudKey to UnifiOS, making it on par with the UDM Pro on the SW side. One of the benefits, is that you will get Push Events instead of Pull, minimising the load on your system and faster response times.
I took my old CloudKey and have tested the upgrade and the functionality with this Integration, and it works like a charm.
If you decide to go for the upgrade on your CloudKey, you will have to remove your Unifi protect Integration from HA first, and then reinstall it after your CloudKey upgrade. Use the instructions from the UDMP section. (Local user, and port 443).
It comes with Unifi Network 6.0.33 and Unifi Protect 1.6.0.
You need to have access to Beta Software from Ubiquiti to get the upgrade - if you are not part of that yet, here is a link on how to do that.
As always, upgrading is at your own risk, so please read the release notes carefully before you go down that route.
To make it clear, the Unifi Protect HA Integration does not need to be upgraded unless you run a very old version - in which case you should upgrade anyway.
I verified the websocket code is working as expected with the CloudKey.
You can skip re-setting up the integration by changing the port from 7443
to 443
in .storage/core.config_entries
and reloading the integration from the integration UI after updating the cloud key. (Make a backup first)
I did have some trouble getting it to register on unifi.ui.com
(had to disable and re-enable remote access in the local portal /settings/advanced
) so please do be mindful that its still beta.
Thanks for tip on the upgrade. I hadn’t even thought about checking that.
Hi, for me doesnt work, i have added user and password in protect running on ckgp2, in the integration page i’ve click on plus sign searched for protector added ip username and password but it say:
“Error retrieving data from Unifi Protect”
What i’m doing wrong?
Is this the first time you install the Integration or are you doing an upgrade?
If it is a new installation: Did you upgrade your CloudKey to 2.0.18?
If yes to that:
Did you give the user you created Administrative access?
Did you specify port 443?
Very very thanks for the fast reply,
Fresh installation of integration, no the cloudkey run version below 2.0, and yes i’ve create a user with the admin option
Typically that error is thrown during Installation when the port number is wrong. With your CloudKey, running a version below 2.0.18, you will have to use port 7443. Did you do that?
Yes is the default port in configuration tab
Hi everyone !
I keep getting this error ;
2020-11-10 12:46:26 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for neviweb130 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-11-10 12:46:35 ERROR (MainThread) [homeassistant.components.binary_sensor] The unifiprotect platform for the binary_sensor integration does not support platform setup. Please remove it from your config.
2020-11-10 12:46:35 ERROR (MainThread) [homeassistant.components.sensor] The unifiprotect platform for the sensor integration does not support platform setup. Please remove it from your config.
2020-11-10 12:46:37 ERROR (MainThread) [homeassistant.components.camera] The unifiprotect platform for the camera integration does not support platform setup. Please remove it from your config.
Here is my config in configuration.yaml
unifiprotect:
host: 192.168.1.8
username: patate
password: patate123
camera:
- platform: unifiprotect
binary_sensor:
- platform: unifiprotect
sensor:
- platform: unifiprotect
I’m really new to the home Assistant world so I’m definitely missing something but I dont’ know what !!
Thanks for your help!
Configuration via yaml is no longer supported with this integration. Instead you configure it in your Home Assistant dashboard in the Integrations section of the configuration.
Hi,
Try and upgrade to the newly released 0.6.2. And before you restart, add the following to your configuration.yaml
logger:
default: error
logs:
custom_components.unifiprotect: debug
Then go through the setup process again, and check the Log File for Unifi Protect errors.
Hi new verion works perfectly, now i have all cam and sensor. Very very thanks this integration is amazing
@briis
Hi,
I’ve done the configurations 3 times. Reinstall, and fresh installs. Still not able to get person detect to work on any of my G4 camera’s.
For all G4 camera’s with person detect enabled, I’m not seeing it trigger.
For all the G3 camera’s with motion detect, they are triggering.
G4 Camera’s
- Motion is set to 0, disabled
- Person Detect enabled
G3 Camera’s
- List item
It seems Person Detect is not working.
Running latest HACs
Running latest Unifi Protect Integration
UDMP running v1.8.3-2
Protect running v1.16.2
alias: (-Test LG TV - Video Notify)
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_doorbell
attribute: event_object
to: person
condition:
- condition: state
entity_id: media_player.lg_living_room_tv
state: 'on'
action:
- data:
filename: /home/homeassistant/.homeassistant/www/UnifiProtect/front-door-snapshot.jpg
entity_id: camera.doorbell
service: camera.snapshot
- data:
data:
attachment:
content-type: jpg
hide-thumbnail: false
url: http://192.168.200.241:8123/local/UnifiProtect/front-door-snapshot.jpg
message: Someone at the Front Door
service: notify.lg_webos_smart_tv
mode: single
Last but not least.
Image will not displace on the TV.
During my testing with a G3 camera, the image is updated in the folder, the message pops on the TV, but there is no picture.
So there might be several problems here - some related to Unifi Protect, and some more generic to HA.
Could we start with the People detection on your G4 cameras. Could you just make a simple automation like the below and see if that works:
(Replace the action part with a notification that works for you)
alias: Send message when person detected
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_doorbell
to: person
attribute: event_object
condition: []
action:
- service: notify.iphone
data:
message: A person has been detected on the Camera
mode: single
I have narrowed it down. I’m only relying on Person Detection, not motion detection. I turned on Motion Detection on the doorbell and retested, the message showed up on the TV. Turned off Motion Detection (setting the sensitivity to ‘0’) and the message would not go through.
Maybe the the Event_Object for person isn’t working?
I ask the above as Person Detects come through from Protect to the Protect App… Just HA is not recognizing Person Detect.
alias: (-Test 1)
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_doorbell
attribute: event_object
to: person
condition: []
action:
- service: notify.lg_webos_smart_tv
data:
message: G4 Doorbell Test
mode: single
If you have motion detection disabled, person detection will not work since we won’t poll for events until there is motion or a doorbell ring.
I’m looking to install a dreammachine pro with 7 G4 bullet cameras and a G4 doorbell. Is anyone using the Homekit Bridge in HA? Would be great to have my 8 G4 cameras avaiable within Apple Homekit. Anyone experience with this?
I suppose the G4 doorbell is not recognised as doorbell then within Homekit, but just as a camera?
Thanks.
@briis: I keep getting these errors, primarily when Person detection happened (with UNVR). This happens when a person is detected and the thumbnail is about to be saved:
raceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 253, in _async_step
await getattr(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 463, in _async_call_service_step
await self._async_run_long_action(service_task)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 422, in _async_run_long_action
long_task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1448, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1483, in _execute_service
await handler.job.target(service_call)
File “/usr/src/homeassistant/homeassistant/components/script/init.py”, line 215, in service_handler
await script_entity.async_turn_on(
File “/usr/src/homeassistant/homeassistant/components/script/init.py”, line 320, in async_turn_on
await coro
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 1010, in async_run
await asyncio.shield(run.async_run())
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 245, in async_run
await self._async_step(log_exceptions=False)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 253, in _async_step
await getattr(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 460, in _async_call_service_step
await service_task
File “/usr/src/homeassistant/homeassistant/core.py”, line 1448, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1483, in _execute_service
await handler.job.target(service_call)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 573, in handle_service
await service.entity_service_call(
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 482, in entity_service_call
future.result() # pop exception if have
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 664, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 519, in _handle_entity_call
await result
File “/config/custom_components/unifiprotect/camera.py”, line 169, in async_save_thumbnail
image = await self.upv_object.get_thumbnail(self._camera_id, image_width)
File “/usr/local/lib/python3.8/site-packages/pyunifiprotect/unifi_protect_server.py”, line 433, in get_thumbnail
raise NvrError(
pyunifiprotect.unifi_protect_server.NvrError: Thumbnail Request failed: 404 - Reason: Not Found
Have you seen this?
Thanks
Christian
If that is the case, and don’t take this the wrong way, then in my mind the coding is wrong.
My question is; then how does Unifi Protect still push Protect Notifications to the cell phones with Motion Detection set to ‘0’ on sensitivity?
Sounds as if Integration coding is relying on Motion Detections to get Person Detection.
Here’s the problem with Motion Detection and why many customers have it off, including myself… False notifications. For me, even a Cloud is passing over the shade/sun sets of the notification no matter what the sensitivity is set to. Ever since Person Detect was made available this resolve all the false alarms.