Raspberry Pi loses temp sensor and cam


This post is a bit off topic. I had searched other forums and even posted on Octoprint community but haven’t gotten anywhere. Maybe someone here has seen something similar. I have an Ender 3 Max setup with a heated enclosure and exhaust controlled with a Raspberry Pi 3 B+ running Octopint/Octopi with Enclosure plugin. The other day I lost the DS18B20 temp sensor on the Pi after UI customizer plugin updated in Octoprint (coincidentally, we had a power failure at the house around the same time). I SSH’d into the Pi and noticed the “dtoverlay=w1-gpio” line missing from the config.txt file. I basically had to re-setup the sensor. My Pi webcam also had to be enabled again in raspi-config. This happened once before with the last Octoprint update I did.

I can reboot and power down/unplug the pi with no issues - the settings remain. Now that it has happened before, it is a quick fix to get the sensor and cam operational again but it is an annoyance. I’d like to address the root cause. I am definitely not fluent in Python or Linux.

Has anyone seen this behaviour before or have any suggestions as to a root cause?


I am no Pi expert but I do have a pretty good background in Linux.

Sounds to me in very simple terms that when you are doing an update it’s going back to a last known good config of some sort. Maybe even a “default” config. Looks like the config call is not being made in the kernel.

Once a package is added in Linux you may need to re-compile the kernel with the newly included modules. If it does not need a complete recompile then it does need to be a ref in the startup-config or anytime you reboot you will lose your changes.

I doubt if you would need to recompile it sounds to me like the calls are missing from the startup file. Whatever that may be on a Pi.

And I apologize, Welcome to the forum, Forgot myself that time and went straight to nerd mode.

this thread will still be seen by the general MB but I am going to move the root to our Pi section. If anyone wants to jump in feel free.

Thanks for the quick reply. That makes sense. I will poke around some more in the configs and see what I come up with. I am going to be setting up another Pi (orange) for my Ender 5 plus when I switch it over to klipper so I want to get off on the right foot… having said that, I am going to try to figure how to control the chamber temp from the stock mainboard and klipper as opposed to Octoprint. I’ll be using both E0 and E1 for a 2 in 2 out Chimera hotend so I don’t have any of those pins available.

No Problem, Glad I could at least get you in the right direction.

A factory board would not be able to control chamber temp unless you moved the bed heat to an outside controller and used the bed Pids to control the chamber. Really depends on what you may want to adjust while the print is happening over Octo.

I could suggest maybe going with a BTT board, something like a spider another option is Duet, You will have plenty of PIO for controlling anything really, The huge plus would be CANBUS. the ability to add 256 of anything to your board and really only be limited by your imagination. If you want 10 heads and zone heating you can do it. The biggest advantage is the CANbus tool heads, 4 wires to each head and the job is done. I just pulled 15 wires off one head and replaced them with 4. This is going to become my new normal for custom machines.

The easiest solution is definitely a new board - tons of possibilities. I had been looking at the BTT Octopus and MKS Monster. I though there might be a chance of using some of these pins on the stock board (not sure if the image uploaded…).

I would agree, the ability of the additional headers would give you what you are looking for. Marlin can work some magic for you if you are willing to think outside the box a bit.

Hey @Jason

I know people are a bit loath to consider Klipper as it appears to be more complex but if you’re looking at easily adding functionality, I think that it would be a better route that trying to figure out how to do it in Marlin.

“Appears more complex”. I’ve done a pretty deep dive into Marlin to try to do add some functionality to it and it’s a lot of work and you need to have a pretty good understanding of C++ - as well as a moderate understanding of digital electronics, especially if you’re going to interface with something like a DS1820.

With Klipper, you can define pin functions like discussed here quite easily to have them respond to other events. Klipper has a pretty extensive library of devices that you can interface to and, chances are, the interface code required for a commonly used device, like the DS1820, is there already:

For example, for my heat sink fan, I only want it on when the heater block is at 30C or higher:

[heater_fan heatsink_fan]
pin: PB10
max_power: 1.0
fan_speed: 1
kick_start_time: 0
heater: extruder
heater_temp: 30.0

If you’re going to add IO, I’d recommend using a CAN bus to communicate with an expansion board - again, quite easy to do with Klipper. I’m about to set up an Octopus board with its built in CAN interface but previously, I’ve been using a separate USB to CAN board that costs around $15.

You can customize Klipper operations using Jinja2 “macros” which is not trivial but definitely easier than C++ with some basic debug capabilities that you won’t have with trying to add functionality to Marlin or some other basic 3D printer firmware.

Every day that passes, the more impressed I am with Klipper, its infrastructure (including Mainsail/Fluidd) and developer support.

Hey Myke

Thanks for the input and foresight. I am usually pretty vanilla in my installs, I try to use the KISS method.

I like to tinker around with new stuff just seem haven’t had the time lately on top of trying to convert the Voron to CANBUS control. Seems like Klipper may not be a big jump. Good to see others with the success using it.

1 Like

I decided to make the switch to Klipper after becoming comfortable with Marlin. To me, Klipper seemed less cumbersome when it came to tuning and making hardware changes. I guess time will tell as I get further into this Frankenstein Ender 5 plus project I’m working on. I’m keeping my Ender 3 max on Marlin until I’m entirely happy with Klipper.

fair enough, I made a big transition to reprap firmware a couple of years ago, it sounds to me like the configs on that may be very similar.

Let us know how you make out, I am more than curious