Closed bedson87 closed 4 months ago
Does the snapshot work inside the web gui?
Yes, both highres and lowres are displayed without any problems.
HA shows a timeout problem. Weird behavior... Network problems?
Nothing has changed with the network and there were no problems before. Camera close to unifi ap. Very good signal 🫢 After restarting the camera, the snapshot works but after some time it stops. Could it be related to something else? SD card? Web ui takes a long time to load snapshot.
Probably the problem is the cam.
Could you check the processes when the cam stops working properly?
Login to the cam with ssh and run top
command.
And try to disable "Snapshot for recorded video".
Thx for your help! I turned off the recording function and still snapshots from ha don't work. This is what "top" looks like.
top is ok.
Now, try to run the snapshot manually:
imggrabber -m y211ga -r high -w
umm
It should be ok.
Try to redirect the command to a file and check if it's a jpeg image:
imggrabber -m y211ga -r high -w > /tmp/sd/test.jpg
Thanks, it works. Strange thing - with HA once it works and 10 times it fails. I'll try to re-integrate or something.
Check how long it takes. Maybe I could increase the timeout.
EDIT
Another problem. The cam is not able to capture 2 or more snapshot at the same time. If a snapshot is running, the 2nd exits with error.
I tried calling single snapshot from dev tools with HA and crash. Is there any good way to measure the time it takes to take a snapshot? Or is it possible to edit the config file for the test somewhere and change the integration timeout?
HTTP_TIMEOUT is a const defined in const.py Now it's set to 10 seconds.
Try to change it and restart ha to reload the integration.
Now everything works. I didn't change the timeout. I'm following and thanks for your help and tips!
I've been having trouble with integration for some time (new home assistant version?). Lots of errors as below when trying to take a snapshot. Sometimes it works but usually writes an empty file. Everything else seems to work normally - recording to sd, preview, mqtt.
Model Suffix y211ga Firmware Version 0.2.6 Yihack integr 0.4.5 Hass 2023.5.4