Repository: OctoPrint

I originally did not plan for it to be possible to upgrade, just assumed I had to release updates myself. It should be OK to update though, worst case uninstall/reinstall the Add-On.
Just a warning: the built in backup feature in OctoPrint for “dev” and “slim” version is broken, not sure if I can fix that through an update without loosing all installed plugins.

Thank you for the suggestion of using the device serial instead, I’ll probably add that to the instructions. I noticed I should also edit the first post, since there has been a lot of changes.

1 Like

hello,

i cant import it, can you help?

i get this error

You need to click the 3 dots in the right hand corner and enter the repository there. You are now trying to search for an add-on…

1 Like

I finally got myself a Raspberry Pi camera module, there is now (basic) camera support! I have not tried it with USB camera, please tell me if it works. This is available on version 0.3.0 which I released recently.

Version 0.3.0 does not use _experimental, thus all versions now share the same folder for configuration. I choose to mark it stable since it should be the main version now (I’ve tried a quick print with timelapse and to slice).
At the same time I put deprecated on dev and slim, they are still available for now but will not be maintained. Note that the OctoPrint backup feature of those versions is still broken.

1 Like

Well, my Pi camera seems broken so I’m unable to test camera functionality.

If there is interest I could release a Python3 version, let me know in that case. Right now it´s Python2-based.

Regarding upgradeability: as long as it is available on PyPi it should be possible. I believe RCs are built locally, so they will not work (1.4.1 rc1 failed due to compiler not being present, to have it available would require additional space).

1 Like

Well, I’ve no idea what happened, but after running 0.3.0 for a few days, I upgraded today to the latest HA (0.112.4) and all hell broke lose. Have now restored to 0.112.2 from 2 days ago but Octoprint will no longer start. It gives a

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
run.sh
[17:34:04] INFO: Create ingress user
Traceback (most recent call last):
  File "/data/python/bin/octoprint", line 8, in <module>
    sys.exit(main())
  File "/data/python/lib/python2.7/site-packages/octoprint/__init__.py", line 611, in main
    from octoprint.util.fixes import patch_sarge_async_on_py2
  File "/data/python/lib/python2.7/site-packages/octoprint/util/__init__.py", line 15, in <module>
    import past.builtins
  File "/data/python/lib/python2.7/site-packages/past/__init__.py", line 87, in <module>
    from future import __version__, __copyright__, __license__
ImportError: No module named future
[cmd] /run.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.

and I’ve got no idea why…

1 Like

Strange, I upgraded to 0.112.4 today on Pi and PC without encountering any issue.

  • Did you try to stop and start the addon? (I will ask just to make sure)
  • Running on Raspberry Pi or other platform?
  • Was it the OctoPrint addon that stopped working with 0.112.4 or something else?
  • Did you restore to 0.112.2 using Home Assistant snapshot functionality? I’ve only tested OctoPrint backup & restore.
  • Did the addon forcefully terminate before the issue occured? For instance power loss.

There is a reset command for the addon - do NOT use it on 0.3.0. Right now it only saves you from pressing uninstall and then install, meaning you will loose all OctoPrint data not in /config/octoprint (at minimum all plugins, most likely with plugin data).

I’m trying something now, hopefully I’ll get back to you within 12 hours (hopefully sooner).

I did a quick change to the reset command in 0.3.1, it is building right now.
I had plans to modify the build setup but have not had time to do that - until 0.3.1 is built installation will fail, sorry about that everyone.

The idea is that the new reset will only clean Python install files, not all OctoPrint files, but I have only tested this in a Docker development environment. Probably all plugins will be gone, hopefully the data will be restored when the plugin is installed again.

In case you are still unable to launch OctoPrint addon, could you try the following? It will still result in loss of data, but best case less than a reinstall.

  • Update addon to 0.3.1 (when it is available, should be less than 30 minutes from now)
  • Add the argument under configuration as stated in Documentation (request_reset_data: true)
  • (re)start addon
  • Remove the request_reset_data line from configuration

