Repository: OctoPrint

Just for anyone else that comes across the same issues as me; i’ve given up on the logitech c925e. Great camera for video conferecing etc but doesn’t seem too suited to this application. I might give it another go some other time when ive got more time.
I swapped to the raspicam 5mp and had a different set of dramas. i had to take the SD card out of the pi and put it in another pc to edit the config.txt file as outlined in - Getting the Raspberry Pi Camera to Work on HASSOS · GitHub
from there i couldnt get it working through the inbuilt mjpg-streamer with the octoprint add-on; however; if i use the seperate mjpg-streamer it work.i’ve updated the stream addresses in octoprint and octolapse and the quality looks good. i’m just about to try a print with octolapse and the live stream to see how it goes.
Oh the added bonus of using the seperate mjpg-streamer is that you don’t need to use ‘start camera’ from the power options menu

Interesting that the Pi camera works with the separate ‘mjpg-streamer’ but not with ‘mjpg-streamer’ in the OctoPrint Next addon, as both should be based on the same source code. I’ll have to make a clean install and verify the behavior later, may take a few weeks though.

Did you try the c925e with the separate addon? It should have the same behavior, but I’m curious as there was a difference for the Pi camera.

Nope, I didn’t think about using the seperate Mjpg-streamer until the pi cam wasn’t working, I did want to change to the pi cam anyway mainly due to size/weight difference.
I did have a bit of an issue where a print got hung up due to losing comms with the rPi and I had to do a hard reset now I’m getting a few errors in octoprint. I’ve got a core update due so I’ll back up, update, restart and see if it’s still there after a sort restart.
Here is an octolapse using the pi cam which you can compare to the Logitech one I posted earlier

On my ancient (2010) Mac book pro I’m getting a settings load error when using the browser.
Only started since the disconnect issue I had yesterday.
Here’s a screenshot

Might give the old girl a courtesy restart for good measure haha

Ok next issue,
I don’t quite understand what’s happening. But it’s happened 3 times now. The pi with HA and Octo on it seems to disconnect from the network (I don’t think this usually happens but unsure) and then the print stalls at that point.
That’s what I don’t understand; if I’ve uploaded the gcode to octoprint why would network connectivity cause it to stall if the printer is connected to the pi via cable?
Ah actually maybe the pi itself is crashing

So other ppl don’t lose 1day figuring this one out.

The way to connect this add-on GitHub - fredrikbaberg/hassio-addons: Intended home for hassio addons, if time allows.
from CURA octoprint is NOT to go to the link you get on the UI when you open the addon UI.

like https://servername/774437fd_octoprint/dashboard

But you have to enable the 5000 port on the addon


and then either reverse proxy to that port or just use the plain old IP to connect to it.

Have you figured out something new regarding this? Is it the Pi itself crashing? If so, that would also explain the issues with the camera.

I’ve noticed an issue with loss of connectivity when trying to add a bed level visualizer plugin, where the system attempted to build numpy from source. There will be an update to the addon (OctoPrint Next) with numpy included within an hour or so. Update: “Bed Level Visualizer” plugin uses a different version of numpy, so I’ll skip the update for now.

I think the camera issue was a power issue. I don’t think the pi can supply enough for a stable stream.
But due to the crashing of the pi I decided to uninstall and just use a separate pi with the octopi image.
No discredit to you, you’ve done great work. I was just lazy and didn’t want to figure out why it was crashing.

The important part is that it works well for you.
If you, or anyone else, figure out why it did not behave properly - and if it is something I can try to fix - please let me know.

1 Like

After some new issues on the GitHub repository, I’ve started to work on an updated version. If you’ve noticed some bugs or have feature requests, please make sure they are added to the GitHub repository issues so that I can take them into consideration.

I’m looking at changing base image - this means upgrading from the current addon version will not be possible, so it will probably be another version.

1 Like

New version is live, it’s simply called “3DPrinter”.

  • Still based on Alpine (I noticed a 50% increase of image size with the change of base image which I considered too much).
  • If mjpg-streamer is enabled in addon options it starts automatically.
  • Klipper included in the addon. Moonraker has been added but not tested. Both are disabled by default.

