core
core copied to clipboard
Error in logs about Octoprint camera setup
The problem
On Home Assistant startup I get an error in the logs about Octoprint not able to setup the camera (if I read that correctly) The integration seems to load fine otherwise.
Note that I do not have a camera installedin Octoprint.
Logger: homeassistant.components.camera
Source: components/octoprint/camera.py:55
Integration: Camera (documentation, issues)
First occurred: 14:41:31 (1 occurrences)
Last logged: 14:41:31
Error while setting up octoprint platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/octoprint/camera.py", line 37, in async_setup_entry
OctoprintCamera(
File "/usr/src/homeassistant/homeassistant/components/octoprint/camera.py", line 55, in __init__
mjpeg_url=camera_settings.stream_url,
File "/usr/local/lib/python3.10/site-packages/pyoctoprintapi/settings.py", line 86, in stream_url
if stream_url[:1] == "/" and self._base_url[-1:] == "/":
TypeError: 'NoneType' object is not subscriptable
What version of Home Assistant Core has the issue?
core-2022.11.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Octoprint
Link to integration documentation on our website
https://www.home-assistant.io/integrations/octoprint/
Diagnostics information
Integration does not support diagnostics
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Already posted in description
Additional information
No response
Hey there @rfleming71, mind taking a look at this issue as it has been labeled with an integration (octoprint) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of octoprint can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant reopenReopen the issue.@home-assistant unassign octoprintRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
octoprint documentation octoprint source (message by IssueLinks)
Could you login to your octoprint instance then navigate to <octoprint_url>/api/settings and paste either the webcam portion of it or the entire blob(This may be large depending on what you have enabled)?
"webcam": {
"bitrate": "10000k",
"cacheBuster": false,
"ffmpegCommandline": "{ffmpeg} -framerate {fps} -i \"{input}\" -vcodec {videocodec} -threads {threads} -b:v {bitrate} -f {containerformat} -y {filters} \"{output}\"",
"ffmpegPath": null,
"ffmpegThreads": 1,
"ffmpegVideoCodec": "libx264",
"flipH": false,
"flipV": false,
"rotate90": false,
"snapshotSslValidation": true,
"snapshotTimeout": 5,
"snapshotUrl": null,
"streamRatio": "16:9",
"streamTimeout": 5,
"streamUrl": null,
"streamWebrtcIceServers": [
"stun:stun.l.google.com:19302"
],
"timelapseEnabled": true,
"watermark": true,
"webcamEnabled": true
}
Weird, it has "webcamEnabled":true at the end. Pretty sure I never enabled the webcam.
I have disabled the camera option in Octoprint and now the error is gone (as expected I guess). Still no clue how it got enabled in the first case.