Closed andornaut closed 3 years ago
amcrest documentation amcrest source (message by IssueLinks)
Hey there @flacjacket, mind taking a look at this issue as it has been labeled with an integration (amcrest
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I'm guessing you've tried restarting? The only change here that I could see making any difference is that the camera entity now has a unique id. I'm not sure how that plays a role through an upgrade to go to no unique id to having a unique id. This does seem very similar to the issue you linked, and it looks like that was taken care of with a restart (in addition to rolling the version back and forth, but I'm not sure if that helped in clearing the issue).
Hey @flacjacket , thanks for your response!
I'm guessing you've tried restarting?
Yep.
I also removed the :latest
Docker container and started a new one based on homeassistant/home-assistant:2021.17
. When I did so, some new camera entities were created with a similar entity name but with "_2" appended. Once I configured the Lovelace interface to reference the "..._2" entities, all cameras resumed working as before.
I've since removed that container and started a new one based on homeassistant/home-assistant:latest
and the "..._2" entities no longer exist, and the previous ones continue to not work.
Happy to help debug this if there's anything I can add.
Note also that I have a Foscam camera integration, which had continued to work through the upgrade->downgrade->upgrade.
I also tried removing the Docker container and its volumes including the .config/.storage
directory. When starting a new container and accessing the web interface, it brought up the Home Assistant initial setup wizard and auto-configured the Lovelace interface with the Amcrest cameras as described in the configuration.yml. The cameras still do not work, though.
Do you have a more complete log? That might help us to understand what is going wrong with the integration.
Do you have a more complete log? That might help us to understand what is going wrong with the integration.
I've attached the complete Docker logs output. I configured the logger log level to INFO.
I think I know how to re-create this error. I've proved it by doing it. Login to the Amcrest camera setup web page for the camera that is NOT working, Under the setup, camera, video setting make sure the Sub Stream is ENABLED. Save this setting. Restart home assistant. Check your camera should be working.
To prove this, on mine anyways, I DISABLED the sub stream saved restarted home assistant and got "camera off" message, Re ENABLED the substream, saved, restarted Home assistant and the camera was working again.
Interesting! Looking at your debug log in the other ticket, I see the rtsp url has channel=1&subtype=0
which should be the correct rtsp url for the main stream, and even the event that the amcrest
package is getting back from the camera is noting "StreamType" : "Main"
. When you try to load the rtsp stream with VLC, what is the address that you use?
Also what would be interesting to see, if you roll back to <2021.9
, what is the rtsp url that is printed out in the debug log?
"rtsp://admin:xxxx@192.168.x.x/cam/realmonitor?channel=1&subtype=00&authbasic=xxxxxxxxxxxxxx"
This is what I used for the camera in question (this is the one I used in VLC and it worked).
@ijustlikeit Thanks for looking into it! I was able to work around this issue by enabling substream.
I wonder if we can avoid requiring this workaround, though?
I'm also having the same issue with all of my Amcrest cameras since upgrading to 2021.9.4 this morning. The only difference is that I use the snapshot
stream source mode for my cameras instead of the rtsp
.
I can confirm @andornaut 's temporary workaround solution worked for me too. Enabling the substream does fix the problem.
For now, though, I have downgraded back to 2021.8 until this is fixed.
Thank you all to reporting on this problem, and extra thanks to @ijustlikeit for figuring out a reproducible way to trigger this problem. I found a fix for this upstream (linked in the ticket above if anyone else is able to patch that into their running instance and confirm that it works), and can work on getting that into a new release, and bumping the version in home assistant.
anyone else is able to patch that into their running instance and confirm that it works)
I tested the fix. Works! Thanks @flacjacket
This fix should be available in 2021.9.6!
The problem
After upgrading to 2021.9.1 all my Amcrest cameras no longer stream in Lovelace, and produce this log message: "Error requesting stream: Camera is off"
Cameras continue to work directly or through eg. ZoneMinder or VLC.
The same cameras worked in a recent previous version, which I believe was 2021.7.
This may be related to #55550
What is version of Home Assistant Core has the issue?
core-2021.9.1
What was the last working version of Home Assistant Core?
core-2021.7
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Amcrest
Link to integration documentation on our website
https://www.home-assistant.io/integrations/amcrest/
Example YAML snippet
Anything in the logs that might be useful for us?