My Bambu Lab X1C Dashboard & Automations

I attempted to replicate the functionality of the Bambu Handy app within Home Assistant, to the extent feasible. However, work has gone a bit stale. So, I figured I might as well share what I have so far.

Preview:

Code:

https://gist.github.com/bbbenji/69e742803b1e0841909854e84cb6612a

Requirements:


Automations:

  • Toggle an external light from the X1C screen
  • Turn off the internal X1C light when a print finishes
  • Send notification when X1C encounters error

Code:

https://gist.github.com/bbbenji/2c73261e7de41b05ac9a27947350f07f

9 Likes

Thanks for the code, pretty easy to install.
only problem I have is the camera, it doesnt show up :confused:

tried this amazing tutorial, tried all the suggestions, but still no feed.
https://www.wolfwithsword.com/bambulabs-x1c-camera-in-home-assistant/

1 Like

No need to follow that guide as the ha-bambulab integration already exposes the video feed. However, it is a bit flaky. I had issues with it for weeks, then suddenly it started working for me reliably. I’ve read others still have issues with the camera. YMMV

Thanks for the code, this is awesome!

I was also having some issues with the camera feed not working reliably, but might try again after updating the firmware and integration to the latest versions.

Great Code!

Unfortunately, the camera doesn’t work for me either. Does anyone here already have a solution?

I have a P1S and I don’t have a camera entity created but I do get an image entity from the Bambu Labs integration so I used a Picture card to display the image and it updates like every second.

1 Like

That’s great! I’m gonna study to do something similar, for the moment I’ve just tried the camera for my X1C and it doesn’t work.

first of all this is great and clean. thanks for sharing!

i’m wondering if anyone knows if we can make a snapshot of the image entity exposed by the official integration? i’ve been trying to get an image preview on ios notifications for this but because its an ‘image’ entity and not ‘camera’ i can’t seem to work it out

I finally manage to make it works with WebRTC using go2rtc (and optionally with Frigate)

EDIT: and it DOES NOT require “LAN Only Mode”

Here is go2rtc/frigate config & printer config :

go2rtc config file :

bambulab:
- ffmpeg:rtsps://bblp:[email protected]/streaming/live/1
  #replace 888888 by yours local/LAN access code
  #replace 192.168.0.246 by yours Bambulab LAN(local net) IP

IMPORTANT NOTE ::

I HAD TO refresh my (LAN) access code using the menu button on printer to make the camera works :
image

Before refreshing it, I did not managed to make the camera works reliably works.

Now the integration works well and I got a webRTC Bambulab cam happy! :slight_smile:

Some more information for Frigate :

frigate.yaml :

go2rtc:
  streams:
    bambulab:
    - "ffmpeg:rtsps://bblp:[email protected]/streaming/live/1"

cameras:
  bambulab:
     ffmpeg:
       hwaccel_args: preset-rpi-64-h264
       inputs:
       - path: rtsp://192.168.0.90:8554/bambulab
         input_args: preset-rtsp-restream
         roles:
         - record

Now I need to find a coral model for spaghetti detection :upside_down_face:

More seriously, it could be really great in conjonction with frigate HA cards from @dermotduffy : https://github.com/dermotduffy/frigate-hass-card

  • Can slide between différents camera
  • Can easily zoom
  • Can take snapshot
  • Easy full screen or PIP camera mode
  • Nearly zero latency (thanks to go2rtc @AlexxIT )
  • etc… etc…