Enclosure plugin - temperature sensor problems

What is the problem?

I have two 18B20 temperature sensors, connected to the RPi running Octoprint, one for the printer enclosure, the other in the power supply enclosure. My intention is to use Temperature Alarms to switch on related fans at a temperature threshold.

Temperature readings are either absent or not updating in the plugin's displays,

Running Octoprint 1.4.2, Enclosure plugin 4.13.1, Python 2.7.16

What did you already try to solve it?

  1. Wrote a minimal shell script to read both sensors -
#!/bin/sh
echo Enclosure
cat /sys/bus/w1/devices/28-0119211e21f9/w1_slave
echo PSU
cat /sys/bus/w1/devices/28-0119211e6576/w1_slave

This gives the following output:

pi@octopi:~ $ ./rtemp
Enclosure
dd 01 4b 46 7f ff 0c 10 06 : crc=06 YES
dd 01 4b 46 7f ff 0c 10 06 t=29812
PSU
80 01 4b 46 7f ff 0c 10 67 : crc=67 YES
80 01 4b 46 7f ff 0c 10 67 t=24000

From which I infer the sensors are working and correctly connected.

I have uninstalled and reinstalled the Enclosure plugin, and carefully added the outputs and inputs.

Have you tried running in safe mode and if so did it solve the issue?

No - Octoprint functions correctly, except plugin problem.

Complete Logs

octoprint.log:

