New JSON response on M408 S2 status

  • Hi, I noticed little issue with JSON responses on M408 S2 and M408 S4 with new firmware (2.01+). I am parsing these responses and noticed that it stopped getting me 'heads' temperatures after firmware upgrade. It was working all the time for at least one year now, last working firmware is 2.01beta2(RTOS) (2018-07-14b5). I could not find any details on this in documentation, so no idea if its feature or bug - and if I should rewrite my parser or it will be fixed 🙂

    I am going to show you those responses for better understanding - same config:

    old: M408 S2

    new: M408 S2

    • you can see its missing "heads":{"current":[30.6],"active":[30.0],"standby":[0.0],"state":[2]}

    My current firmware (where its not working):
    Firmware Version: 2.01(RTOS) (2018-07-26b2)
    WiFi Server Version: 1.21
    Web Interface Version: 1.22.3

    • newest RC tested: not working either

    Last working firmware (I just downgrade today for testing):
    Pre-release Firmware Version: 2.01beta2(RTOS) (2018-07-14b5)
    .. and previous

    So the question is "new" JSON the new constant or still variable? Or just bug?
    Thank you so much for support.

    If you have any questions about this behaviour feel free to ask.
    Thanks, David.

    Btw thank you for fixing the M112 🙂

  • administrators

    The "heads" field has been deprecated for a long time and far before the 2.xx firmware releases. It was removed several versions ago. Instead of "heads" the web interface now uses "tools.*.heaters" (from M408 S3), "temps.current" and "tools.[active|standby]" (M408 S2).

  • Ok, thank you. Can you please just confirm the pattern of that JSON. It looks that in that "current" json array the first one is "bed", second one "heater" and third is "chamber".
    I find it little inconvenient, because right know I don't know what happen if I will add another heater. It will be:
    a) "current":[bed,heater1,heater2,chamber,2000.0,2000.0,2000.0,2000.0]
    b) a) "current":[bed,heater1,chamber,heater2,2000.0,2000.0,2000.0,2000.0]

    and what if I will have printer without chamber?
    c) "current":[bed,heater1,2000.0,heater2,2000.0,2000.0,2000.0,2000.0]
    d) "current":[bed,heater1,heater2,2000.0,2000.0,2000.0,2000.0,2000.0]

    Before I knew exactly what is what because there were:

    Thank you, I am just trying to figure out parser that will work for most of my use cases. Thanks 🙂

  • administrators

    @david The "current" field holds the current temperatures of all the configured heaters including bed+chamber heaters. You need to have a look at the tools.*.heaters arrays to get the corresponding indices for the "current" field (type 2). Bed and chamber still provide separate "current" fields for the temperature so you don't need to worry about that. See for futher details.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.