greghesp / ha-bambulab

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

[Bug] Cannot load A1 camera feed #770

Open sxdjt opened 5 days ago

sxdjt commented 5 days ago

Home Assistant Version

2024.11.2

Bambu Lab Integration Version

2.0.38

Describe the bug

When trying to use the camera feed to show an image in Home Assistant, a broken-image icon is all that I get.

Debug logs show a blocking Python call:

2024-11-20 14:02:19.377 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/cloudscraper/user_agent/browsers.json', 'r') inside the event loop by custom integration 'bambu_lab' at custom_components/bambu_lab/pybambu/bambu_cloud.py, line 133: scraper = cloudscraper.create_scraper() (offender: /usr/local/lib/python3.12/site-packages/cloudscraper/user_agent/__init__.py, line 74: with open(os.path.join(os.path.dirname(__file__), 'browsers.json'), 'r') as fp:), please create a bug report at https://github.com/greghesp/ha-bambulab/issues

To Reproduce

  1. Create a Home Assistant image card with the specified URL/token from Dev Tools
  2. See the broken image icon

Expected Behaviour

A rendered picture of my print bed.

What device are you using?

A1

Diagnostic Output

Attachments aren't working, will upload separately.

Log Extracts

No response

Other Information

No response

sxdjt commented 5 days ago

home-assistant_bambu_lab_2024-11-20T22-02-26.535Z.log

cinghialino commented 14 hours ago

I was having the same issue, until I discovered that my router had changed the internal IP address of my printer, and while it was picking up the other sensors, the camera wouldn't be available. I since then have updated the configuration in home assistant (and made sure to assign a static IP to my printer) and the problem went away.