2020-11-10 12:50:34,002 - octoprint.startup - INFO - ******************************************************************************
2020-11-10 12:50:34,006 - octoprint.startup - INFO - Starting OctoPrint 1.4.2
2020-11-10 12:50:34,009 - octoprint.startup - INFO - ******************************************************************************
2020-11-10 12:50:35,094 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2020-11-10 12:50:35,140 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2020-11-10 12:50:35,142 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is working
2020-11-10 12:50:35,144 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2020-11-10 12:50:35,524 - octoprint.startup - INFO - Blacklist processing done, adding 10 blacklisted plugin versions: roomtemp (any), GcodeEditor (0.1.1), GcodeEditor (0.2.0), GcodeEditor (0.2.1), GcodeEditor (0.2.2), GcodeEditor (0.2.3), GcodeEditor (0.2.4), GcodeEditor (0.2.5), GcodeEditor (0.2.6), GcodeEditor (0.2.8)
2020-11-10 12:50:35,593 - 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-11-10 12:50:38,282 - octoprint.plugin.core - INFO - Found 22 plugin(s) providing 22 mixin implementations, 38 hook handlers
2020-11-10 12:50:39,530 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2020-11-10 12:50:39,581 - octoprint.server - INFO - Intermediary server started
2020-11-10 12:50:39,582 - 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-11-10 12:50:39,852 - octoprint.plugin.core - INFO - Found 22 plugin(s) providing 22 mixin implementations, 38 hook handlers
2020-11-10 12:50:39,919 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2020-11-10 12:50:40,749 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2020-11-10 12:50:40,757 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: u"Need(method='role', value=u'plugin_action_command_notification_show')")
2020-11-10 12:50:40,760 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: u"Need(method='role', value=u'plugin_action_command_notification_clear')")
2020-11-10 12:50:40,763 - 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-11-10 12:50:40,765 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: u"Need(method='role', value=u'plugin_announcements_read')")
2020-11-10 12:50:40,768 - 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-11-10 12:50:40,771 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: u"Need(method='role', value=u'plugin_appkeys_admin')")
2020-11-10 12:50:40,773 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: u"Need(method='role', value=u'plugin_backup_access')")
2020-11-10 12:50:40,776 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: u"Need(method='role', value=u'plugin_firmware_check_display')")
2020-11-10 12:50:40,778 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: u"Need(method='role', value=u'plugin_logging_manage')")
2020-11-10 12:50:40,781 - 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-11-10 12:50:40,785 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: u"Need(method='role', value=u'plugin_pluginmanager_manage')")
2020-11-10 12:50:40,787 - 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-11-10 12:50:40,790 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: u"Need(method='role', value=u'plugin_softwareupdate_check')")
2020-11-10 12:50:40,793 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: u"Need(method='role', value=u'plugin_softwareupdate_update')")
2020-11-10 12:50:41,122 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2020-11-10 12:50:43,066 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-11-10 12:50:45,003 - octoprint.util.pip - INFO - Version of pip is 19.3.1
2020-11-10 12:50:45,005 - 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-11-10 12:50:45,008 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-11-10 12:50:45,017 - octoprint.plugin.core - INFO - Initialized 22 plugin implementation(s)
2020-11-10 12:50:45,065 - octoprint.plugin.core - INFO - 22 plugin(s) registered with the system:
|  Action Command Notification Support (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/action_command_notification
|  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
|  Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
|  Enclosure Plugin (4.13.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_enclosure
|  Error Tracking (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/errortracking
|  File Check (2020.8.7) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_file_check
|  Firmware Check (2020.9.23) (bundled) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_firmware_check
|  GCode Viewer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/gcodeviewer
|  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
|  Malyan/Monoprice Connection Fix (0.1.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_malyan_connection_fix
|  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
|  PrettyGCode (1.2.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_prettygcode
|  Procastinator (1.1.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_procastinator
|  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-11-10 12:50:45,097 - octoprint.environment - INFO - Detected environment is Python 2.7.16 under Linux (linux2). Details:
|  hardware:
|      cores: 4
|      freq: 900.0
|      ram: 917020672
|  os:
|      id: linux
|      platform: linux2
|  plugins:
|      pi_support:
|          model: Raspberry Pi 2 Model B Rev 1.1
|          octopi_version: 0.17.0
|  python:
|      pip: 19.3.1
|      version: 2.7.16
|      virtualenv: /home/pi/oprint
2020-11-10 12:50:45,122 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-11-10 12:50:45,178 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2020-11-10 12:50:47,988 - octoprint.server - INFO - Shutting down intermediary server...
2020-11-10 12:50:48,109 - octoprint.server - INFO - Intermediary server shut down
2020-11-10 12:50:48,114 - octoprint.events - INFO - Processing startup event, this is our first event
2020-11-10 12:50:48,116 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2020-11-10 12:50:48,124 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2020-11-10 12:50:48,126 - octoprint.server - INFO - Autoconnect on startup is configured, trying to connect to the printer...
2020-11-10 12:50:48,151 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2020-11-10 12:50:48,290 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-11-10 12:50:52,395 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-11-10 12:50:52,448 - octoprint.server - INFO - Trying to connect to configured serial port None
2020-11-10 12:50:52,543 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-11-10 12:50:52,560 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-11-10 12:50:52,565 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-11-10 12:50:52,610 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 7 port/baudrate candidates: /dev/ttyACM0@115200, /dev/ttyACM0@250000, /dev/ttyACM0@230400, /dev/ttyACM0@57600, /dev/ttyACM0@38400, /dev/ttyACM0@19200, /dev/ttyACM0@9600
2020-11-10 12:50:52,612 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyACM0, baudrate 115200
2020-11-10 12:50:52,624 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi' for _http._tcp
2020-11-10 12:50:52,636 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2020-11-10 12:50:52,647 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-11-10 12:50:52,656 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi' for _octoprint._tcp
2020-11-10 12:50:52,669 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for SSDP
2020-11-10 12:50:52,714 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2020-11-10 12:50:52,736 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-11-10 12:50:52,753 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2020-11-10 12:50:53,104 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2020-11-10 12:50:53,368 - octoprint.util.comm - INFO - Printer reports firmware name "Malyan 4.0"
2020-11-10 12:50:53,375 - octoprint.util.comm - INFO - Detected Malyan firmware, enabling relevant features for issue free communication
2020-11-10 12:50:55,184 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {u'printer_baudrate': 0, u'printer_port': None, 'firmware_name': u'Malyan 4.0'}
2020-11-10 12:50:55,537 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python2 -m pip" as command to invoke pip
2020-11-10 12:50:55,541 - 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-11-10 12:50:55,542 - octoprint.util.pip - INFO - ==> pip ok -> yes
2020-11-10 12:50:55,630 - octoprint.plugins.softwareupdate - INFO - Minimum free storage across all update relevant locations is 25.9GB. That is considered sufficient for updating.
2020-11-10 12:50:57,350 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2020-11-10 12:50:57,367 - octoprint.plugins.enclosure - INFO - Setting GPIO mode to BCM
2020-11-10 12:50:57,383 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 5 as OUTPUT with initial value: 0
2020-11-10 12:50:57,385 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 25 as OUTPUT with initial value: 0
2020-11-10 12:50:57,385 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 22 as OUTPUT with initial value: 0
2020-11-10 12:50:57,403 - octoprint.plugins.prettygcode - INFO - Pretty GCode.
2020-11-10 12:50:57,765 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 20}
2020-11-10 12:50:58,403 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.16', 'ram': 917020672, u'octopi_version': u'0.17.0', 'version': u'1.4.2', 'pip': '19.3.1', 'cores': 4, 'freq': 900.0, u'pi_model': u'Raspberry Pi 2 Model B Rev 1.1', 'os': 'linux'}
2020-11-10 12:50:58,574 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('pop from empty list',)
2020-11-10 12:50:58,892 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://octopi.home/'}
2020-11-10 12:50:59,175 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {'python': '2.7.16', 'ram': 917020672, u'octopi_version': u'0.17.0', 'version': u'1.4.2', u'plugins': u'prettygcode:1.2.2,procastinator:1.1.1,enclosure:4.13.1,malyan_connection_fix:0.1.3', 'pip': '19.3.1', 'cores': 4, 'freq': 900.0, u'pi_model': u'Raspberry Pi 2 Model B Rev 1.1', 'os': 'linux'}
2020-11-10 12:51:06,698 - octoprint.server.util.flask - INFO - Passively logging in user geoff from ::ffff:192.168.1.1
2020-11-10 12:51:06,701 - octoprint.access.users - INFO - Logged in user: geoff
2020-11-10 12:51:10,423 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('pop from empty list',)
2020-11-10 12:51:21,545 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('pop from empty list',)
2020-11-10 12:51:29,747 - octoprint.server.preemptive_cache - INFO - ... done in 30.85s
2020-11-10 12:51:31,461 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.1
2020-11-10 12:51:31,969 - octoprint.server.util.flask - INFO - Passively logging in user geoff from ::ffff:192.168.1.1
2020-11-10 12:51:31,972 - octoprint.access.users - INFO - Logged in user: geoff
2020-11-10 12:51:32,651 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('pop from empty list',)
2020-11-10 12:51:33,052 - octoprint.server.util.sockjs - INFO - User geoff logged in on the socket from client ::ffff:192.168.1.1
2020-11-10 12:51:43,694 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('pop from empty list',)
2020-11-10 12:51:47,526 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.1.1

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Running Octoprint 1.4.2, Enclosure plugin 4.13.1, Python 2.7.16
Linux octopi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

Suggestions gratefully received.

Thanks
Geoff

Have you set the Advanced Options correctly (BOARD pin vs BCM pin)?

Iā€™m using the BCM pin numbers throughout. The three outputs that I have configured (on GPIO 5, 22, and 25) are all working correctly, so I infer that I have the correct setting. The temp sensors are both on GPIO4, the default for the 18B20 (1-wire) sensor; the temp sensors also seem to work correctly when I read the values from the shell.

Please don't put personal informations in your posts - we don't want you to get spammed :slight_smile:

I guess it was part of your email signature

1 Like