Sure! The current full way we’ve come up with here goes as follows:
- Requirements/Assumptions
- Home Assistant is setup
- MQTT broker setup and connected to homeassistant
- Node Red ready to use
2) NodeRed Setup
- NodeRed Palette Requirements
- I think none for just the base flow. Let me know if this isn’t the case.
- Download the first file from here bambu-mqtt.json Node-RED Flow - BambuLab X1 MQTT Relay for Home Assistant MQTT Auto-Discovery · GitHub
- Open it up in a text editor such as NP++ and get ready to do some replace-alls
- The top comment of the gist link has the information you need for replacing. Anytime I update this gist, replacements for that main flow will be edited in that comment, and I will always comment with changes down below linked to a revision number.
- Once all is replaced, import the JSON into NodeRed (top right hamburger menu → Import)
- If your MQTT server for HA has any credentials, you will need to edit them.
- Click on any pinkish/purple MQTT node that is for HomeAssistant (Name probably contains it)
- In the edit for that node, click the edit icon next to the “server”, then enter credentials in the new window, save and close.
I suggest ignoring the second json file in the gist for now, that is for a more complex setup I have that requires PostgresDB, and/or setting up the FTP server connection, hosting an HTTP endpoint etc, and requires more palettes.
3) HomeAssistant Setup
-
Requirements
- MQTT is connected
- If you have the node red flow setup, and the printer is ON, then go to the devices/integrations tab, MQTT, then you should see your printer and all attached AMS units as separate devices if everything is working.
-
Dashboard Yaml
- Requirements
- HACS repos
- card-mod
- lovelace-layout-card
- hui-element
- button-card
- mushroom
- config-template-card
- FontAwesome Icons (to load custom_icons)
- custom-ui* (Maybe, I can’t remember)
- Device Requirements
- Smart Plug/Switch printer is connected to (if not, then can edit the yaml to remove)
- HACS repos
- Download this yaml from the gist Bambu X1C + NodeRed HomeAssistant YAML Snippet · GitHub
- More replacements to do, marked in a comment a bit lower down, but essentially just {PRINTER_NAME}. Replace all cases of it with the LowerCase version of your printer name like in the nodered json. This is for the sensor/entity naming.
- Find {PREVIEW_URL} and remove it + the picture hui-element it’s in. This is only if you have the advanced FTP stuff setup with the second flow.
- Go to the third comment in the gist and download each of the attached images of the AMS and X1C. Save them in the locations in homeassistant mentioned in the comment. (/local/media is /config/www/media for HA structure)
- Create a folder in your homeassistant config called custom_icons (right next to custom_components) and copy this SVG into it. Rename it to filament-1.svg.
- If you have a smart plug for the printer, change the sensor entity to it (replace switch.bambu_printer)
- Requirements
Then just copy and paste the yaml into a new dashboard. Also restart home-assistant after putting in the custom SVG icon. I put the dashboard into a grid layout custom layout dashboard myself, but it’s up to you for any customizing!