Adding the Bambu Lab X1C to Home Assistant

Since setting up my pair of Bambu Labs X1 Carbons, I’ve been itching to get the data off the onboard computer and into home assistant. I don’t need Home Assistant to control the machine, but being able to monitor it and notify me of anything is absolutely something I want (and maybe turn on air filters when they’re running or other actions).

I first started looking into integrating the printers with home assistant shortly after getting them, however it looked a bit complex for my knowledge of MQTT networks. Today however there is a convenient HACS package that takes care of it with 3 simple inputs. Install the HACS package and we can get to setting it all up.

Setting up the Integration

Setting up the integration is simple and straight forward. The integration needs just 3 pieces of info from the printer, the pin, serial number, and IP address. The serial number and IP can be found via the app, but the pin can only be found on the printer itself going through the settings menu (the settings menu also has the IP and serial number too).

Dashboards

I created a new dashboard for my printers and added some initial data to it. I used entity cards to add some basic information from each printer including time remaining, various temperatures, AMS humidity and print status. These I thought would be useful for monitoring the printers and making sure they were continuing their prints without issues.

Basic data on the dashboard

In the future, I’ll remake the dashboard with conditional cards to show the right data at the right time (or as close to it as I can logic out), as well as the debug information that is provided by the printers, but for now this covers my main use case.

Diagnostic Data

I did notice that diagnostics data is included in the MQTT data that the printers provide. This data includes all the same information as the screens for any problems, potential solutions, and links to the wiki pages on the problems as well.

To add this data to a dashboard, you’ll need to add a template sensor or some scripting to pull the data. I haven’t done this yet but will certainly add it to my blog once I have.

Cameras

The integration even supports showing the cameras on your home attention dashboard. This requires one option to be enabled on the printer itself. This is the “LAN Mode Liveview” option in the general settings page. Once this is selected, the integration can begin to view the cameras live.

General Settings

Though this can still be a bit flaky just like the app at times. As shown below, only one of my printers cameras is shown in the dashboard while the other one failed to load.

Camera Shown in Home Assistant

Automations

I wanted to make some automations for notifying myself when the print was complete. I also plan on adding notifications for other types of print errors as well in the future. Starting with the print finished notification though, was simple enough, the main hiccup I ran into was it triggering unnecessarily which introduced me to the not_from option.

Trigger conditions for my notification

After triggering, the automation sends a simple notification via ntfy.sh to my phone. This has been working well and it’s triggered shortly after the print finishes.

Conclusion

I need to spend some time tuning my automations and dashboards further, but I’m still happy with the functionality that I’ve gained with the integration. I do wish the integration could provide the video feeds from the printers as well, however I know that’s limited by the proprietary stream that bambu is using, not the integration. I still hope that functionality comes around at some point in time. I have had some troubles with getting notifications from the bambu handy app, so I want to get this to a state where it can replace the app on the 90% use case, and that way I won’t need that extra app installed (though I don’t get me wrong, the app works fine other than the notifications and I don’t mind using it).

Resources

Leave a Reply