After setting up Octoprint as a device in Home Assistant, all entities are reported and working, except the camera. HA reports the camera as idle (see attached) even though the stream is fully functional.
What did you already try to solve it?
Have confirmed stream works in Octoprint
Have used the same streaming path in a generic camera (works)
Have rebooted both HA and OctoPrint
Have tried to remove and reinstall the OctoPrint device in HA several times
Have manually edited HA files to purge old instances of Octoprint before reinstalling.
This worked fine with same HA installation and a previous install of OctoPi. However, due to trying to sort out issues with the official RPI HQ Camera for days, I created a new instance with a manual OctoPrint installation (Buster Lite). Camera functions perfectly.both in OS and OctoPrint Control window both with and without HA Proxy.
Needed to update to v1.8.7 to get the HA integration working due to API issues caused by recent babel updates.
I plan to. I thought it might have been an issue related to the v1.8.7 upgrade, but now I'm not so sure as really everything on the OctoPrint side seems to be working just fine.
Same here. Camera unavailable. But this is likely a HA topic since it worked with OP 1.8.6 before and after updating HA it went to unavailable state. Updating OP to 1.8.7 didn't change the behaviour within HA so I guess something happened over there. Let's check on the other side...
Interesting...I didn't update anything on the HA side myself.
As a test just now, I shutdown HA, plugged my 1.8.6 (OctoPi) instance back in and started HA back up. HA prompted me to reconfigure, where I supplied the user ID for OP and accepted the request on the OP side. Guess what...it works!
So I'm really inclined to believe it's something on the OctoPrint side now. Just don't know if it's an issue with 1.8.7, babel or something went awry with the manual installation.
So I started to play around more to break it again. It would seem that if you change the webcam codec setting in OP from libx264 to mpeg2video, it causes HA to barf with the error I posted above. What's worse...setting back to libx264 doesn't restore the connection even after removing/re-adding the device and reboots.
The only solution I've been able to find in that situation was to create a new OctoPi image and set up the HA device accordingly.
That's... Quite strange. This codec selection is only used to render the timelapses (in OctoPrint), it hasn't got anything to do with the actual streaming of the webcam. I wonder what HA might do with it causing this.
Strange, just checked mine and it is also Idle and its frozen, but it must have worked at somepoint since th build plate is down since I am doing a print