fieldOfView / Cura-OctoPrintPlugin

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

Plugin gets stuck on "Waiting for Octoprint to connect to the printer". #161

Open aidenmitchell opened 4 years ago

aidenmitchell commented 4 years ago

Octoprint does successfully connect, but Cura gets stuck on "Waiting for Octoprint to connect to the printer".

fieldOfView commented 4 years ago

Please provide as much information as you can, or I won't be able to tell what is going on.

I guess you use some sort of smart plug or another way to turn on your printer. Which one, and which OctoPrint plugin do you use to control it?

I guess you have your printer turned off (but OctoPrint up and running) before send the print to OctoPrint from inside Cura. Does the printer turn on? After being turned on, does OctoPrint automatically connect to the printer?

When the "Waiting for OctoPrint to connect to the printer" message is shown, does the button to "queue" the print work to upload the print?

What OS do you run Cura on? What version of Cura do you use?

aidenmitchell commented 4 years ago

Yes, I use a smart plug, it’s a Wemo plug. Plugin: https://github.com/jneilliii/OctoPrint-WemoSwitch

The switch is turned on and Octoprint does connect automatically.

The queue button does upload the print but doesn’t start it.

Cura runs on my Windows 10 machine, version 4.5.

fieldOfView commented 4 years ago

Can you post a link to your cura.log? It can be found through Help -> Show configuration folder. It is also helpful to have the octoprint.log from the OctoPrint side of things. You can download that via OctoPrint Settings ->OctoPrint -> Logging

fieldOfView commented 4 years ago

I don't have a Wemo plug, so I can not test the interoperability between the plugin for that plug and Cura. Let's hope your logs tell me something.

aidenmitchell commented 4 years ago

octoprint.log cura.log

fieldOfView commented 4 years ago

Thanks for the logs. Unfortunately, they don't show a lot of detail.

The switch is turned on and Octoprint does connect automatically.

Can you clarify this? Was the switch turned on before you tried to send the print from Cura to OctoPrint? Or was the switch turned on by Cura (via OctoPrint) as you started sending the print from Cura?

If the switch was already on before you hit the button on Cura, I might have been thinking about the issue wrong, and it is probably a duplicate of #136, where Cura is somehow no longer updating the state of the OctoPrint instance. If that happens, Cura could think the printer is not connected even though it is, and it will try to turn on the wemo switch and wait endlessly until the printer gets connected.

aidenmitchell commented 4 years ago

Cura turned the switch on via Octoprint. On Mar 27, 2020, 1:24 AM -0700, Aldo Hoeben notifications@github.com, wrote:

Thanks for the logs. Unfortunately, they don't show a lot of detail.

The switch is turned on and Octoprint does connect automatically. Can you clarify this? Was the switch turned on before you tried to send the print from Cura to OctoPrint? Or was the switch turned on by Cura (via OctoPrint) as you started sending the print from Cura? If the switch was already on before you hit the button on Cura, I might have been thinking about the issue wrong, and it is probably a duplicate of #136, where Cura is somehow no longer updating the state of the OctoPrint instance. If that happens, Cura could think the printer is not connected even though it is, and it will try to turn on the wemo switch and wait endlessly until the printer gets connected. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fieldOfView commented 4 years ago

Sorry to keep asking for clarification, but I'm still trying to find out what does and what does not work.

Am I correct sofar?

Was the printer "operational" (connected and ready) in the OctoPrint web interface or was it not?

aidenmitchell commented 4 years ago

No problem. You are correct so far. The printer was operational in Octoprint.

fieldOfView commented 4 years ago

Thanks. This is a mystery to me. Did it happen just once, or is it reproducible?

aidenmitchell commented 4 years ago

I tried multiple times. On Mar 27, 2020, 10:32 AM -0700, Aldo Hoeben notifications@github.com, wrote:

Thanks. This is a mystery to me. Did it happen just once, or is it reproducible? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fieldOfView commented 4 years ago

And what happened?

aidenmitchell commented 4 years ago

Same thing, the printer turns on and Octoprint connects, but Cura gets stuck on "Waiting for Octoprint to connect to the printer".

7kasper commented 4 years ago

I am getting the same issue. Running on the latest master branch. It is weird as the system worked fine before... Suddenly have this issue. I use PSU controll with the PI turning on a relais that I made. Printer turns on fine and connects. Then cura gets stuck at connecting. Like said, this worked in previous versions. Even with the printer turned on and connected the cura instance gets stuck on connecting. Sometimes after restarting cura the issue is gone though. Makes it hard to trace. https://pastebin.com/592m1CfR

fieldOfView commented 4 years ago

@7kasper please elaborate a little. Is your printer turned on and connected before you try to send the printjob to OctoPrint, or do you let Cura turn on the printer?

