starkillerOG / reolink_aio

Reolink NVR/camera API PyPI package
MIT License
65 stars 13 forks source link

Issue creating snapshots using Node Red and Reolink. #44

Closed OwnsJo closed 1 year ago

OwnsJo commented 1 year ago

Describe the bug Using 'call service' node in Node Red to create snapshot of reolink Sub stream. It has worked for months, but stopped working recently. Errors out with API Error

To Reproduce Steps to reproduce the behavior. Pleaee provide the error from the log if possible.

Node Red 'Call service' to Create snapshot of stream. Below is the node that is erroring out.

[{"id":"e8e321fa8ad503b2","type":"api-call-service","z":"5b513711761cb954","name":"","server":"3ea4483b.979598","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.frontyard_camera_sub"],"data":"{\"filename\":\"/config/www/snapshot.jpg\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":760,"wires":[["47fda51f7c60f09b"]]},{"id":"3ea4483b.979598","type":"server","name":"Home Assistant","addon":true}]

Expected behavior Person triggers 'person detected' sensor, it then triggers 'call service' for snapshot, saves the file to "/config/www/snapshot.jpg" and then posts it into slack. Everything else is working fine but the creating snapshot part.

Screenshots If applicable, add screenshots to help explain your problem.

Environment: Please provide useful information about your environment, like:

starkillerOG commented 1 year ago

@ownsjo this seems to me like an issue with NodeRed and not the Reolink integration. What happens if you use the devolopers tools in HomeAssistant and issue the snapshot service directly from HomeAssistant instead of Node Red, does it work then?

OwnsJo commented 1 year ago

@starkillerOG I tried it with dev tools > services. Still fails.

I tried it with my Ring doorbell camera, and it works fine with both Dev tools/Node red.

Reolink fails for both.

I appreciate your assistance.

starkillerOG commented 1 year ago

What error/warning did it give in HomeAssistant when trying it through the dev tools? On what version of HomeAssistant are you? Version 2023.7 has a bug which in some situations could explain your problem, this is fixed in HA 2023.8

OwnsJo commented 1 year ago

@starkillerOG

dev tools gives no error. Turns green like it executed but the file doesn’t update with a new snapshot. I can try sorting through logs.

Home Assistant 2023.8.2 Supervisor 2023.08.1 Operating System 10.4 Frontend 20230802.0 - latest

starkillerOG commented 1 year ago

@ownsjo did you try a different filename? Maybe the permission to overwrite the file is wrong or something.

OwnsJo commented 1 year ago

@starkillerOG but that file name/path works fine for my ring door bell.

OwnsJo commented 1 year ago

@starkillerOG I tried new filename - still doesn't work but does work w/ ring w/ new file name..

starkillerOG commented 1 year ago

Are you able to view the stream of the reolink camera on the entity you are trying to make a snapshot off?

OwnsJo commented 1 year ago

@starkillerOG Error on my part, I just noticed Reolink was 'unavailable' so my above tests weren't right.

I rebooted everything, and tried the above tests.

Dev tools: Call service does nothing, doesn't turn green or anything. I hit the button and no error, nothing.

Node Red: Stays in 'Sending" for a while before it has an API Error.

In Logs for Core, I found Reolink

Logger: homeassistant.components.reolink
Source: helpers/update_coordinator.py:229
Integration: Reolink IP NVR/camera (documentation, issues)
First occurred: 11:55:26 AM (1 occurrences)
Last logged: 11:55:26 AM

Timeout fetching reolink.Getchell-NVR data

I tried switching to port 80 instead of port 443 - same issues. It goes unavailable.


UPDATE As typing this, I kept trying other settings. I made a new admin account on the reolink NVR it self, and now it all works.

Definitely not an Reolink Interpretation issue. Thanks for your time

starkillerOG commented 1 year ago

No problem, If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library or purchase Reolink products through this affiliate link.

OwnsJo commented 1 year ago

Sent a sponsor! Thanks for your help!

starkillerOG commented 1 year ago

Much appreciated!