Can’t set up the Astroprint plugin on my second Octopi.

I have two printers at home – each with its own Octopi and camera connected. One of them has been set up with the Astroprint plugin, and I was able to set it up with my Astroprint API key. The second Octopi has the plugin installed, but every time I go to the Astroprint tab and enter my API key, pops up a message stating that I was logged in, but my files couldn’t be loaded. This then dumps me back at the main tab.

When I go back to the Astroprint tab, it is as if I didn’t provide the API key (it still shows a blank where it is waiting for the key again). This repeats every time I try to enter the key, which I am copying and pasting directly from my account settings page.

Any suggestions on what to try to correct this issue?

Thanks!

Actually we’re also trying to gather more information about this. It’s an issue that we have never been able to see or reproduce in our lab and that it affects and estimated 5% of our OctoPi users.

Can you think of anything different that you do from the standard OctoPi installation?

There’s an active issue on GitHub about this issue: https://github.com/AstroPrint/OctoPrint-AstroPrint/issues/19

I did some reading in other threads (and that github link), and I saw something about the BoxID needing to be different for every printer (this thread: [SOLVED] Two printers on the same slot on AstroPrint Cloud. ).

I have a hunch that this may be related to my problem, since I actually cloned the original Pi to create the second one, and then went in and made some adjustments but I do remember seeing something odd with either Astroprint (or it may have been Octoprint anywhere) where the camera feed was flashing and showing the other printers feed sometimes.

I am going to try the approach with the sudo commands in that thread later tonight.

I ended up just disabling Astroprint at the time but now I have gone back to trying again. I am about 80% sure Astroprint was already set up on the first Octopi when I cloned it.

Yeah that would be a problem if they both have the same box id. The resolution in that thread is for the astrobox but you should be able to find the box-id file in the same directory as the config.yaml file in your octoprint installation

https://github.com/AstroPrint/OctoPrint-AstroPrint/blob/1c9b385daaaf57767a927015aacf21b0e3b8daff/octoprint_astroprint/boxrouter/init.py#L187

Deleting it would prompt the box to create a new one with a new id and should solve the problem. Let me know if it does.

I just went hunting for that box-id file and found and deleted it prior to seeing your reply. (And I rebooted the RasPi after doing so).

This does appear to have resolved the issue, and I was able to enter my API key without issue. I will keep an eye on it and make sure it doesn’t “lose” it after a while as is described in that github issue.

Thanks!

1 Like