What happened?
Was actually trying to figure out why mqtt does not reconnect when my mqtt server becomes unavailable like during a server reboot. Did not find the reason yet but this popped up when I built a workaround:
GET /api/mqtt/config returns a JSON document that cannot be POSTed back unchanged using the documented API when mqtt_root_ca_cert is populated. The form parser fails with 1002 No values found! because the data parameter becomes too large. This happens even when mqtt_tls is false.
To Reproduce Bug
curl http://IP_OF_DTU/api/mqtt/config
-H "Authorization: Basic XXXXXXX" > mqtt.json
curl -i -X POST http://IP_OF_DTU/api/mqtt/config
-H "Authorization: Basic XXXXXXX"
-H "Content-Type: application/json"
--data-binary @mqtt.json
leads to:
{"type":"warning","message":"No values found!","code":1002}%
Expected Behavior
{"type":"success","message":"Settings saved!","code":1001}%
Install Method
Pre-Compiled binary from GitHub releases
What git-hash/version of OpenDTU?
f972685
What firmware variant (PIO Environment)?
generic_esp32s3_usb
Relevant log/trace output
Anything else?
this is in the onbattery fork, but that should not have any impact I think
Please confirm the following
What happened?
Was actually trying to figure out why mqtt does not reconnect when my mqtt server becomes unavailable like during a server reboot. Did not find the reason yet but this popped up when I built a workaround:
GET /api/mqtt/config returns a JSON document that cannot be POSTed back unchanged using the documented API when mqtt_root_ca_cert is populated. The form parser fails with 1002 No values found! because the data parameter becomes too large. This happens even when mqtt_tls is false.
To Reproduce Bug
curl http://IP_OF_DTU/api/mqtt/config
-H "Authorization: Basic XXXXXXX" > mqtt.json
curl -i -X POST http://IP_OF_DTU/api/mqtt/config
-H "Authorization: Basic XXXXXXX"
-H "Content-Type: application/json"
--data-binary @mqtt.json
leads to:
{"type":"warning","message":"No values found!","code":1002}%
Expected Behavior
{"type":"success","message":"Settings saved!","code":1001}%
Install Method
Pre-Compiled binary from GitHub releases
What git-hash/version of OpenDTU?
f972685
What firmware variant (PIO Environment)?
generic_esp32s3_usb
Relevant log/trace output
Anything else?
this is in the onbattery fork, but that should not have any impact I think
Please confirm the following