Bambu Lab X1 X1C MQTT

By the way, you should be able to remove the outlines cards you have overlaying with card-mod and some css like

ha-card {
        border: none !important;
        box-shadow: none !important;
}
1 Like

Thank you for the hint @WolfwithSword
Look nice now ā€¦ :slight_smile:

1 Like

like this, willing share the code for it? like the status and fans

THANKS!!!
I couldnt figure out how to get those pesky borders gone. So much better now.

Still working on it and have already moved stuff around since I posted. Once Iā€™m done, Iā€™ll be happy to share.

If you want to play around in the meantimeā€¦

  • The fans are mushroom card fan cards
  • The oval status items are mushroom chips cards
  • The spinning spools in the AMS are mushroom template cards with card_mod handling the rotations
2 Likes

Hello all together,
is there a way to query how much material was printed in the current job at runtime? Like in Klipper?
That would still be interesting for me.

Not as a running amount, but if you use my advanced FTP flow once you start a print, assuming it can get the name from the sd card (premade stuff with custom 3mf names like the orcaslicer cube donā€™t work) it will download the 3mf file from the printer, extract the contents and give you the total material the print will consume if completed. Not the best but better than nothing.

I am considering extending this and parsing the gcode file line by line and matching to the layer number to see if I can somehow get a running amount based on layer height, but weā€™ll see.

It could be really useful to link that to the GitHub - Donkie/Spoolman: Keep track of your inventory of 3D-printer filament spools. projet. :heart_eyes:
We could have a specific workflow when we add a spool, it will ask to scan a QR Code and register the spool id with the trayId.
After that, It will possible to update the remain filament stock.

Yeah a few people Iā€™ve talked to had similar ideas with custom inventory systems, as did I. The main caveats being in a failed or cancelled print thereā€™s not a real way to know exactly what was used, and that gets trickier for multi filament prints.

One thing we were considering was for filaments you want to track, have a custom ID and put it as a gcode comment in the filament start gcode, then when print starts, download the 3mf file, extract gcode file, and link up the filament id to some other system and calculate amounts. It may be possible to calculate this based on layers so it will be semi-realtime and not have the failed/cancelled issues, but requires the user to have a unique filament profile + id for each they want (which means if you care about stock of different colours, a different profile in bambustudio per colour, unless you then separate by hex colour which brings a lot of other complications into the mix).

Registering a spool id to a tray id can work but can be tedious if you swap often (unless the scan and update is very automated). Would need two steps - one to scan the spool, and one to scan or insert what slot it is going in (external spool, or one of the ams trays (0-3) but also which ams in case of multiple).

Definitely something I want to eventually look into, just a lot of problems to solve properly first :laughing:

Exactly :slight_smile:
Great work by the way :muscle:

1 Like

Did a new update (2.0.2 of basic flow and adv ftp flow) with some bug fixes as well as reorganization. One thing that may be helpful for automations is I reworked how HMS ā€œErrorsā€ come up now.

Iā€™ve found some logic to derive the severity level of the HMS code in question and now have split each level into a separate sensor (and HMS Notifications being the count of all notifications combined, attributes being them split up as counts). Each severity levelā€™s attributes will be information about the error such as the code, url, description and module if applicable.

image

Should treat Serious and Fatal as errors, but Common and Info may not be needed. For example, during first layer inspection it creates a ā€œCommonā€ HMS notification, so not necessarily an error.

Unknown is for anything that failed parsing or is just unknown even by Bambu, so maybe treat it as errors but I have yet to actually find anything that creates it.

Oh and also in the 2.0.2 update, I made my dashboard yamlā€™s configurable for the HACS Integration as well with some minor modifications. During configuration there will be a dropdown asking if youā€™re using the nodered/mqtt stuff, or the hacs integration now.

2 Likes

@dava4 , sorry I took so long. I forgot that I promised to post the yaml for this. Iā€™ve customized it heavily for my use case so thereā€™s probably quite a bit that you can remove or edit for your particular setup. I posted the yaml to my gitub here.

This is a Gif of my current config. My changes were designed to give me as much usable info that would fit on my phone without looking too cluttered and without scrolling.

SmartSelect_20230820_143653_Photos

I also edited the P1S and AMS pictures as well. I can add these to the github but Iā€™m not sure if @WolfwithSword would be ok with that. Let me know if I can and how I would attribute your work properly. Pictures can be found in the github as well. Thanks @WolfwithSword for allowing me to share.

Below are the changes I made and the custom cards you would need for my version:

  • Edited both photos
    AMS pic - made all the filament spools look the same (lighter)
    P1S pic - removed picture of ptfe tubing at the top

  • Uses the following custom cards

    • HACS Integration
      browser_mod
    • HACS frontend
      mushroom cards
      card-mod
    • Not required
      Hass Hue Icons(used for AMS spool icons. you can change to any mdi icon if preferred)
      frigate-card (only needed for my external camera pop)
  • 2 input_boolean helpers

    • one to show/hide the stop,pause,play print buttons (input_boolean.3d_printer_print_controls)
    • one to show/hide my air quality sensor (Govee) (input_boolean.3d_printer_aq_toggle)
2 Likes

Feel free to use the photos as much as you want - after all, I just took the stock photos Bambu has for them and edited them a fair bit. If you want just link back to my site or github of my stuff.

And honestly looking at the AMS one I might actually use that one too :laughing: I just made the spools black&white and never bothered to sync them, should help with consistency.

1 Like

Thanks. I updated my post to point to the location where the pics and yaml are stored and added a Readme that points to your dashboard template. I donā€™t use your nodered flows but the Hacs Bambu integration, so I posted a link to that github (to avoid possible confusion). They seem tp provide pretty much the same data anyway.

1 Like

Yep itā€™s mostly the same data. The nodered stuff is more or less like a ā€œbleeding edgeā€ version with a lot of additional sensors, control and logic, which eventually we put into the HACS one. Some stuff canā€™t though and vice versa but we try to get parity over time.

Fun fact I did recently update the dashboards on my site to be configurable for the hacs one too :laughing:

Speaking of, the new logic I have for hms parsing, descriptions and severity issues would be good to add there soon.

thanks guys @stephack and @WolfwithSword for the work on this. Will have look this evening just getting back to this.

Looks like something may have changed - just got a P1P a week ago and looks like there isnā€™t a MQTT port:

Nmap scan report for 192.168.0.60
Host is up (0.016s latency).
Not shown: 998 closed tcp ports (reset)
PORT     STATE SERVICE
990/tcp  open  ftps
6000/tcp open  X11
MAC Address: ##:##:##:##:##:## (Espressif)

Nmap done: 1 IP address (1 host up) scanned in 2.00 seconds

Jep, they changed port from opened 1883 to secured 8883 couples months ago.

Yeah as @Szaman said, the security update for both printers was much earlier in the year, so the MQTT is now over 8883 (and ftps is over 990). Additionally, both have credentials of bblp for the user and lan access code as the password.

Got it. Do I have to change any other settings in MQTT Explorer to get the ā€œsecuredā€ port to work? Iā€™ve tried turning on ā€œvalidate certificateā€ & ā€œtls encryptionā€ to no avail