mattcar15 / bambu-connect

Connect to the stats, controls, and camera of your bambu printer
Other
47 stars 8 forks source link

Camera example not working #5

Closed lixxbox closed 8 months ago

lixxbox commented 8 months ago

I'm sorry, I nearly don't dare to open another issue 🙈 But I can't get the camera example to work.

I don't get an error message, but also no image is generated. The save_latest_frame function doesn't seem to be called at all. I had added the print() function there.

It's running on Windows, if that is relevant.

mattcar15 commented 8 months ago

No worries, they've all been good call outs. I don't think windows would have an issue with it. I've only run it on linux and mac so can't say for sure. I just tested it from a fresh clone and do see it generating the file so not sure... If it's not getting called though what it means is that there aren't frames coming over the connection / the connection has an issue. Can you try going to your slicer and streaming the camera feed (at the same time the script is running)? Just to see if frames are indeed going through? I've had it be super slow sometimes, it varies

lixxbox commented 8 months ago

OrcaSlicer is streaming the camera feed.

In the meantime, I added print() functions to find the point where it is stuck. It looks like dr = ssock.recv(read_chunk_size) is blocking the script. https://github.com/mattcar15/bambu-connect/blob/bcd83f375798d10954b98f48adfcf4180d7e0c0d/bambu_connect/CameraClient.py#L67C22-L67C22

I booted up an orange pi with Debian and the scripts runs fine. Seems to be a problem with Windows, my machine, network or something else. :-/

mattcar15 commented 8 months ago

Oh interesting. Good to know! I don't have anything with wondows so I won't be able to dig into that, but definitely a good limitation to know

tommy4111 commented 2 months ago

Did you get the camera to work?