DutchDevelop / BLLEDController

Other
94 stars 26 forks source link

Deserialize error while parsing mqtt #19

Closed CreasaBE closed 5 months ago

CreasaBE commented 8 months ago

Hi,

I'm getting an error "Deserialize error while parsing mqtt" in the console. Light and printing status are not replicated to the board. Logs also contain

Mqtt message received, FreeHeap: 9224 stg_cur not in message lights_report not in message

I have the same issue using STABLE and EXPERIMENTAL firmware. The access code is correct as HomeAssistsant is using the same MQTT connection to the printer and the status and controls there are working fine

phranck commented 7 months ago

Same here. Installed latest firmware, configured it and it doesn't work. This is what I get:

: 1728 stg_cur not in message
lights_report not in message
Mqtt message received, FreeHeap
: 1728 stg_cur not in message
lights_report not in message
Mqtt message received, FreeHeap
: 1728 stg_cur not in message lights_report not in message
phranck commented 7 months ago

This is pretty disappointing. It's the first time I've installed and set up a BL LED controller, and now that thing doesn't work. 😟

DutchDevelop commented 7 months ago

Please join the discord and give us more information there.

phranck commented 7 months ago

I don't use Discord. However, THIS is the place to discuss problems and issues. It's transparent to anyone.

So, what informations do you need?

CreasaBE commented 7 months ago

Please join the discord and give us more information there.

No sorry, but I don't use discord and already have enough chat clients to follow. Discord is also not a support or issue tracker tool.

Since your project is on Github, the issues are to be tracked on github. Tell us what you need for information and we will supply it here.

DutchDevelop commented 7 months ago

Update to experimental, enabling the log mqtt option and show your logs.

CreasaBE commented 7 months ago

Just updated to 10 1 24 experimental (full erase & reconfigure) below the logs:

It appears that it sees the MQTT as empty, but as HomeAssistant&NodeRed can still read & control the printer through MQTT, this does not seem like a printer issue

Mqtt message received,
FreeHeap: 
8768
Mqtt payload:

{}
stg_cur not in message
lights_report not in message
Mqtt message received,
FreeHeap: 
8768
Mqtt payload:

{}
stg_cur not in message
lights_report not in message
Mqtt message received,
FreeHeap: 

8768
Mqtt payload:

{}
stg_cur not in message
lights_report not in message
DutchDevelop commented 7 months ago

If you are using a P series printer and have more than one thing connected to the printer with mqtt that will cause a problem because one device won't receive mqtt, that's why some users had issues when using the blled with xtouch. Also i noticed that cur_stg has changed. I got a p1 on the way to check it for my self

CreasaBE commented 7 months ago

Should have added the model of my printer sorry, it's an X1C

DutchDevelop commented 7 months ago

Odd. The x1 series dumps all information at once unlike p1p which only sends small pieces. How many amses do you have? And can you post a mqtt payload from mqttexplorer?

CreasaBE commented 7 months ago

I have 1 AMS. I can post a packet payload if you give me the payload to send

roscog commented 7 months ago

what firmware is the x1c running, is that the latest or a previous version? they changed how it reports in the version 1.7+

phranck commented 7 months ago

Same config for me with same results:

CreasaBE commented 7 months ago

Same config for me with same results:

* X1C

* 1 AMS

* latest firmware installed (01.07.01.00)

* tried latest experimental, too

same for me, same firmware tried latest experimental - no change tried previous stable - no change

It does seem that although I flash a new version from the web interface that the version is not flashed to the controller. I don't see the controller rebooting in the console. But that should not be related to the current MQTT issue

phranck commented 7 months ago

Well, for me it really flashes the controller. After flashing the value for Firmware Version changes.

Xnapper-2024-01-12-10 46 12
roscog commented 7 months ago

Are yours controller on the same network as the printer, no vlans here in place. I found that my controller doesn't like vlans.

phranck commented 7 months ago

Yap. All in one network.

roscog commented 7 months ago

And requesting the information with mqtt Explorer works?

If so this is a software issue something I don't have the knowledge to fix, so that's up to Dutch developer.

phranck commented 7 months ago

Btw, unrelated side note: I made a new "case" for the controller. 🤓

