Rasp Cam no longer working

What is the problem?

After a few months it appears my raspi camera shuts off after the octoprint service spins up. (Indicated by the light on the camera)

What did you already try to solve it?

I've tried reseating the connection, rebooting, updating software, disabling plugins.

Complete Logs

******************************************************************************
2020-07-25 13:06:11,504 - octoprint.startup - INFO - Starting OctoPrint 1.4.0
2020-07-25 13:06:11,504 - octoprint.startup - INFO - ******************************************************************************
2020-07-25 13:06:12,103 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2020-07-25 13:06:12,585 - octoprint.startup - INFO - Blacklist processing done, adding 1 blacklisted plugin versions: roomtemp (any)
2020-07-25 13:06:12,633 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-07-25 13:06:13,850 - octoprint.plugin.core - ERROR - Could not locate plugin homeassistant
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 927, in _import_plugin_from_module
    location, spec = _find_module(module_name)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 64, in _find_module
    spec = imp.find_module(name)
ImportError: No module named octoprint_homeassistant
2020-07-25 13:06:13,892 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 29 hook handlers
2020-07-25 13:06:14,113 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2020-07-25 13:06:14,137 - octoprint.server - INFO - Intermediary server started
2020-07-25 13:06:14,143 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2020-07-25 13:06:14,278 - octoprint.plugin.core - ERROR - Could not locate plugin homeassistant
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 927, in _import_plugin_from_module
    location, spec = _find_module(module_name)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 64, in _find_module
    spec = imp.find_module(name)
ImportError: No module named octoprint_homeassistant
2020-07-25 13:06:14,292 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 29 hook handlers
2020-07-25 13:06:14,327 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2020-07-25 13:06:14,923 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2020-07-25 13:06:14,928 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: u"Need(method='role', value=u'plugin_action_command_prompt_interact')")
2020-07-25 13:06:14,929 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: u"Need(method='role', value=u'plugin_announcements_read')")
2020-07-25 13:06:14,931 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: u"Need(method='role', value=u'plugin_announcements_manage'), Need(method='role', value=u'plugin_announcements_read')")
2020-07-25 13:06:14,932 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: u"Need(method='role', value=u'plugin_appkeys_admin')")
2020-07-25 13:06:14,933 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: u"Need(method='role', value=u'plugin_backup_access')")
2020-07-25 13:06:14,935 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: u"Need(method='role', value=u'plugin_logging_manage')")
2020-07-25 13:06:14,937 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: u"Need(method='role', value=u'plugin_pi_support_check')")
2020-07-25 13:06:14,939 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: u"Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-07-25 13:06:14,940 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: u"Need(method='role', value=u'plugin_pluginmanager_install'), Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-07-25 13:06:14,941 - octoprint.server - INFO - Added new permission from plugin printer_safety_check: PLUGIN_PRINTER_SAFETY_CHECK_DISPLAY (needs: u"Need(method='role', value=u'plugin_printer_safety_check_display')")
2020-07-25 13:06:14,942 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: u"Need(method='role', value=u'plugin_softwareupdate_check')")
2020-07-25 13:06:14,944 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: u"Need(method='role', value=u'plugin_softwareupdate_update')")
2020-07-25 13:06:15,087 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-07-25 13:06:16,032 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-07-25 13:06:16,971 - octoprint.util.pip - INFO - Version of pip is 20.1.1
2020-07-25 13:06:16,973 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-07-25 13:06:16,974 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-07-25 13:06:16,979 - octoprint.plugin.core - INFO - Initialized 16 plugin implementation(s)
2020-07-25 13:06:16,991 - octoprint.plugin.core - INFO - 16 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
|  Creality Temperature (1.2.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_CrealityTemperature
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Error Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
|  Login UI (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/loginui
|  Pi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
|  Printer Safety Check (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check
|  Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2020-07-25 13:06:17,008 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|      cores: 4
|      freq: 1200.0
|      ram: 917016576
|  os:
|      id: linux
|      platform: linux2
|  plugins:
|      pi_support:
|          model: Raspberry Pi 3 Model B Rev 1.2
|          octopi_version: 0.17.0
|  python:
|      pip: 20.1.1
|      version: 2.7.16
|      virtualenv: /home/pi/oprint
2020-07-25 13:06:17,020 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-07-25 13:06:17,046 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2020-07-25 13:06:17,943 - octoprint.server - INFO - Shutting down intermediary server...
2020-07-25 13:06:18,274 - octoprint.server - INFO - Intermediary server shut down
2020-07-25 13:06:18,285 - octoprint.events - INFO - Processing startup event, this is our first event
2020-07-25 13:06:18,287 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2020-07-25 13:06:18,294 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2020-07-25 13:06:18,294 - octoprint.server - INFO - Autoconnect on startup is configured, trying to connect to the printer...
2020-07-25 13:06:18,406 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-07-25 13:06:18,648 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2020-07-25 13:06:21,913 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-07-25 13:06:21,942 - octoprint.server - INFO - Trying to connect to configured serial port None
2020-07-25 13:06:21,993 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial port"
2020-07-25 13:06:22,002 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-07-25 13:06:22,006 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-07-25 13:06:22,029 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial port" to "Opening serial port"
2020-07-25 13:06:22,033 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Connecting"
2020-07-25 13:06:22,035 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi-dearmeat' for _http._tcp
2020-07-25 13:06:22,048 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-07-25 13:06:22,055 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi-dearmeat' for _octoprint._tcp
2020-07-25 13:06:22,070 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi-dearmeat for SSDP
2020-07-25 13:06:22,089 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-07-25 13:06:22,091 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Operational"
2020-07-25 13:06:22,093 - octoprint.plugins.pi_support - WARNING - This Raspberry Pi is reporting problems that might lead to bad performance or errors caused by overheating or insufficient power.
!!! UNDERVOLTAGE REPORTED !!! Make sure that the power supply and power cable are capable of supplying enough voltage and current to your Pi.
2020-07-25 13:06:22,107 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-07-25 13:06:22,111 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2020-07-25 13:06:22,155 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin bugfix-2.0.x (GitHub)"
2020-07-25 13:06:22,250 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2020-07-25 13:06:22,451 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-07-25 13:06:23,009 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.50.107
2020-07-25 13:06:23,506 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-07-25 13:06:23,527 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2020-07-25 13:06:23,537 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-07-25 13:06:24,791 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-07-25 13:06:24,801 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.50.48/'}
2020-07-25 13:06:25,286 - octoprint.server.util.flask - INFO - Passively logging in user _api from ::ffff:192.168.50.107

Additional information about your setup

Octoprint Ver. 1.4.0
Octopi Ver. 0.17.0

Similar problem here, the video stream of my Logitech C270 suddenly dropped down to less than 1 frame per second today. Seems like there's a faulty rpi-firmware distributed, missing the proper video framework. I could recover with

sudo rpi-update e1050e94821a70b2e4c72b318d6c6c968552e9a2
sudo reboot

which reverts to the last stable 4.x firmware (including kernel and video framework), and my framerate instantly and fully recovered. Perhaps that might also help in your case?

2 Likes

Thanks !
Great advice

I gave that a go and was very hopeful for this as this seems like the most logical reason for my issue... unfortunately, it didn't correct my issue and the camera still shuts it's light off once the OP service starts up.

Here is some more of my troubleshooting and it's output:

pi@octopi-dearmeat:~/mjpg-streamer $ ./start.sh
MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
libv4l2: error setting pixformat: Device or resource busy
Unable to set format: 1196444237 res: 640x480
Init v4L2 failed !! exit fatal
i: init_VideoIn failed