Closed rodakswe closed 3 years ago
Same issue here with rcl-510a and firmware 3.0.0.291
Same issue with RLC511WA and Firmware v3.0.0.250 and v3.0.0.494. Worked with the stock firmware, but after doing an update now its broken.
So Reolink Support just said that "People" alarm will be True only for 5 seconds (even if someone keeps moving on screen) so this HA integration needs to poll at least every 4 seconds to catch or it will just miss it.
"When an AI event is detected, if there is an active person in the screen (a person who is still or less active will not trigger the AI event), the mobile app will prompt someone, but the command used in the browser is his function It is designed to: only when an active person is detected, he will start the alarm, and only alarm for 5 seconds, after 5 seconds, even if there are still active people in the screen, it will not alarm again, when the active person disappears in the screen, the alarm The state will be reset and wait for the next AI event to be triggered. "
An initial trigger will be enough for me to start record and do a screenshot. But in my case the whole person/vehicle detection does not work. As i said, with the stock firmware it worked but since attribute change it stopped.
I fear this is because they also changed the behavior : the 5 seconds reset was not present earlier and I am not sure if this integration polls often enough. This integration will just pass the output of the variables, even if they were renamed, the new ones should still show accurately provided that the API call is done within said 5 seconds delay.
Personally, to make the AI detection work, I created 2 binary sensors which interrogate the GetAiState API to know the type of detection.
#binary_sensor.yaml
#Car detection
- platform: rest
resource: !secret reolink_api_call
name: is_car
device_class: motion
value_template: '{{ value_json[0].value.vehicle.alarm_state }}'
scan_interval: 5
#People detection
- platform: rest
resource: !secret reolink_api_call
name: is_people
device_class: motion
value_template: '{{ value_json[0].value.people.alarm_state }}'
scan_interval: 5
#secret.yaml
reolink_api_call: http://192.168.XX.XX/api.cgi?cmd=GetAiState&user=USER&password=PASSWORD
And in notification/automation I use these sensors
should be fixed in PR https://github.com/fwestenberg/reolink_dev/pull/274 . Waiting for author to issue a release.
@yagrasdemonde fantastic tip, thank you !
it seems this did not make it into the v0.20 release :(
For me it's working now on RLC511WA v3.0.0.494 and v0.20
Because of the lame implementation in Reolink API,you need to decrease 'scan_interval' to 4 seconds or less
On Tue, Sep 21, 2021, 20:54 CryPt00n @.***> wrote:
For me it's working now on RLC511WA v3.0.0.494 and v0.20
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fwestenberg/reolink_dev/issues/245#issuecomment-924289269, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTC5PTLHSJDAV3P5HSQHX3UDDIFHANCNFSM5CIFDOHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
FYI a beta firmware just went up, which features a configurable time for detecting people and cars (and pets!) Not sure if that will impact this "edge like" triggering, however. Can't they just give us a nice PUSH service, were we give them a webhook to call on detection?
@reedstrm where did you find the new firmware? google or the reolink forums did not give me any results
Reolink's reddit
On Sat, Sep 25, 2021, 00:11 molnarti @.***> wrote:
@reedstrm https://github.com/reedstrm where did you find the new firmware? google or the reolink forums did not give me any results
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fwestenberg/reolink_dev/issues/245#issuecomment-926945706, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTC5PUQZDQDNZBG7RUMTVTUDTZQJANCNFSM5CIFDOHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Personally, to make the AI detection work, I created 2 binary sensors which interrogate the GetAiState API to know the type of detection.
#binary_sensor.yaml #Car detection - platform: rest resource: !secret reolink_api_call name: is_car device_class: motion value_template: '{{ value_json[0].value.vehicle.alarm_state }}' scan_interval: 5 #People detection - platform: rest resource: !secret reolink_api_call name: is_people device_class: motion value_template: '{{ value_json[0].value.people.alarm_state }}' scan_interval: 5
#secret.yaml reolink_api_call: http://192.168.XX.XX/api.cgi?cmd=GetAiState&user=USER&password=PASSWORD
And in notification/automation I use these sensors
Just wanted to hop in and say thanks for this @yagrasdemonde. Spent hours trying to get the reolink intergration motion detection to work until I stumbled on this.
5 min and I got the RLC811a, 820a and E1 Zoom working (just changed to MD state for E1 and changed the value template a little).
Thank you so much!
@quadrupole1988 Now, with latest @fwestenberg release (with @cpainchaud great contribution) we can get attributes people and vehicle directly from camera binary sensor.
Examples :
#binary_sensor.yaml
- platform: template
sensors:
###################### Vehicle from Reolink binary_sensor ######################
is_vehicle:
friendly_name: 'Is Vehicle'
value_template: >-
{{ state_attr('binary_sensor.cam_reolink_motion', 'vehicle') }}
icon_template: 'mdi:car'
unique_id: 'is_vehicle_id'
###################### People from Reolink binary_sensor ######################
is_people:
friendly_name: 'Is People'
value_template: >-
{{ state_attr('binary_sensor.cam_portail_motion', 'people') }}
icon_template: 'mdi:account'
unique_id: 'is_people_id'
@yagrasdemonde and don't forget to use "scan_interval: 3" in reolink_dev plugin paramaters to ensure you are not missing any of these
@fwestenberg you may want to close this issue
sorry, but is this issue resolved? creating manual binary sensors on configuration.yaml and quering the reolink API is not something i consider a solution. motion detection should be handled in the plugin directly, but in v0.20 the face/person/vehicle attributes never change from false
@fwestenberg @cpainchaud
@molnarti , they do change from FALSE to TRUE, as a matter of fact I use them in my own automation and they work like a charm. Please remember Reolink's limitation so you have to change scan_interval to less than 5 seconds ("scan_interval: 3" ) in reolink_dev plugin settings
@molnarti also please make sure you are running reolink firmware version v3.0.0.494
where do i set the scan_interval? in the plugin settings i don't see such an option and i cannot change anything there, as i get the message malformed error
it's a system setting, configured in configuration.yaml for example:
reolink_dev:
scan_interval: 3
Hi
Personally, to make the AI detection work, I created 2 binary sensors which interrogate the GetAiState API to know the type of detection.
#binary_sensor.yaml #Car detection - platform: rest resource: !secret reolink_api_call name: is_car device_class: motion value_template: '{{ value_json[0].value.vehicle.alarm_state }}' scan_interval: 5 #People detection - platform: rest resource: !secret reolink_api_call name: is_people device_class: motion value_template: '{{ value_json[0].value.people.alarm_state }}' scan_interval: 5
#secret.yaml reolink_api_call: http://192.168.XX.XX/api.cgi?cmd=GetAiState&user=USER&password=PASSWORD
And in notification/automation I use these sensors
Just wanted to hop in and say thanks for this @yagrasdemonde. Spent hours trying to get the reolink intergration motion detection to work until I stumbled on this.
5 min and I got the RLC811a, 820a and E1 Zoom working (just changed to MD state for E1 and changed the value template a little).
Thank you so much!
Hi everyone!
So firstly I add the code in binary_sensor.yaml and the code for user and password in secrets.yaml? Then I add that line "_reolink_dev: scaninterval: 3" in configuration.yaml?
If i have more than one camera I just duplicate the code in secrets?
Im sorry but if its stupids questons but Imm new to this. :)
I can add that Im running that firmware that was suggested and installed the updated integration. Put in the code in the files but the state false doesnt change.
it's a system setting, configured in configuration.yaml for example:
reolink_dev: scan_interval: 3
what about adding this option to the integration config? does it have some technical limitations why it has to be configured over the configuration.yaml file?
Hi
Personally, to make the AI detection work, I created 2 binary sensors which interrogate the GetAiState API to know the type of detection.
#binary_sensor.yaml #Car detection - platform: rest resource: !secret reolink_api_call name: is_car device_class: motion value_template: '{{ value_json[0].value.vehicle.alarm_state }}' scan_interval: 5 #People detection - platform: rest resource: !secret reolink_api_call name: is_people device_class: motion value_template: '{{ value_json[0].value.people.alarm_state }}' scan_interval: 5
#secret.yaml reolink_api_call: http://192.168.XX.XX/api.cgi?cmd=GetAiState&user=USER&password=PASSWORD
And in notification/automation I use these sensors
Just wanted to hop in and say thanks for this @yagrasdemonde. Spent hours trying to get the reolink intergration motion detection to work until I stumbled on this. 5 min and I got the RLC811a, 820a and E1 Zoom working (just changed to MD state for E1 and changed the value template a little). Thank you so much!
Hi everyone!
So firstly I add the code in binary_sensor.yaml and the code for user and password in secrets.yaml? Then I add that line "_reolink_dev: scaninterval: 3" in configuration.yaml?
If i have more than one camera I just duplicate the code in secrets?
Im sorry but if its stupids questons but Imm new to this. :)
I can add that Im running that firmware that was suggested and installed the updated integration. Put in the code in the files but the state false doesnt change.
You forgot pets! ( I think that's supported now) I'm still using Zoneminder with Shell scripts/YOLO/Darknet... should I switch to these "AI" camreas??
from latest https://github.com/fwestenberg/reolink_dev/blob/master/TSHOOT.md You can now customize option "Motion states update fallback delay (seconds)" directly from the UI
So I have a problem with the latest firmware and decided to downgrade to see if it really was the firmware. After downgrading the AI Detection works again. My setup: reolink_dev release: v0.19 (https://github.com/fwestenberg/reolink_dev/releases/tag/v0.19) Home Assistant 2021.8.3 Camera: RLC-822A Working firmware: V300177 https://reolink.com/download-center/ Non working firmware: V3.0.0.250 https://reolink.com/download-center/
With working firmware V300177 I get the following result:
[ { "cmd" : "GetAiState", "code" : 0, "value" : { "channel" : 0, "people_state" : 0, "vehicle_state" : 0 } } ]
The "Person state" gets true once a person gets in front of the camera.With the latest firmware V3.0.0.250 I get the following result:
[ { "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 } } } ]
The "Person state" has now been renamed to "Person" and also "Face" has been added as attribute. None of the attributes ever gets "True". Can it be that the integration has to consider the new formatting from the API? The firmware includes new attributes but also it specifies "alarm_state" and "support" for each attribute, this was not the case with previous versions. I've seen multiple reports of people not having the "People" attribute ever change to "True" and all of the repports seems to have the same formatting.