marcoschwartz / aREST

A RESTful environment for Arduino
http://aREST.io/
Other
1.2k stars 279 forks source link

Output Variables - text of variable not correct #285

Open Airfranse opened 4 years ago

Airfranse commented 4 years ago

By the way, the aREST API is my new favorite to communicate with home assistant. thanks for the great work

My problem: When I create multiple variables, the first or the second variable is not displayed correctly in the output, but with special characters. If I reduce the number of variables, it works normally again.

// Init variables and expose them to REST API rest.variable("uptime",&uptime_h); rest.variable("Uhrzeit",&Uhrzeit); rest.variable("Datum",&Datum); rest.variable("Wochentag",&Wochentag); rest.variable("Temperatur",&BMEtemp); rest.variable("Luftfeuchtigkeit",&BMEhumid); rest.variable("Luftdruck",&BMEpress); rest.variable("CO2",&CO2); rest.variable("tVOC",&tVOC); rest.variable("BME280 aktiv",&BME280active); rest.variable("CCS811 aktiv",&CCS811active); rest.variable("APDS9960 aktiv",&APDS9960active);

Output: {"variables": {"ðó!@)õþ?Œ": 0.02, "ðó!@(õþ?": "16:53:08", "Datum": "31.07.2020", "Wochentag": "6", "Temperatur": 28.32, "Luftfeuchtigkeit": 59.13, "Luftdruck": 963.40, "CO2": 0.00, "tVOC": 0.00, "BME280 aktiv": true, "CCS811 aktiv": true, "APDS9960 aktiv": true}, "id": "00001", "name": "esp_schlafzimmer", "hardware": "esp8266", "connected": true}

Is it possible to solve this by myself?

Thanks