https://collaborate.shapr3d.com/v/E2pLaKf1ffTekUtZHoaA9

roscog commented 7 months ago

Fancy looks very clean might have to print one

phranck commented 7 months ago

And requesting the information with mqtt Explorer works?

Do you mean this one?

image

roscog commented 7 months ago

And requesting the information with mqtt Explorer works?

Do you mean this one?

image

Yesif you put the user name and lan code there it should be able to see the data from. The printer if that doesn't show anything something else is wrong

Validate certificate is off and tls is should be on

phranck commented 7 months ago

Username is "access code" and password is "Serial ID"? Host is the ip address of the printer or controller?

roscog commented 7 months ago

Username bblp password is the lan code

CreasaBE commented 7 months ago

that combination does not seem to work for in MQTT explorer image

machine and controller (and HA) all on the same vlan indeed

phranck commented 7 months ago

Same here

image

roscog commented 7 months ago

Enable encryption (tsl)

roscog commented 7 months ago

And put in the fill ip assuming you didn't do so

CreasaBE commented 7 months ago

enabling TLS with Certificate check gets an connection refused ECONNREFUSED without certificate check returns to disconnected

phranck commented 7 months ago

enabling TLS gives me the same error as before

roscog commented 7 months ago

Ahh i forgot the port it's 8883 just cheched for myself sorry bout that

phranck commented 7 months ago

Now it worx!

roscog commented 7 months ago

If you then click on device and the serial number on the right side it should output the topic (data) of the printer of it does that, Dutch developer needs to look at this since it's a problem. With his code then and I don't know how to code.

CreasaBE commented 7 months ago

yep, that did the trick indeed :D


