GithubHelp home page GithubHelp logo

openbambuapi's People

Contributors

cryptiklemur avatar davglass avatar doridian avatar mich21050 avatar mkosmo avatar nicolasff avatar the-simple-mark avatar wolfwithsword avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openbambuapi's Issues

/usr/etc/print/filament_unload.gcode

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.

P1P Local Mqtt mode set ca certificate?

I set mqtt 'tls' in JavaScript, but a 'self-signed certificate in certificate chain' error occurs. In the same situation, should the cloud mqtt mode define a ca certificate separately for normal connection? If so, can I get the ca authentication key?

image

[Feature Request] HMS Code mapping

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;
}

Is there an easier way to get the user name?

"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.

Firmware Flash

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

Pushall

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.