imrahil / OctoPrint-NavbarTemp

Plugin for OctoPrint - displays temperatures on navbar
GNU Affero General Public License v3.0
44 stars 50 forks source link

raspi temp not showing up on rpi 3 hardware #23

Closed cristiansavaro closed 6 years ago

cristiansavaro commented 7 years ago

can you please analyze and apply the attached patch so we can all benefit from this plugin showing up the raspi 3 cpu temp ?

patch.txt

Swiftnesses commented 7 years ago

Temp works on my RP3 as standard?

cristiansavaro commented 7 years ago

mine used to work as well but just stopped working until i applied this patch.

rpgrunwald commented 7 years ago

I added the three lines of code manually and it works now with Octoprint 1.3.4 and a Pi 3b.

pmbroth commented 7 years ago

where did you add the lines of code?

pmbroth commented 7 years ago

how do you apply the patch?

pmbroth commented 7 years ago

figured it out thanks

pmbroth commented 7 years ago

well I added the 3 lines, still no temp

cristiansavaro commented 7 years ago

you have to patch the code and zip it up. then delete the old plugin and add the new zip through the octoprint interface. that's how i did it and it works just fine.

travmo commented 7 years ago

Tried to patch the code then use the interface to install the zip, but got an error. This is what I see:

Installing plugin from uploaded archive... /home/pi/oprint/bin/python -m pip install /tmp/tmpY46Sux.zip Processing /tmp/tmpY46Sux.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: '/tmp/pip-CkTGq4-build/setup.py'

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-CkTGq4-build/ Error! Could not parse output from pip, see plugin_pluginmanager_console.log for generated output

WarpZoneNL commented 7 years ago
  1. edit init.py sudo nano ~/oprint/lib/python2.7/site-packages/octoprint_navbartemp/init.py

  2. place last 3 rows of the code, this will accept the Pi3 proc! elif match.group(1) == 'BCM2709': self._logger.debug("Pi 2") self.isRaspi = True elif match.group(1) == 'BCM2835': self._logger.debug("Pi 3") self.isRaspi = True

  3. Restart OctoPrint

( Aha cristiansavaro also added this as a textfile ;-) )

travmo commented 7 years ago

Thanks WarpZoneNL. Was trying to make the edits, then manually add it as a plugin. Totally overlooked just installing the plugin, then editing it.

vegasrambler commented 7 years ago

I have the Pi 3 b and the Pi temp is not showing. The code above is in the init.py file.

Thanks for any help on this issue.

kain000 commented 7 years ago

Same issue, I also tried WarpZoneNL's other solution, populating navbartemp_settings_raspi.jinja2 with the code form Github but neither that fix or adding the code to init.py have restored the menu for me.

Rpi 3, fresh image of Octopi

Tinchus2009 commented 7 years ago

I have the same issue with a raspberry pi 3 B. The file ~/oprint/lib/python2.7/site-packages/octoprint_navbartemp/init.py does not exist in that location, instead there is a init.py, is that the file I have to edit and add those 3 lines? I did it but still is not working

PD: forget what I said, it is working now. I did nothing... just a second reboot and not it is showing the temp....

chrissv commented 7 years ago

Note that the github comment formatter is eating the underscores. So references to init.py are actually for the file __init__.py

twstdpear commented 7 years ago

Doing a little digging, I found out that depending on the version of Octopi/Raspbian/Debian and more specifically certain kernel versions, the Pi3 chip shows up differently, which is why it seems to work for some people and not others.

I'm running a job on the printer attached to my Wheezy Pi3, otherwise I'd updated it to see what happens there. However, it looks like BCM2835 is the "new" id for it in the more recent kernels.

Related discussion here: https://raspberrypi.stackexchange.com/questions/840/why-is-the-cpu-sometimes-referred-to-as-bcm2708-sometimes-bcm2835

Summary: There seems to be a great amount of confusion regarding which is the chip and which is the package, and without signing an NDA and giving up our ability to disclose that information, we may never know.