question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: camera.snapshot not working after HA restart

See original GitHub issue

Describe the bug I have a TP-Link Tapo C110 in use. Every time I restart Home Assistant (manually or due to initiating core updates) the camera seems to lose its ability to make snapshots. A resulting JPG image produced by camera.snapshot (manual + automatic) always has a size of 0 (zero) bytes.

A reboot of the camera (either via Tapo app or via tapo_control.reboot) does not resolve the issue. The only “solution” is to power off and power on the camera again. As a known issue, the camera temporarily loses its motion sensor but it gets it back once it detects a motion. After that, camera.snapshot produces a valid image file again.

To Reproduce Steps to reproduce the behavior:

  1. Make sure camera.snapshot does produce a valid image file.
  2. Restart HA.
  3. Trigger camera.snapshot (manually or via automation)
  4. Check resulting image file.

Expected behavior camera.snapshot produces a valid image file once a working stream is available from the camera. It makes no difference whether

  • HA has been restarted or
  • the camera has been rebooted (e.g. via tapo_control.reboot) or
  • the camera has been powered off and on again.

Log n/a

Camera (please complete the following information):

  • Device Model: C110
  • FW: 1.1.12 Build 211028 Rel.22161n(4555)

Using stream component no (Tapo-Control only)

Camera works through onvif component OR different cameras work in general yes

Camera has all attributes filled out properly in developer tools yes

HASS Environment

  • Home Assistant 2022.2.5
  • Raspberry Pi 4 (4 GB) directly connected to router
  • Sandisk microSDHC UHS-I 64GB Class10
  • Pi-Hole, blocking 2 TP-Link URLs

Additional context n/a

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
macbihcommented, Feb 11, 2022

Try turning off stream (or turning it on if off) via settings and see if the issue persists.

It persists and gets even worse.

Also try updating camera firmware if you are not on the latest one.

Already done, In fact it was one of my first actions with the camera.

Also turn off any additional streams you might be running off the camera.

I have also thought of this. Before, I have played with MotionEye. I was able to see a stream with it. But I have completely removed the integration when I was unable to solve this issue. I also added and later removed manual camera definitions via YAML. Unfortunately, this did not help either.

I am afraid I have to live with it so far. At least, I know how to deal with it.

Thank you very much for your support, Juraj! That was very nice of you.

0reactions
JurajNyiricommented, Feb 10, 2022

In that case I think it might be a camera limitation. Try turning off stream (or turning it on if off) via settings and see if the issue persists. Also try updating camera firmware if you are not on the latest one. Also turn off any additional streams you might be running off the camera.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant save snapshot from camera - Home Assistant Community
using Dev Tools/Services tab, i have: service: camera.snapshot entity: ... in Putty, i use this command to restart HA as needed: sudo ...
Read more >
Camera only records once (and deprecated snapshot) #603
Using the service Camera : Take Snapshot, the image is never updated. ... Restarting HA after each detection is not an acceptable workaround...
Read more >
Fix Google Assistant screenshot settings - Android
If the Google Assistant won't take screenshots, try these steps to fix the issue: Step 1: Check your Android settings On your Android...
Read more >
What does Camera.Snapshot actually do? (Amcrest) - Reddit
A shame that Amcrest won't fix this. But isn't the Amcrest integration streaming 24/7 from doorbell to HA anyway (so through your router)?....
Read more >
Real Time Camera Viewing using RTSPtoWeb and ... - YouTube
Here is yet another and better option for live streaming cameras using the RTPStoWeb Add-on and the WebRTC integration. Not only that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found