-
Notifications
You must be signed in to change notification settings - Fork 102
Support for car and person detection #86
Comments
I will add some info as soon as NVR has good support. Thanks for that. Reolink_dev is the HACS repository. Reolink is the Python library. |
Hi, |
For car/person detection I need some time. Please be patient. |
+1 on this, having the detection in HomeAssisatant would be awesome for sure. Currently researching camera systems and had been looking at the Hikvision cameras with the person detection but reolink looks to be way more affordable. |
Jaysus dood! I nearly had a heart attack when I saw an email notification from theBOFH. |
Does anyone have any idea if this information is exposed anywhere? I only see motion events (not person/car specific) in the onvif messages. I've looked at the JSON in the web view and nothing stands out. Looking through the desktop app's obfuscated code I have a feeling it is only exposed through the extended attributes in the Baichuan protocol instead of metadata/onvif/rtsp. |
Hi Scott, thanks for checking this out! I have traces the data traffic with Wireshark, and also see this. I'm afraid the cgi api doesn't offer this info. |
I contacted Reolink support with this questions:
And they answer was:
So as it is now, I would not recommend the camera for anyone wanting to integrate it in Home Assistant. |
I wouldn't go that far. It's still a very good camera for the price. Do their NVRs even work with person and car detection? |
The engineers at Reolink currently work an the API so we can use person/vehicle detection within HA. The support they provide is very great, and you just have to be a little more patient. I agree the camera's they provide are very good for the price. And beside: look what is already supported now, compared to a lot of other camera's! |
I didn't know they were already working in that API. It did not sound line that from their response. |
I agree with @fwestenberg 100%, Reolink support alone is worth the price, I never had an issues with their support, they reply same day / next day, even on weekends and Holidays, and they do actually help, they take every customer issue seriously. |
@fwestenberg thank you for your work. I am waiting for the official Reolink HA component. |
Hi, hth James |
Great! Then since with ONVIF we can get a normal motion notification it should be possible to get the type of alarm by calling that GetAiState endpoint right after. That should be easy to implement even if Reolink does not provide a firmware inplementing AI alarms with ONVIF. How long does it take the alarm state to reset back to 0? |
1 similar comment
Great! Then since with ONVIF we can get a normal motion notification it should be possible to get the type of alarm by calling that GetAiState endpoint right after. That should be easy to implement even if Reolink does not provide a firmware inplementing AI alarms with ONVIF. How long does it take the alarm state to reset back to 0? |
Just tested, that looks like a really great find! My 810As respond well! However, the API is not happy with passwords that need percent encoding (e.g. # is %23). But that's fine because I can just make an API user with really long passwords. Might be worth noting somewhere in readme? If it helps, I have a slightly different response through:
Firmware: v3.0.0.177_21012103 |
Further to this, the GetAiState command does not exist on the NVR yet |
@ldwedari It doesn't stay as 1 for very long. Hard to tell walking in front of the camera and refreshing the link but 1 maybe 2 seconds max |
This is exactly what is done for NVR. At any motion, every camera is called to find out who triggered the onvif motion. So indeed, it is easy to implement the same for AI. I own a 820A, but had to update first to get the GetAiState API call supported. |
Please update the cam's firmware and check out the new release! The binary sensor should be updated with attributes! |
Hi, Invalid config Logger: homeassistant.setup Unable to prepare setup for platform reolink_dev.sensor: Platform not found (cannot import name 'SensorEntity' from 'homeassistant.components.sensor' (/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/sensor/init.py)). |
I also got that error. I also don't get any motion events. It always stays "Clear". |
The above error is unfortunately something with the Media browser for Reolink. Any other error in the log? |
Can't see any other errors in the log. Just tried a re-install to see if that brought up any others but no. Maybe unrelated but now when I go to config and change the stream to rtsp/sub and save it says "User input malformed" and doesn't save. So means the live view wont work. |
@jrtraynor I had to put something in the custom thumbnail path (I then went to the .storage/core.config_entries file to remove the custom thumbnail bit from the JSON). Weirdly, I am not seeing any motion events at all... nothing in the log either. Don't know if this was an issue before as I only just set it up. |
My 810A which showed motion events earlier ok, does strange things with this update |
Guys, I'm owning 820A and little confused how checking for updates works. When i check in Reolink Client it was saying that I'm running the newest version from January, on the official page it is also referring to January version https://support.reolink.com/hc/en-us/articles/900004600266-21st-Jan-2021-Firmware-for-RLC-820A-RLC-810A. But when i reach out to Reolink suport with the problem that "Car detection catchers cars outside of motion zones" they send my April firmware v3.0.0.251_21040912 with the fix https://support.reolink.com/attachments/token/RWjfZKeQp51lsSwq8vIG4BZlC/?name=IPC_523128M8MP.251_21040912.RLC-820A.IMX415.8MP.REOLINK.pak |
@inzynierwatroba have noticed that too with my 810A. |
@wimpie007 where did you ware able to find the 21 March release for you camera on their web page ? I'm blind and just see https://support.reolink.com/hc/en-us/sections/360002374874-Firmware 21 Jan. version :/ |
Guys, I hate to break it to you, but the AI on Reolink sucks. I've tested with a 510A fed into Frigate for comparison and the Reolink misses tons of events. It's concerning the amount of tunable parameters in Frigate vs Reolink non existent AI settings. The sensitivity is up high too. |
@inzynierwatroba oeps! i was wrong! i ment JANUARY release. (early january <> 21 january) |
The latest firmware is here and it's March. For some reason they have a blog with articles which is top on google search and adds to confusion as they have a download area with more up to date and easier to find firmwares.
I had Frigate running on a dedicated RPi4 with 6 cameras, using a Google Coral and it hovered around 80% CPU. Trick is to use the low res streams for detection, which means smaller objects aren't picked up but it works for cars and persons. I guess vs standard motion detection it works better yes, but then that was just so bad it was unusable for me. At least on outdoor cameras. |
that page shows "15/3/2021", but if you download the file itself, it is the 21/01 release... (3.0.0.177) |
@Morphy99 what board did you use? USB Accelerator? |
I used the USB Google Coral accelerator. I now have a m.2 key version inside a celeron intel nuc type box as I couldn't get the pi to work without an external powered hub and M.2 SSD + Coral. It looked a mess and didn't end up costing much less than an intel version in the end. The downside is the nuc box is now out of stock everywhere, I think end of life and next one up is quite a bit more. But that's another story! Have a look here for more info on Frigate. Frigate is awesome. It's so accurate and picks up everything when tuned up correctly. It's still beta and needs some refinement but the future looks bright with a model learning GUI being worked on. |
Still trying to get this working. Can see the new attributes in the developer console but can't get an event to trigger. Either the script is wrong - very possible! or the attributes aren't getting updated. I also see there is an ongoing issue in HA between true/false and on/off and those in quotes that might not be helping. The main motion event is being triggered by the camera but attributes aren't logged so have no idea if they are being updated. This is the script, just to update a date/time when a car is seen. Any pointers would be appreciated! `alias: Back gate car
|
@wimpie007 please try to reinstall from HACS, next reboot HA. At least the attributes should be visible! And is your camera firmware up to date? Pls check manually at the Reolink site! My camera wasn't and also didn't show any update. But after manual update, AI worked! |
@fwestenberg i'm on the latest firmware, and - as i mentioned earlier - the api for motion detection 'category' works: Reinstalled en rebooted, but no change... RLC-810A... |
@wimpie007 the same as you :( |
There are two files to check, at your config/custom_components/reolink_dev location. First the base.py file should contain this line:
Second the binary_sensor.py should contain this part: reolink_dev/custom_components/reolink_dev/binary_sensor.py Lines 120 to 129 in 6c8f3df
|
@fwestenberg |
Update: The good news: reolink3_voordeur_motion_2 has the new attributes! |
It sounds like you were still running some older version of the Reolink integration also. Just remove the cam, so all entities are gone. Next add it again and it should be fixed. |
i definately had the latest reolink integration files in place. Checked the code. |
I'm having trouble getting the Person Detection entity within HA. I have attempted the following:
With versions:
Confirmation of person detection support via http://camera-01.lan/api.cgi?cmd=GetAiState&user=admin&password=reolink [ { "cmd" : "GetAiState", "code" : 0, "value" : { "channel" : 0, "face" : { "alarm_state" : 0, "support" : 0 }, "people" : { "alarm_state" : 0, "support" : 1 }, "vehicle" : { "alarm_state" : 0, "support" : 1 } } } ] When I'm in the camera feed: [ { "cmd" : "GetAiState", "code" : 0, "value" : { "channel" : 0, "face" : { "alarm_state" : 0, "support" : 0 }, "people" : { "alarm_state" : 1, "support" : 1 }, "vehicle" : { "alarm_state" : 0, "support" : 1 } } } ] Confirmation of latest release with latest commit: reolink_dev $ cat base.py | grep get_ai_state
await self._api.get_ai_state() I am a bit at a loss of what to try next. |
As a further test I have just deployed a brand new HomeAssistant using the container on a different VM (my main HA is the VM OS), manually added reolink_dev (not HACS), and added the camera. I get the same result, only 7 entities, no Person Detection. I feel like I'm missing something very simple as others above seem to have it working without much effort. I just don't know what that is, or have any error to look into, etc. |
Hey @wimpie007 thank you for that. Perhaps I don't fully understand, I do have what you show, but the "People state" is always When looking at /developer-tools/state I see the state change from |
Hi @PhilipWhiteside , |
Hey @jrtraynor the only logs I've seen are the HA ones (Supervisor > System > Logs), or when running the container ( Further up in this issue is discussions of NVR checking each cam for which one detected motion etc. I don't fully get it as I don't have an NVR unless it's referring to this project itself, so I could be wrong here, but it seems like a motion event is detected by the binary_sensor, then this integration goes out and queries the camera for more information, updating the attributes. It is not a push from the camera to HA in a single event. Also, as a binary sensor, it can't have more than 1 state, so it triggers true or false, the attributes are not the sensor itself? If this is the case, then I may be leaning more towards the suggestion above of Frigate with a coral (just bought the PCIe one to try), and returning the Reolink camera. |
Hi, first of all thanks for this great integration! |
Did you ever figure this out? I have the same problem with RLC-822A firmware version V3.0.0.250. |
export key= |
I just updated the firmware on my NVR and cameras and now the api seems to have disappeared ... I now get redirected to a web ui where I can log in and view the nvr/camera... anyone know if they fully removed the API or if it just needs to be accessed differently now? |
ah... seems like the new firmware requires |
Hi.
Thanks for this great component.
I would recommend to add some comment to the unsupported cameras section in the Readme.md explaining why they are unsupported. Basically because the only work with Reolink NVRs and don't have ONVIF. Not giving an explanation is quite confusing for owners of those cameras.
Also I'd like to ask if this component supports the latest Reolink smart cameras that can detect persons and cars. Being able to create sensor for this type of events in Home Assistant would be amazing.
Finally, what is the difference between reolink and reolink_dev?
(BTW, a discord channel would be nice)
The text was updated successfully, but these errors were encountered: