espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
431 stars 145 forks source link

Inserting a '-' character in the device name causes failure in get simple TS data. (MEGH-5347) #304

Open kongshuiJ opened 3 months ago

kongshuiJ commented 3 months ago

Answers checklist.

General issue report

idf: V5.2 rainmaker: 909c7f00be0cd3343ba18a174d403889f0ea314b

esp_rmaker_device_create() function's first parameter contains a '-' character. ex: light-dev Device parameters are set as properties (PROP_FLAG_READ | PROP_FLAG_SIMPLE_TIME_SERIES). Wi-Fi connection is successful, and the device is displayed on the device end.

I (246926) esp_rmaker_param: Reporting Simple Time Series Data for light-dev.temp
I (246936) esp_rmaker_param: Reporting params: {"light-dev":{"temp":-68}}

When using Swagger UI to get Simple Time Series Data, all parameters are correctly set. However, the server returns the following response.

{
  "status": "failure",
  "description": "Error getting data from DB. Please try after some time",
  "error_code": 136003
}

Removing the '-' character from the device name resolves the issue, and everything is working correctly. ex: lightdev So, does that mean Rainmaker currently does not support the '-' character?