fieldOfView / Cura-OctoPrintPlugin

Cura plugin which enables printing directly to OctoPrint and monitoring the process
GNU Affero General Public License v3.0
493 stars 74 forks source link

Have multiple printers & Octopi boxes. API key for one overwritten by the other #188

Closed starlord1980 closed 4 years ago

starlord1980 commented 4 years ago

Problem: I have added a second printer and therefore added another Raspberry Pi with OctoPrint. In my printer list in Cura I have the two printers set up, and manually set the IPs to point to the two Octopi's. 10.0.1.41 - OctoPi Printer 1 10.0.1.43 - Octopi Printer 2

When the API key is retrieved for the OctoPi Printer 2, I connect and API key is saved.

When I select OctoPi Printer 1 - the API key has then been overwritten with the API key for Printer 2 and will no longer send commands. If I then re-add the correct API key for Printer 1, then the API key for Printer 2 is overwritten and stops responding to commands.

Expected Behaviour: OctoPrint plugin saves Its unique API key for OctoPi1 OctoPrint plugin saves its unique API key for OctoPi2

This behaviour is occurring on both Windows and Mac platforms. Running Cura 4.6.2

fieldOfView commented 4 years ago

The intended way to use the plugin with multiple OctoPrint instances is to configure multiple printers in Cura. Each printer instance in Cura can then be connected to a different OctoPrint instance. From your issue, it is not quite clear to me if you use Cura this way, or that you have a single printer and want to switch between OctoPrint instances via the Connect to OctoPrint dialog.

dataworxx commented 4 years ago

Hi, i have the same problem i choose printer 1 in cura, make settings manually ip, port api key --> close printer 1 working i choose printer 2 in cura, make settings manually same ip, other port, other api key and immediatly the connection to the other "instance" is broken because the last api key will overwrite the api key from printer 1.

i think i use it the way you adviced in your post

hope you can fix it and thank you!

starlord1980 commented 4 years ago

Yep, I just uninstalled and set up Cura again and same problem, although it does seem to settle itself after a few API key retrievals of both Octopi boxes.

fieldOfView commented 4 years ago

it does seem to settle itself after a few API key retrievals

Hmm, those are always the tricky ones to track down. Things that don't always work. I'll try to look in to it next week.

fieldOfView commented 4 years ago

I can confirm that working with multiple OctoPrint instances with different keys is currently iffy, and will rework that.

fieldOfView commented 4 years ago

This development snapshot should fix issues with managing keys for multiple OctoPrint instances.

Download the file and drop it onto the buildplate in Cura as if you were opening a 3d model.

fieldOfView commented 4 years ago

Fix is available in version 3.5.17 in the Marketplace

focuserikfocus commented 4 months ago

Hello everyone,

I am experiencing the same issue. I have 15 3D printers. I want to create a profile for each printer in Cura and control all of them through Cura with different IP addresses and API keys (OctoFarm does something similar, but it doesn't seem very user-friendly). The Cura plugin only allows a single IP address: localhost:5000. I wish I could enter an IP address and API key for each printer profile. I've been struggling with this for days and I'm quite a beginner. A little help would be greatly appreciated.

Thank you.