Why publish camera configuration?
Closed this issue · 3 comments
I saw that this plugin publishes a configuration for a camera entity:
OctoPrint-HomeAssistant/octoprint_homeassistant/__init__.py
Lines 922 to 930 in 1cd06aa
But the camera image itself isn't published any reason why this configuration is published?
I thought this sensor generated a URL for the video stream... but it doesn't look like that's the case. I'll have to revisit the docs to make sure we are using this correctly. The image though isn't a video stream, rather just a single image (which I guess could be updated periodically perhaps) or driven by capture events in OctoPrint to update.
Octoprint has a stream URL and a snapshot URL that you can configure in the core app.. I DO have a manual platform: mjpeg camera that I already use in HomeAssistant for the stream. Not sure if the MQTT plugin publishes those.
Seem like you should be able to grab those values and publish them, they seem to accept relative (default for the stream) and full URLs in octo print so you may have to figure out if you want to figure out the host name or if you want to just have the user enter the "public" full URL for those items.
The MQTT camera platform is not for configuring cameras it seems. The documentation says that it will only support still images sent as a payload of the MQTT channel which isn't really what I think people have in mind when associating a camera with their setup. Unfortunately, it does not appear there is a way for me to expose the camera automatically through MQTT discovery and it will still need to be manually configured by the user as is shown in the README.md.
I'm removing the sensor since it has no purpose in the mean time.