greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers
1.04k stars 92 forks source link

Home Assistant and any Slicer will not run simultaneously with P1P #308

Closed Darthmonkey closed 11 months ago

Darthmonkey commented 11 months ago

Describe the bug

When the P1P is connected to a slicer, it's unable to read any information until the slicer is closed, sometimes only until it's restarted. After a restart, the printer can be read by HA, but stops as soon as a slicer is connected. Occasionally, after a print, the slicer cannot connect to the printer while HA is reading it, unless it's recently been rebooted.

The P1P is in LAN only mode, the camera plugin has never worked in any situation. I haven't done hours of research into this, but it may be pertinent to mention as it's also dependant on an exclusive connection.

It may also be pertinent to note that while attempting to fix a similar issue with one PC preventing connection by another PC, factory resets were done, and the printer was updated to the latest firmware via the Bambu Handy app (even though the slicers didn't seem to think it needed an update).

To Reproduce

  1. Reboot the printer to start fresh - the printer is in LAN Only mode.
  2. Ensure that the Wi-Fi signal is updating every few seconds in HA
  3. (optional) Open Performance Monitor in Windows, and then open a slicer (Orca or Bambu do the same, I'm using Orca)
  4. In Orca-slicer click Device, and then the printer, and wait for it to connect.
  5. (optional) Check Performance Monitor for Remote ports 6000 and 8883, both should be running on the remote address of the printer, along with some 51000 ports.
  6. Check HA, and note that the Wi-Fi signal has not updated for as long as the slicer has been open, in my case 7 mins.
  7. Close the slicer
  8. (optional) note that Performance Monitor closes the open connections,
  9. Note the HA Wi-Fi signal starts reading again every second or two.

Expected Behaviour

The slicer and HA connections should be able to run simultaneously. This is a new occurrence as previously I was able to get the progress of the printer while it was printing and (I believe although this is untested) the slicer was open.

What device are you using?

P1P

Diagnostic Output

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.12.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "armv7l",
    "timezone": "Australia/Perth",
    "os_name": "Linux",
    "os_version": "6.1.58-haos-raspi",
    "supervisor": "2023.11.6",
    "host_os": "Home Assistant OS 11.2",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "fronius_inverter": {
      "version": "v0.9.8",
      "requirements": []
    },
    "smartir": {
      "version": "1.17.8",
      "requirements": [
        "aiofiles>=0.6.0"
      ]
    },
    "bambu_lab": {
      "version": "1.9.2",
      "requirements": []
    },
    "bureau_of_meteorology": {
      "version": "1.1.21",
      "requirements": [
        "iso8601"
      ]
    },
    "multiscrape": {
      "version": "6.5.0",
      "requirements": [
        "lxml==4.9.1",
        "beautifulsoup4==4.11.1"
      ]
    },
    "sonoff": {
      "version": "3.5.3",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "weatherdotcom": {
      "version": "1.1.3",
      "requirements": []
    },
    "solar_optimizer": {
      "version": "3.0.0",
      "requirements": []
    },
    "meross_lan": {
      "version": "4.4.1",
      "requirements": []
    },
    "robovac": {
      "version": "1.0.0",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "bambu_lab",
    "name": "Bambu Lab",
    "codeowners": [
      "@greghesp",
      "@AdrianGarside"
    ],
    "config_flow": true,
    "dependencies": [
      "device_automation",
      "mqtt",
      "ffmpeg"
    ],
    "documentation": "https://github.com/greghesp/ha-bambulab",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/greghesp/ha-bambulab/issues",
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "1.9.2",
    "is_built_in": false
  },
  "data": {
    "push_all": null,
    "get_version": null
  }
}

Log Extracts

No response

Other Information

No response

AdrianGarside commented 11 months ago

See #174