Set Weather Data
Function: supportSetWeatherDataV2
Flutter Example:
/// Set weather data event number
setWeatherData(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_weatcher_data),
/// Set weather data
libManager.send(evt: CmdEvtType.setWeatherData, json: jsonEncode(json));
JSON Fields Sent by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| type | int | Weather type |
| temp | int | Current temperature |
| max_temp | int | Maximum temperature of the day |
| min_temp | int | Minimum temperature of the day |
| humidity | int | Current humidity |
| uv_intensity | int | Current UV intensity |
| aqi | int | Current air quality index (AQI) |
| future | array | Weather conditions for the next three days Array of type, min_temp, and max_temp |
| Field Name | Field Type | Field Description |
|---|---|---|
| type | int | Weather type |
| min_temp | int | Minimum temperature |
| max_temp | int | Maximum temperature |
| Code | Weather Type |
|---|---|
| 0x00 | Other |
| 0x01 | Sunny |
| 0x02 | Cloudy |
| 0x03 | Overcast |
| 0x04 | Rain |
| 0x05 | Heavy Rain |
| 0x06 | Thunderstorm |
| 0x07 | Snow |
| 0x08 | Sleet |
| 0x09 | Typhoon |
| 0x0A | Sandstorm |
| 0x0B | Clear Night |
| 0x0C | Cloudy Night |
| 0x0D | Hot |
| 0x0E | Cold |
| 0x0F | Gentle Breeze |
| 0x10 | Strong Wind |
| 0x11 | Haze |
| 0x12 | Shower |
| 0x13 | Cloudy to Sunny |
| 0x30 | Thunder |
| 0x31 | Hail |
| 0x32 | Dust |
| 0x33 | Tornado |
Example:
{
"type": 1,
"temp": 10,
"max_temp": 18,
"min_temp": 7,
"humidity": 20,
"uv_intensity": 30,
"aqi": 60,
"future": [
{
"type": 2,
"min_temp": 10,
"max_temp": 18
},
{
"type": 2,
"min_temp": 9,
"max_temp": 16
},
{
"type": 1,
"min_temp": 8,
"max_temp": 19
}
]
}
JSON Fields Received by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| status_code | int | 0 for success, non-zero error code |
Example:
{
"status_code": 0
}