{
  "print": {
    "ams": {
      "ams": [
        {
          "humidity": "3",
          "id": "0",
          "temp": "26.6",
          "tray": [
            {
              "bed_temp": "35",
              "bed_temp_type": "1",
              "cali_idx": -1,
              "cols": [
                "FFFFFFFF"
              ],
              "ctype": 0,
              "drying_temp": "55",
              "drying_time": "8",
              "id": "0",
              "nozzle_temp_max": "230",
              "nozzle_temp_min": "190",
              "remain": 86,
              "tag_uid": "FD582BF400000100",
              "tray_color": "FFFFFFFF",
              "tray_diameter": "1.75",
              "tray_id_name": "A00-W1",
              "tray_info_idx": "GFA00",
              "tray_sub_brands": "PLA Basic",
              "tray_type": "PLA",
              "tray_uuid": "9F1D63BA8D9E409D850BEBCD129D6B7B",
              "tray_weight": "1000",
              "xcam_info": "34218813F401E8030000003F"
            },
            {
              "bed_temp": "0",
              "bed_temp_type": "0",
              "cali_idx": -1,
              "cols": [
                "FCECD6FF"
              ],
              "ctype": 0,
              "drying_temp": "0",
              "drying_time": "0",
              "id": "1",
              "nozzle_temp_max": "240",
              "nozzle_temp_min": "190",
              "remain": -1,
              "tag_uid": "0000000000000000",
              "tray_color": "FCECD6FF",
              "tray_diameter": "0.00",
              "tray_id_name": "",
              "tray_info_idx": "GFA00",
              "tray_sub_brands": "",
              "tray_type": "PLA",
              "tray_uuid": "00000000000000000000000000000000",
              "tray_weight": "0",
              "xcam_info": "000000000000000000000000"
            },
            {
              "bed_temp": "45",
              "bed_temp_type": "1",
              "cali_idx": -1,
              "cols": [
                "000000FF"
              ],
              "ctype": 0,
              "drying_temp": "55",
              "drying_time": "8",
              "id": "2",
              "nozzle_temp_max": "230",
              "nozzle_temp_min": "190",
              "remain": 53,
              "tag_uid": "1D175AF300000100",
              "tray_color": "000000FF",
              "tray_diameter": "1.75",
              "tray_id_name": "A00-K0",
              "tray_info_idx": "GFA00",
              "tray_sub_brands": "PLA Basic",
              "tray_type": "PLA",
              "tray_uuid": "0B8DBDC0E3F743D8B143C443F9431A32",
              "tray_weight": "1000",
              "xcam_info": "803E803EE803E803CDCC4C3F"
            },
            {
              "bed_temp": "80",
              "bed_temp_type": "1",
              "cali_idx": -1,
              "cols": [
                "000000FF"
              ],
              "ctype": 0,
              "drying_temp": "80",
              "drying_time": "8",
              "id": "3",
              "nozzle_temp_max": "270",
              "nozzle_temp_min": "240",
              "remain": 100,
              "tag_uid": "10C8DE5E00000100",
              "tray_color": "000000FF",
              "tray_diameter": "1.75",
              "tray_id_name": "B00-K0",
              "tray_info_idx": "GFB00",
              "tray_sub_brands": "ABS",
              "tray_type": "ABS",
              "tray_uuid": "27602B139E6144E2B3FBBFC28DED0FFA",
              "tray_weight": "1000",
              "xcam_info": "803E1027E803E8033333333F"
            }
          ]
        }
      ],
      "ams_exist_bits": "1",
      "insert_flag": true,
      "power_on_flag": true,
      "tray_exist_bits": "f",
      "tray_is_bbl_bits": "f",
      "tray_now": "255",
      "tray_pre": "255",
      "tray_read_done_bits": "f",
      "tray_reading_bits": "0",
      "tray_tar": "255",
      "version": 232
    },
    "ams_rfid_status": 0,
    "ams_status": 0,
    "aux_part_fan": true,
    "bed_target_temper": 0,
    "bed_temper": 21,
    "big_fan1_speed": "0",
    "big_fan2_speed": "0",
    "cali_version": 0,
    "chamber_temper": 27,
    "command": "push_status",
    "cooling_fan_speed": "0",
    "ctt": 0,
    "fail_reason": "0",
    "fan_gear": 0,
    "filam_bak": [],
    "force_upgrade": false,
    "gcode_file": "",
    "gcode_file_prepare_percent": "0",
    "gcode_start_time": "0",
    "gcode_state": "IDLE",
    "heatbreak_fan_speed": "0",
    "hms": [],
    "home_flag": 6409608,
    "hw_switch_state": 0,
    "ipcam": {
      "ipcam_dev": "1",
      "ipcam_record": "enable",
      "mode_bits": 2,
      "resolution": "1080p",
      "rtsp_url": "rtsps://x.x.x.x:322/streaming/live/1",
      "timelapse": "disable",
      "tutk_server": "disable"
    },
    "job_id": "",
    "layer_num": 0,
    "lifecycle": "product",
    "lights_report": [
      {
        "mode": "on",
        "node": "chamber_light"
      },
      {
        "mode": "flashing",
        "node": "work_light"
      }
    ],
    "maintain": 3,
    "mc_percent": 0,
    "mc_print_error_code": "0",
    "mc_print_stage": "1",
    "mc_print_sub_stage": 0,
    "mc_remaining_time": 0,
    "mess_production_state": "active",
    "net": {
      "conf": 16,
      "info": [
        {
          "ip": 2332033546,
          "mask": 16777215
        },
        {
          "ip": 0,
          "mask": 0
        }
      ]
    },
    "nozzle_diameter": "0.4",
    "nozzle_target_temper": 0,
    "nozzle_temper": 25,
    "nozzle_type": "hardened_steel",
    "online": {
      "ahb": false,
      "ext": false,
      "version": 7
    },
    "print_error": 0,
    "print_gcode_action": 0,
    "print_real_action": 0,
    "print_type": "",
    "profile_id": "",
    "project_id": "",
    "queue_est": 0,
    "queue_number": 0,
    "queue_sts": 0,
    "queue_total": 0,
    "s_obj": [],
    "sdcard": true,
    "sequence_id": "2021",
    "spd_lvl": 2,
    "spd_mag": 100,
    "stg": [],
    "stg_cur": -1,
    "subtask_id": "",
    "subtask_name": "",
    "task_id": "",
    "total_layer_num": 0,
    "upgrade_state": {
      "ahb_new_version_number": "",
      "ams_new_version_number": "",
      "consistency_request": false,
      "dis_state": 0,
      "err_code": 0,
      "ext_new_version_number": "",
      "force_upgrade": false,
      "idx": 7,
      "message": "",
      "module": "null",
      "new_version_state": 2,
      "ota_new_version_number": "",
      "progress": "0",
      "sequence_id": 0,
      "sn": "00M09A341900450",
      "status": "IDLE"
    },
    "upload": {
      "file_size": 0,
      "finish_size": 0,
      "message": "Good",
      "oss_url": "",
      "progress": 0,
      "sequence_id": "0903",
      "speed": 0,
      "status": "idle",
      "task_id": "",
      "time_remaining": 0,
      "trouble_id": ""
    },
    "vt_tray": {
      "bed_temp": "0",
      "bed_temp_type": "0",
      "cali_idx": -1,
      "cols": [
        "FFFFFFFF"
      ],
      "ctype": 0,
      "drying_temp": "0",
      "drying_time": "0",
      "id": "254",
      "nozzle_temp_max": "240",
      "nozzle_temp_min": "190",
      "remain": 0,
      "tag_uid": "0000000000000000",
      "tray_color": "FFFFFFFF",
      "tray_diameter": "0.00",
      "tray_id_name": "",
      "tray_info_idx": "GFL99",
      "tray_sub_brands": "",
      "tray_type": "PLA",
      "tray_uuid": "00000000000000000000000000000000",
      "tray_weight": "0",
      "xcam_info": "000000000000000000000000"
    },
    "wifi_signal": "-46dBm",
    "xcam": {
      "allow_skip_parts": false,
      "buildplate_marker_detector": true,
      "first_layer_inspector": true,
      "halt_print_sensitivity": "medium",
      "print_halt": true,
      "printing_monitor": true,
      "spaghetti_detector": true
    },
    "xcam_status": "0"
  }
}
roscog commented 7 months ago

