Skip to content
reloxx13 edited this page Dec 3, 2019 · 1 revision

Sometimes the JSON responded by Tasmota devices gets corrupted by invisible chars, special chars or line breaks.

JSON has a predefined format which HAVE TO be correct to be parsed.

Tasmota is limited by flash size and cannot check and approver every input you do over the web ui or by command.

If you end up getting a JSON error there could be a " or invisible new line char in your friendly name or mqtt name.

To find this error by yourself, you can use online JSON validators.

Currently i use this one which is pretty good at finding the error and explicit telling you the line/char:
json.parser.online.fr

To use it, you have to copy the RAW JSON Response from your device status 0 command by calling
http://YOUR_DEVICE_IP/cm?cmnd=status%200
NOTE: Dont use the output of a status 0 command from the Tasmota GUI console!!!

After you call this in your browser, you will see either a error message of a corrupted JSON or a beautyfied json.
In both cases in some browsers (firefox) you´ll have tabs at the top or bottom to show the raw data of the response.

Copy this raw data and paste it in a validation tool and check if it can find the error.

As example: if you get a broken mqtt name, try to re-set the name by the console and the command.
By re-setting it by the console, you can be sure any invisible char is gone. You wont see them in the input boxed on the web ui.

After you re-setted the corrupted field, get another raw json from your device and try again in the validator.
If everything is valid, try it again in TasmoAdmin.
When it still wont work, please open a issue and post the raw json response.