doridian / openbambuapi Goto Github PK
View Code? Open in Web Editor NEWBambu API docs
Bambu API docs
Is it possible to get the gcode from the file: /usr/etc/print/filament_unload.gcode ?
I'm uncertain where you were able to get the AMS load and unload macros from, but I was hoping you could access this file as well.
Hi friend, may I know how you analyzed the mqtt request command?
Is there any documentation on the above properties?
I wanted to know exactly how to use the
"ams_mapping" parameter as found here: https://github.com/Doridian/OpenBambuAPI/blob/main/mqtt.md#printproject_file
Alternatively, if a print could be started using the AMS settings when the 3mf file was made, that would be good to know as well.
Wasn't sure where this would fit in the current layout, so I will give my findings here.
In the report print payload for all sensors (or a subset if the P1P as it does not send all unless pushall is invoked), there is the value hms
with an array.
If it contains values, it is as such:
"hms": [
{
"code": "somecode",
"attr": "somecode"
},
{
"code": "somecode",
"attr": "somecode"
}
]
The codes and attributes are not recognizable at first, but can be mapped to errors. Both the code and attr are decimal numbers that when converted to Hex with Two's complement, then append the code after the attr and separate each set of 4 character with an underscore, it will be in the format of Bambu's official HMS code errors as per their website.
Note: Not all hms codes are documented yet.
Here is a snippet of how I convert them in nodered:
function DecimalHexTwosComplement(decimal) {
var size = 8;
var hexadecimal;
if (decimal >= 0) {
hexadecimal = decimal.toString(16);
while ((hexadecimal.length % size) != 0) {
hexadecimal = "" + 0 + hexadecimal;
}
return hexadecimal;
} else {
hexadecimal = Math.abs(decimal).toString(16);
while ((hexadecimal.length % size) != 0) {
hexadecimal = "" + 0 + hexadecimal;
}
var output = '';
for (var i = 0; i < hexadecimal.length; i++) {
output += (0x0F - parseInt(hexadecimal[i], 16)).toString(16);
}
output = (0x01 + parseInt(output, 16)).toString(16);
return output;
}
}
let template = [];
if(msg.payload.print.hms != undefined){
for (var hms_code of msg.payload.print.hms) {
var attr = DecimalHexTwosComplement(hms_code.attr);
var code = DecimalHexTwosComplement(hms_code.code);
let full_code = (attr + code).replace(/(.{4})/g, "$1_");
full_code = full_code.substring(0, full_code.length - 1);
let url = "https://wiki.bambulab.com/en/x1/troubleshooting/hmscode/"+full_code;
template.push({"code": "HMS_"+full_code, "url": url});
}
msg.payload.print.hms = template;
}
"Username: u_{USER_ID}, where the user id can be grabbed by cracking your own {ACCESS_TOKEN} (which is a JWT) and reading its preferred_username field."
If the access token is coming from a call to https://api.bambulab.com/v1/user-service/user/login using the bambu lab user name (email) and password - can the username field of u_{USER_ID} be predicted?
Until a few days back (around when the latest X1 firmware update dropped), the user name was ignored but now a correct auth token is rejected with access denied so it seems they've started enforcing access with the correct user name.
Hi, the Bambu Lab P1P printer I have is locked in the Chinese region. So you can set the China Handy app and Bambu Studio area only in China and use it. When I try to use the global app, REGION_ERROR comes up. To solve this problem, I am thinking of doing a flash with global firmware on the condition that I do not manage it with serial. There was no progress because I couldn't get the software, but I was able to get the software url through the Cloud/MQTT information you uploaded. Thank you
I tried firmware globally through MQTT upgrade.start request through Fake in a simple way.
{
"upgrade": {
"sequence_id": "0",
"command": "start",
"src_id": 1,
"url": "https://public-cdn.bambulab.cn/upgrade/device/C11/01.05.01.00/product/f7faad4e47/ota-p003_v01.05.01.00-20240104183353.json.sig",
"module": "ota",
"version": "01.05.01.00"
}
}
...cdn.bambulab.com in url part...this global cdn.bambulab.cn is url in china domestic. com / cn difference. I tried to update it by forcing it to com, but the update was successful and also the latest perm, but still not installed in global version. ah i think i can force esp32 flash. if there is any information that can help me, please share it my friend
pushing.pushall
Unknown, probably a request for the printer to report its full status
Request
{
"pushing": {
"sequence_id": "0",
"command": "pushall"
}
}
Report
No response, pushes a bunch of mc_print type reports if the printer has any in queue
On a P1P this pushes the full data that the X1 gets on every MQTT payload update. On the P1P the normal payload update is just a delta containing only the changed values. The pushall causes the full state payload to be sent to allow proper initialization after connection.
The P1P no longer generates mc_print type reports by default. The pushall command does not cause them to be sent nor did it appear to have any effect on them being sent back when the P1P was pushing them out by default.
Hi friend, Is there a way to get the Bambu Lab printer software address actively? Without using Mqtt, Http, the P1P reference otaurl is as follows, but in order to get the firmware according to the printer model name, it seems to be the detailed model name of the next product ID ota- next printer. Do you have any good ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.