Bambu Lab X1 X1C MQTT

I tried to update my flows to current version but have some problem with advanced flow. After importing, ftp flows can’t detect printer ip, password, prefix path etc.
Additionally ha nodes have empty entity fields. Did I missed something?

Might need some more details - the advanced flow uses the IP, password and stuff from the basic flow. Prefix path is generated by the advanced flow but needs the printer name that is provided by the basic flow group - do you have both “flows” within the same flow/tab in NodeRed? This is required as they share flow-scoped variables.

As for the HA nodes, their entity id’s are now passed in by other nodes, dynamically made based on these flow variables for name and such. Makes it so if you edit the variable in the flow-properties it will edit it everywhere.

Would love something like this but for a Prusa.

Just wanted to mentioned here that with X1 firmware 01.07.00.00, a long requested feature is now available (and supported in my NodeRed flows)

The door sensor. You can now finally have a sensor and build automations based on if the chamber door is open or closed.

image
image

3 Likes

Does anyone elses integration have to constantly be re-paired with their printer? My access code hasnt changed, and suddenly it just shows my printer as offline even when I am now actively printing something. It never seems to happen in the middle of a print. I just notice it the next time I go to print something and check the app and see it says offline. I have to then go and put the IP and access code in again (even though neither has changed) and it works again.

I just switched tonight to connecting through the Bambu cloud to see if that helps, but just noticed I then dont get camera view (P1P).

There are known issues with the P1 series if you have multiple things connected to the P1 series local lan MQTT. These include everything from the handy app, bambustudio/orcaslicer, my integrations via nodered, the HACs integration, BLLED, XTouch, the bambu printer discord bot, mqtt explorer etc. Essentially it will stop sending data to devices at random once more than 2 or 3 things are connected, and not always give an offline indication.

Reconnecting usually fixes it because it’s a “new connection” that boots off something else, but it might get booted off again shortly if the others have reconnect logic if they don’t get an update every some time.

Connecting via cloud mqtt will fix it but requires cloud to be on of course. Judging by you mentioning the camera view I assume you’re running the HACs integration?

@WolfwithSword

Yes. I am using the HACS integration. I was first able to habe my P1P in LAN ONLY mode and connect to both the slicer on my desktop and the HACS intgration. Once I updated to latest firmware on the P1P, I could only have 1 connection.

So took the P1P out of LAN ONLY mode, paried it with the handy app again via the cloud. Then uses the acces to code to connect it to the HACS integration.

Then what I said in other post happens. At some point, the HACS integration loses connection. So I just tried connecting the HACS integrations via cloud mqtt, but then saw I have no camera view, which stinks.

Yeah, you might need to make an issue on the HACS integration github then to troubleshoot that.

So I didnt read through all 708 posts in this thread, is what is being done in here NOT through the HACS integration, but just a straight MQTT connection and node red?

So this thread is/was the starting point of exploring the MQTT connection and how to connect to it to HA, best ways etc. Most/all projects including my nodered stuff and the HACs integration came out of here and we do work together often on stuff but no, this thread isn’t specific to any one integration method in particular. Mostly used for info, updates on new stuff, etc.

For the HACs integration, it’s preferred to submit issue requests on its repo on github (ha-bambulab)

For my nodered stuff, either comments on my configurator’s site, discord dms, email or issues on my public repo work

For other integrations and addons, they all have their own issues/ticketing preferences and systems. Most through github issues or discord tickets I think.

@WolfwithSword I found your website and imported the flow. But where do I go in HA to find the entities it created?

Yeah it really sucks that they only allow one connection… I have my HA setup, when I open bambu studio HA stops… and I want to have xtouch together with HA… but that will never gonna work I think…

@WolfwithSword Is this btw the same for X1C or only on P1?

@nappyjim The entities are under the MQTT integration in Devices & Services.

@SMAW The limitation is only for P1 series (and possibly A1 series). X1 series does not have this limitation.

