davglass / bambu-cli

CLI tool for Bambu Labs printers
70 stars 10 forks source link

Hangs when attempting to pull ip addresses #3

Closed ondrovic closed 9 months ago

ondrovic commented 10 months ago

Logging in as: user@email.net Fetching devices from their API. Found 2 devices.

Device One Device Two Attempting to find device IP addresses, please wait, this may take a few seconds.. Found IP for Device-One: null

Response from /v1/iot-service/api/user/bind

"devices": [
        {
            "dev_id": "",
            "name": "A1 Mini",
            "online": true,
            "print_status": "SUCCESS",
            "dev_model_name": "N1",
            "dev_product_name": "A1 mini",
            "dev_access_code": "",
            "nozzle_diameter": 0.4
        },
        {
            "dev_id": "",
            "name": "X1C",
            "online": true,
            "print_status": "FAIL",
            "dev_model_name": "BL-P001",
            "dev_product_name": "X1 Carbon",
            "dev_access_code": "",
            "nozzle_diameter": 0.4
        }
    ]
nuffu commented 10 months ago

@ondrovic I had a very similar experience - after looking at the code, I see that it pulls the IP address from the IP video feed url which is periodically sent as an MQTT message by the devices. However, it may not find it if the IP video feed url is not sent.

Long story short - you may need to activate on the printer itself (X1 Carbons here with Firmware vs 01.07.01.00): "LAN Mode Liveview". It is on Settings/General tab in the UI and was deactivated on my machine.

davglass commented 9 months ago

Sorry for the delay, I didn't see the emails on this. I pushed a new version v1.0.15 that tries to look for the IP in the camera stream ad if it doesn't find it it prompts to manually add it.