alaorath commented 4 years ago

I was searching Google for an answer and found this post.

I have the exact same setup as the original poster: OctoPrint with Wemo & PortListener plugins (so the printer powers on, OctoPrint connects) Cura correctly powers on the Wemo, and I can see OctoPrint connect, but Cura remains in "waiting for Octoprint to connect".

(while writing this comment, I thought to check for updates in the Marketplace...) After updating OctoPrint Connection to v3.5.14 I can no longer reproduce the issue...! It does exactly as previous versions of OctoPrint w. Cura... when issuing "Print with OctoPrint" Cura powers on the Wemo switch, waits for OctoPrint to connect, then starts printing.

I think 3.5.14 fixed the the issue! :)


OctoPrint version : 1.4.0 OctoPi version : 0.17.0 Wemo Switch plugin version : 0.1.5 PortListener plugin version : 0.1.10

Cura version : 4.6.1 OctoPrint Connection version : 3.5.14

7kasper commented 4 years ago

@7kasper please elaborate a little. Is your printer turned on and connected before you try to send the printjob to OctoPrint, or do you let Cura turn on the printer?

I have tried both and it failed in both instances. In all cases where the printer was off before, it did turn on and autoconnect did connect but cura bang on connecting to printer. The weird thing is.. I have had exactly the issue described but like said after 2 restarts of Cura (not octoprint) it suddenly worked and hasn't stopped working since. Both on printer off start and printer already on start.

fieldOfView commented 4 years ago

I'm starting to think that this issue (too) is a duplicate of https://github.com/fieldOfView/Cura-OctoPrintPlugin/issues/136, where Cura stops seeing changes in the updates it requests from OctoPrint.

Wpnx330 commented 4 years ago

Hello,

I also have this issue. However I do not use a smart plug.

Printer : Sidewinder X1 v4 (Powered ON Always) Hardware : Rasperry Pi 4B rev 1.2 OS : Octopi 0.17.0 Octoprint : 1.4.2 Octoprint Connection : 3.5.17 (Cura Plugin)

When in Cura printer settings, I can connect to my printer via OctoPrint. When trying to print I can successfully send to queue, and then manually print via OctoPrint I can upload from my desktop to OctoPrint and manually print without issues.

When I try to print from Cura it gets stuck with the message "waiting for Octoprint to connect to the printer."

UPDATE: 9/18/2020

I found an issue with Sidewinder X1 devices. If you have the power switched to the off position and plug in the Raspberry Pi B4 the USB cable will partially power the device. the X1 will not be able to operate but you will be able to work through the menus. I have re-run my 2 tests to find the same results (stuck waiting) but ensured that the printer was on an operational prior to plugging in the Ocoprint (Raspberry Pi) server.

akiltopu commented 4 years ago

I have a similar issue.

I am using Ender 3 v2 printer with octoprint on macosx catalina.

I am using cura 4.8 with octoprint connection plugin (latest version) and wemo switch plugin.

When my printer connection is offline and powered down; with the help of octoprint connection plugin and wemo switch i could power up my printer but serial connection is not working.

Error: State: Offline (Error: SerialException: 'read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2916)

When i close cura i can connect to my printer from octoprint web console easily.

I could not connect it from octoprint connection plugin if it is disconnected from octoprint web console.

Edit: If i use another computer for cura it is working. I guess i could not connect octoprint from cura if i use the same computer for octoprint server. No problem i resolved the issue right now.

alexose commented 3 years ago

Having the same issue here. Cura 4.8 + Catalina.

alexose commented 3 years ago

Works after downgrading to Cura 4.6.2.

psiess commented 3 years ago

I'm a bit late to the game but I'm also having this issue. I have an Ender 5+ that takes about 15 seconds to load after power on. The Cura plugin turns on the printer via PSU control plugin and then tries to connect right away. No connection is made because the printer isn't initialized and Octoprint is not connected to the printer, so the Cura plugin gets stuck trying to connect and never completes.

mw75 commented 3 years ago

Had the same problem. Fixed it by diconnecting and connecting under "manage printers" -> octoprint, wait for key validation -> disconnect -> wait for key validation again -> connect.

Hobbit44 commented 3 years ago

Hi, adding my 2p to this.

My setup: Ender 3 V2 TPLink KP105 Plug Octoprint 1.6.1 Cura 4.9.1

What i have noticed is: 1. settings:

2. settings:

My preference would be to have the status remain as operational. Could this plugin check the status of the plug and act on that regardless of what state the printer is in? Im assuming it might be checking if the printer is operational and skipping the plug action.

petr7555 commented 3 years ago

I have had the same issue, restart of Cura helped.

looolz commented 1 year ago

I have had the same issue, restart of Cura helped.

Same. I just had to restart Cura.