My plan is to deprecate all existing variations of OctoPrint addons and eventually remove them. I need to test it some more to see that I haven’t broken anything that worked before, printing was just tested.

Hopefully I can change the stage from “experimental” to “stable” by the end of this month.

Note: I haven’t tried to migrate from any previous version of the addon, so I don’t know if that will work. I’ve moved some files around, you there will most likely be differences in config.yaml. You can find the updated file in: hassio-addons/config.yaml at master · fredrikbaberg/hassio-addons (github.com)

Thanks for your work, i’ve been using your plugin since my begining with HA.

Just migrate from Octoprint to the new plugin 3D printer, backup seem to be working without major issues.
Only my printer profile was missing but this is a matter of seconds to make it again. And of course my database of spool manager but that’s on me, i’ve completely forget to export it.
Need mor time to see if there is any problem with the backup but so far it look complete !

Nice work :stuck_out_tongue:

I can’t start this plugin. I tried everything what I can with this and still…

[22:27:13] INFO: OctoPrint cont-init.d
Traceback (most recent call last):
  File "/data/python/octoprint/bin/octoprint", line 8, in <module>
    sys.exit(main())
  File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/__init__.py", line 959, in main
    from octoprint.util.fixes import patch_sarge_async_on_py2
  File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/__init__.py", line 52, in <module>
    from octoprint.util.connectivity import ConnectivityChecker  # noqa: F401
  File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/connectivity.py", line 12, in <module>
    from octoprint.util.net import resolve_host, server_reachable
  File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/net.py", line 14, in <module>
    import netifaces
ModuleNotFoundError: No module named 'netifaces'
[cont-init.d] octoprint.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
s6-nuke: fatal: unable to kill: No such process

I assume this is with the 3DPrinter addon, on what hardware and architecture? Was this from a clean install of the addon or did you attempt to restore a backup?

There is an issue for this on GitHub OctoPrint + DietPi + Supervised install = missing netifaces library · Issue #237 · fredrikbaberg/hassio-addons (github.com), we’re trying to figure out if it’s only occurring on a certain architecture.

RB 4B+ with HA OS. Clean instalation, no backups.

Could you try with the latest update, 2021.11.2.? I haven’t had time to test it more than update from an intentionally broken system (removed netifaces), but the changes have mainly been to the script that prepares OctoPrint startup.

Another several times later…
ModuleNotFoundError: No module named 'netifaces'

Is it the same with 3dprinter addon version 2021.11.3? I added py-netifaces after a suggestion on GitHub, other than that it should be the same as 2021.11.2.

This is somewhat difficult for me to debug as I haven’t encountered the issue myself. Did you use the 32- or 64-bit install of Home Assistant OS?

Update: I installed the 32-bit version of Home Assistant OS on my Pi 3B and got the error, so now I should have a better chance to debug it.

1 Like

I have updated to latest 2021.11.4 with the same problem. Im also using PI 3B
[23:49:38] INFO: Starting octoprint... Traceback (most recent call last): File "/data/python/octoprint/bin/octoprint", line 8, in <module> sys.exit(main()) File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/__init__.py", line 959, in main from octoprint.util.fixes import patch_sarge_async_on_py2 File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/__init__.py", line 52, in <module> from octoprint.util.connectivity import ConnectivityChecker # noqa: F401 File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/connectivity.py", line 12, in <module> from octoprint.util.net import resolve_host, server_reachable File "/data/python/octoprint/lib/python3.9/site-packages/octoprint/util/net.py", line 14, in <module> import netifaces ModuleNotFoundError: No module named 'netifaces''

I think I’ve isolated the issue to 32-bit installs of Home Assistant OS, and currently see two main options as I haven’t figured out how to fix it:

  • Disable support for architecture armv7, which I think is the only version affected by this.
  • Reinstall packages in the python virtual environment if OctoPrint install seems broken (octoprint --version fails).

I’m currently building and update with the second approach, it should be up within an hour but it will be sometime tomorrow that I can check if it really works. The main downside to this workaround is the time it takes to complete the reinstall of all pip packages.

Update: it’s available and seems to work.

@Bizzmo and @MarcinNo do you know if you installed the 32- or 64-bit version of Home Assistant OS?