Update:

  • Build completed, should be available now. Will be offline for approx. 8 hours now.
  • Plugin Manager - Cleanup could have some hints regarding which plugins were installed and has data/configuration.
  • I do not know if this will work if a config file from dev/slim is used.

I did manage to recover eventually and discovered that 1) my last backup was corrupt, 2) the backup before that was not of the date that I thought it was, but it did allow me to restore, and after a reboot it has all come back to normal. I’ve now 1) amended my backup schedule so I will always have a fresh backup available at the start of the day, 2) before every HA update I will verify the backup is restorable.

I do have the new update notification available on Octoprint, but am going to give it a few days of stability…

Good that you have it running now.

I pushed 0.3.3 after realizing I could do some improvements to reset/rescue, the changes between 0.3.0 and 0.3.3 should only relate to that. Instead of delete data it attempts to install what was previously installed, including plugins.

I suspect some of the Python files were corrupted which caused OctoPrint to not run. Depending on how bad the corruption is the latest update might be able to recover from that, but I don´t have a good way to test it. Hopefully the issue will not occur again, but if it does it might help.

great add-on!! working out of the box here with my any cubic…

i am just having a hard time making HA access the octoprint add-on.
tried with the real internal ip, also with localhost.
they just don’t connect.

get this error:
Endpoint: printer Failed to update OctoPrint status. Error: 409 Client Error: CONFLICT for url: http://192.168.0.2:5000/api/printer

octoprint:
host: my_real_LAN_ip
api_key: key
port: 5000
bed: true

just working! never mind!

hi guys! I am getting an error trying to install telegram plugin (OctoPrint-Telegram).
found in this thread (https://github.com/fabianonline/OctoPrint-Telegram/issues/243) that to solve it I have to run the command bellow:
apt-get install libjpeg-dev zlib1g-dev

how can I do that in the container?

the error:
https://pastebin.com/zLyNAnDE

Right now it is not possible, I’ll have a look if I can find a solution without making it much larger.

It is not straightforward to add those to the addon/container. In some cases it might be possible to do when it is running, but I don´t think Home Assistant allows for it. The other option is to add it during build.

Except for those two packages there are several other packages required (Python development environment, build tools etc.) adding up to additional 200+ MB.

Thanks for the quick reply!!

One possible solution could be to have 2 build options?
a slim one, with just the basics to run octoprint
a fat one (200+ MB) with almost all python needs on it to run all plugins.

I’d prefer not to split it up again, it is much easier to debug and maintain a single build.

For now I’ve released version 0.3.4 with a new configuration option (add_build_packages). If this is set to true it will download some additional packages when the addon starts, this should enable more plugins with build requirements to be installed. I’ve added some additional details in the documentation tab for the addon.
Note that the packages this command installs are not persistent, any (re)start of the addon will lead to another download and install. That said, I think the requirements are only for install - not to run the plugin - so you could try to set it to true, (re)start the addon, install the Telegram plugin, then set it back to false.

Don´t forget to make a backup first (it helped me when I was testing it).

awesome! just installed successfully! thanks!!!

hi!

3 more feedbacks from my daily use:

  • When I reboot/restart the system with the printer OFF, the USB port does not appear in octoprint. when I turn the printer ON, it also doest not update automatically. I have to restart de plugin so the port can appear. is there a way to ALWAYS forward the USB port? so octoprint can connect automatically to the printer when it is turned on?

  • the webcam stream does not seem to be starting automatically. when I restart the system I have to start the stream again. can it be a parameter to auto start?

  • I suggest disabling the virtual printer on the production release. I did it in the xml file inside octoprint folder.

thanks again for this great plugin!

I’ve added those as “issues” on Github now, easier for me to keep track of.

Thank you for the feedback!

1 Like

I have a problem where the current clean “Octoprint DEV” install shows me the RPI USB ports and I can connect to the printer, but on the offical “Octoprint” I cannot see the ports no matter what I do…
Do you know why this might be? Both fresh installs.