Yep that's it that means it's a code issue on Dutch developer his side and not a issue with the printer not functioning like it's supposed to. And thus all one can do is wait for Dutch developer to make a fix

phranck commented 7 months ago

My response:

{
    "print": {
        "ams": {
            "ams": [
                {
                    "humidity": "5",
                    "id": "0",
                    "temp": "27.4",
                    "tray": [
                        {
                            "bed_temp": "40",
                            "bed_temp_type": "1",
                            "cali_idx": -1,
                            "cols": [
                                "FFFFFFFF"
                            ],
                            "ctype": 0,
                            "drying_temp": "55",
                            "drying_time": "8",
                            "id": "0",
                            "nozzle_temp_max": "220",
                            "nozzle_temp_min": "220",
                            "remain": 12,
                            "tag_uid": "A5160FA300000100",
                            "tray_color": "FFFFFFFF",
                            "tray_diameter": "1.75",
                            "tray_id_name": "S00-W0",
                            "tray_info_idx": "GFS00",
                            "tray_sub_brands": "Support W",
                            "tray_type": "PLA-S",
                            "tray_uuid": "6D6C239E8C1644C5B2DAF82AEB3A0787",
                            "tray_weight": "250",
                            "xcam_info": "3421D007E803E8039A99193F"
                        },
                        {
                            "bed_temp": "0",
                            "bed_temp_type": "0",
                            "cali_idx": -1,
                            "cols": [
                                "BCBCBCFF"
                            ],
                            "ctype": 0,
                            "drying_temp": "0",
                            "drying_time": "0",
                            "id": "1",
                            "nozzle_temp_max": "240",
                            "nozzle_temp_min": "190",
                            "remain": -1,
                            "tag_uid": "0000000000000000",
                            "tray_color": "BCBCBCFF",
                            "tray_diameter": "0.00",
                            "tray_id_name": "",
                            "tray_info_idx": "GFL99",
                            "tray_sub_brands": "",
                            "tray_type": "PLA",
                            "tray_uuid": "00000000000000000000000000000000",
                            "tray_weight": "0",
                            "xcam_info": "000000000000000000000000"
                        },
                        {
                            "bed_temp": "35",
                            "bed_temp_type": "1",
                            "cali_idx": -1,
                            "cols": [
                                "F7F3F0FF"
                            ],
                            "ctype": 0,
                            "drying_temp": "55",
                            "drying_time": "8",
                            "id": "2",
                            "nozzle_temp_max": "230",
                            "nozzle_temp_min": "190",
                            "remain": 100,
                            "tag_uid": "6001A95E00000100",
                            "tray_color": "F7F3F0FF",
                            "tray_diameter": "1.75",
                            "tray_id_name": "A07-D4",
                            "tray_info_idx": "GFA07",
                            "tray_sub_brands": "PLA Marble",
                            "tray_type": "PLA",
                            "tray_uuid": "57DE2DCD245D4266BA71970A2EC961F8",
                            "tray_weight": "1000",
                            "xcam_info": "D007D007E803E8030000403F"
                        },
                        {
                            "bed_temp": "0",
                            "bed_temp_type": "0",
                            "cali_idx": -1,
                            "cols": [
                                "000000FF"
                            ],
                            "ctype": 0,
                            "drying_temp": "0",
                            "drying_time": "0",
                            "id": "3",
                            "nozzle_temp_max": "240",
                            "nozzle_temp_min": "190",
                            "remain": -1,
                            "tag_uid": "0000000000000000",
                            "tray_color": "000000FF",
                            "tray_diameter": "0.00",
                            "tray_id_name": "",
                            "tray_info_idx": "GFL99",
                            "tray_sub_brands": "",
                            "tray_type": "PLA",
                            "tray_uuid": "00000000000000000000000000000000",
                            "tray_weight": "0",
                            "xcam_info": "000000000000000000000000"
                        }
                    ]
                }
            ],
            "ams_exist_bits": "1",
            "insert_flag": true,
            "power_on_flag": false,
            "tray_exist_bits": "f",
            "tray_is_bbl_bits": "f",
            "tray_now": "255",
            "tray_pre": "255",
            "tray_read_done_bits": "f",
            "tray_reading_bits": "0",
            "tray_tar": "255",
            "version": 86
        },
        "ams_rfid_status": 0,
        "ams_status": 0,
        "aux_part_fan": true,
        "bed_target_temper": 0.0,
        "bed_temper": 23.0,
        "big_fan1_speed": "0",
        "big_fan2_speed": "0",
        "cali_version": 0,
        "chamber_temper": 27.0,
        "command": "push_status",
        "cooling_fan_speed": "0",
        "ctt": 0,
        "fail_reason": "0",
        "fan_gear": 0,
        "filam_bak": [],
        "force_upgrade": false,
        "gcode_file": "",
        "gcode_file_prepare_percent": "0",
        "gcode_start_time": "0",
        "gcode_state": "IDLE",
        "heatbreak_fan_speed": "0",
        "hms": [],
        "home_flag": 14802328,
        "hw_switch_state": 0,
        "ipcam": {
            "ipcam_dev": "1",
            "ipcam_record": "enable",
            "mode_bits": 2,
            "resolution": "1080p",
            "rtsp_url": "rtsps://10.0.0.115:322/streaming/live/1",
            "timelapse": "disable",
            "tutk_server": "enable"
        },
        "job_id": "",
        "layer_num": 0,
        "lifecycle": "product",
        "lights_report": [
            {
                "mode": "off",
                "node": "chamber_light"
            },
            {
                "mode": "flashing",
                "node": "work_light"
            }
        ],
        "maintain": 3,
        "mc_percent": 0,
        "mc_print_error_code": "0",
        "mc_print_stage": "1",
        "mc_print_sub_stage": 0,
        "mc_remaining_time": 0,
        "mess_production_state": "active",
        "net": {
            "conf": 16,
            "info": [
                {
                    "ip": 1929379850,
                    "mask": 255
                },
                {
                    "ip": 0,
                    "mask": 0
                }
            ]
        },
        "nozzle_diameter": "0.4",
        "nozzle_target_temper": 0.0,
        "nozzle_temper": 26.0,
        "nozzle_type": "hardened_steel",
        "online": {
            "ahb": false,
            "ext": false,
            "version": 7
        },
        "print_error": 0,
        "print_gcode_action": 0,
        "print_real_action": 0,
        "print_type": "",
        "profile_id": "",
        "project_id": "",
        "queue_est": 0,
        "queue_number": 0,
        "queue_sts": 0,
        "queue_total": 0,
        "s_obj": [],
        "sdcard": true,
        "sequence_id": "2021",
        "spd_lvl": 2,
        "spd_mag": 100,
        "stg": [],
        "stg_cur": -1,
        "subtask_id": "",
        "subtask_name": "",
        "task_id": "",
        "total_layer_num": 0,
        "upgrade_state": {
            "ahb_new_version_number": "",
            "ams_new_version_number": "",
            "consistency_request": false,
            "dis_state": 0,
            "err_code": 0,
            "ext_new_version_number": "",
            "force_upgrade": false,
            "idx": 7,
            "message": "",
            "module": "null",
            "new_version_state": 2,
            "ota_new_version_number": "",
            "progress": "0",
            "sequence_id": 0,
            "sn": "xxxxxxxxxxxxxxx",
            "status": "IDLE"
        },
        "upload": {
            "file_size": 0,
            "finish_size": 0,
            "message": "Good",
            "oss_url": "",
            "progress": 0,
            "sequence_id": "0903",
            "speed": 0,
            "status": "idle",
            "task_id": "",
            "time_remaining": 0,
            "trouble_id": ""
        },
        "vt_tray": {
            "bed_temp": "0",
            "bed_temp_type": "0",
            "cali_idx": -1,
            "cols": [
                "000000FF"
            ],
            "ctype": 0,
            "drying_temp": "0",
            "drying_time": "0",
            "id": "254",
            "nozzle_temp_max": "250",
            "nozzle_temp_min": "200",
            "remain": 0,
            "tag_uid": "0000000000000000",
            "tray_color": "000000FF",
            "tray_diameter": "0.00",
            "tray_id_name": "",
            "tray_info_idx": "GFU01",
            "tray_sub_brands": "",
            "tray_type": "TPU",
            "tray_uuid": "00000000000000000000000000000000",
            "tray_weight": "0",
            "xcam_info": "000000000000000000000000"
        },
        "wifi_signal": "-50dBm",
        "xcam": {
            "allow_skip_parts": false,
            "buildplate_marker_detector": true,
            "first_layer_inspector": false,
            "halt_print_sensitivity": "medium",
            "print_halt": true,
            "printing_monitor": true,
            "spaghetti_detector": true
        },
        "xcam_status": "0"
    }
}
roscog commented 7 months ago