I am currently working on a “hub” to bridge multiple printers to one MQTT broker that should allow third party stuff (I.E., my flows, xtouch, blled, hacs integration etc) to all connect to it instead and it will mirror multiple printers in one device.

I hope to have some more time to work on it over the holidays. It will require some device to run it (RPI for example) as it’s a docker-compose stack of stuff, but it will act as a single connection to each printer, and in turn third party stuff can connect to it instead. There may need to be some work needed on third party stuff in case they use stuff hardcoded like the printer IP, but otherwise it should act as a drop-in replacement.

2 Likes

@SMAW

If you downgrade firmware you can connect multiple on the P1P. But then you obviously lose any fixes present in the newer firmware.

I wonder why they limited it? I hope it has a purpose other than limiting the P1P so that it and the X1 have a greater disparity in features.

Ah, since when was it restricted?

@WolfwithSword
I was already looking for an relay MQTT server. And found : http://www.steves-internet-guide.com/mosquitto-bridge-configuration/

But Bambu Studio will proberbly looking at the server directly, because of UDP broadcast messages (SSDP) … So when starting your bambu studio, your hub will still stop…

already requested at bambu if I can still upgrade to x1c (still in the 30 days of receiving)

Found the reason why I think, and the version where they “broke” it :wink:

P1 series OTA version 01.04.01.00(20230927)

Fixed the printer restart problem caused by continuous reconnection of MQTT using third-party tools.

@SMAW Yeah that’s bridging to one server but lacks complex configuration, and you are correct, BS and handy app go direct to printer (or cloud if remote on handy).

What I’m developing is a bit more “aware”. It’ll pickup printers on the network, store configuration for access codes and such with an interface to manage their connections, work as a repeater for multiple printers but also enrich the payloads a bit with the original printer IP and online/offline statuses. It’ll be much more plug n’ play than a normal bridged broker. Also planning to add to it a REST API and state db later on as an addon, so it can enable development of things that don’t use MQTT.

The hub won’t stop due to this issue necessarily, as the “limit” for P1 series isn’t one device, just more than 2 or sometimes 3 depending on handy app (though I theorize handy app does reconnect attempts constantly, so it’s 2 but a false 3). Theory is, printer is connected to slicer and hub, all good. Everything else that is third party goes to the Hub.

As for the reason they added in the limitation, it appears that someone’s third party tool was abusing the printer’s broker with constant requests and it was causing someone to submit logs to bambu for printer crashes. No clue still which third-party connection caused it, but I can tell you it wasn’t any of the well-known ones currently (HACs, my NodeRed, BLLED, XTouch etc). We all either put in long timers on repeated requests, or don’t make them at all.

It could also have been caused by someone using them all at once too, but they made that change really early into development of some of the well-known third party tools.

But the P1 series (and A1 series) use ESP32 chips, so much less power than the X1 series, hence why it could crash due to being overloaded like that.

Ironically the disparity between the MQTT’s has been becoming less and less with each update until recently. For X1 they just re-enabled the full-status message every second after multiple FW’s of it being like the P1 series’ minor messages.

So with P1 they do less and less messages sending. and upgrading on the X1C haha… Well hope they won’t phase out the whole MQTT, it was a reason for me to for the P1S instead of the X1C, as said I already asked if an upgrade is possible… Please keep us posted about your little project… I’m very interested!

I think I was on 1.02 and I could connect mqtt to my slicer and the HA integration.

Then updated to 1.04.xx and it stopped working and then saw when I went to reconnect it in the integration, a message popped up alerting me that firmware 1.04.xx won’t allow multiple connections.

@WolfwithSword

I don’t see any new entities in mqtt. I still have the HACS integration which used to be MQTT (now cloud). Could that be interfering?

If the printer is idle, should I be seeing “connecting”? Or should I be seeing “connected”? (Dont mind the blue dots. I’m on my cell and accidentally moved everything so now it wants to be deployed again)