Yep they bolth look good, small note this file does contain 5he serial number of. Your printer so might want to edit the msg and remove that, it's under the upgrade status

phranck commented 7 months ago

Btw: @CreasaBE use three backticks before and after your log output. It's Markdown and it will be formatted as mine.

CreasaBE commented 7 months ago

Btw: @CreasaBE use three backticks before and after your log output. It's Markdown and it will be formatted as mine.

yeah I tried marking it as code without the GUI selector but it didn't take, did it manually now, thanks !

roscog commented 7 months ago

I just thought of something, maybe wolfwith sword from. The bambu lab discord know something tho that's a long shot

DutchDevelop commented 7 months ago

Seeing that the mqtt is there maybe it's not subscribing to the right topic? Because you should at least see something being printed with the mqtt log. Could you check the serialnumber on the blled device page?

phranck commented 7 months ago

Serial number is correct

phranck commented 7 months ago

Do you mean the "Serial ID" on the "BL LED Controller Settings Page"? I can control RGB mode and brightness over there. So, communication is working.

CreasaBE commented 7 months ago

serial of the machine set the BLLED controller is correct. I copy/pasted the serial from HA which works and also tried copying the serial from bambu studio so that should be correct. Even copied the serial that is entered on the BLLED controller and searched through the MQTT log which is copied in notepad++ and they match 100%

phranck commented 7 months ago

@roscog

Fancy looks very clean might have to print one

I just published it on Makerworld. 😃

roscog commented 7 months ago

I'll go give you like and a download

jsn0327 commented 7 months ago

Please join the discord and give us more information there.

@DutchDevelop Would you please provide an invite link for your discord channel?

phranck commented 7 months ago

@jsn0327 You'll find the link to his Discord here.

jsn0327 commented 7 months ago

Thanks a lot! On Jan 13, 2024 at 3:54 AM -0600, Frank Gregor @.***>, wrote:

@jsn0327 You'll find the link to his Discord here. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

phranck commented 7 months ago

So... @DutchDevelop what is the current state? Is it within the realms of possibility that we will soon receive a firmware update?