Setting Weather Data for V3

Menu: setSetV3Weather

Flutter Example:

/// Send the v3 weather protocol event number under v3
setWeatherV3(
  evtBase: _VBusEvtBase.base_app_set,
  evtType: _VBusEvtType.func_v3_set_v3_weather
);

/// Send the v3 weather protocol under v3
libManager.send(evt: CmdEvtType.setWeatherV3, json: jsonEncode(json));

JSON Fields Sent by the App:

Field Name Type Description
version int Protocol library version number
month int Month of the most recent sync from the server
day int Day of the most recent sync from the server
hour int Hour of the most recent sync from the server
min int Minute of the most recent sync from the server
sec int Second of the most recent sync from the server
week int The day of the week
bit0: Monday
bit1: Tuesday
and so on up to Sunday
weather_type int Weather type
0: Other
1: Sunny
2: Cloudy
3: Overcast
4: Rain
5: Heavy rain
6: Thunderstorm
7: Snow
8: Sleet
9: Typhoon
10: Sandstorm
11: Night clear
12: Night cloudy
13: Hot
14: Cold
15: Gentle breeze
16: Strong wind
17: Haze
18: Shower
19: Cloudy to sunny
48: Thunder
49: Hail
50: Blowing sand
51: Tornado (realme custom weather type idw02)
today_tmp int Current temperature in Celsius
For negative temperatures, add 100 to the temperature and transmit
today_max_temp int Maximum temperature in Celsius
For negative temperatures, add 100 to the temperature and transmit
today_min_temp int Minimum temperature in Celsius
For negative temperatures, add 100 to the temperature and transmit
city_name char [] City name
Maximum of 74 bytes
air_quality int Air quality
Multiply by 10 for transmission
precipitation_probability int Precipitation probability
0-100 percentage
humidity int Humidity
today_uv_intensity int UV intensity
Multiply by 10 for transmission
wind_speed int Wind speed
sunrise_hour int Sunrise hour
Valid only for version 1
sunrise_min int Sunrise minutes
Valid only for version 1
sunset_hour int Sunset hour
Valid only for version 1
sunset_min int Sunset minutes
Valid only for version 1
snow_depth_min int Snow thickness of the minimum value of 0 ~ 100
unit: cm
support setSupportSetV3WeatcherAddSnowDepth effectively
snow_depth_max int Snow thickness of the max value of 0 ~ 100
unit: cm
support setSupportSetV3WeatcherAddSnowDepth effectively
snowfall int Snowfall is 0.0 ~ 25.5
unit: cm
app distributed data needs to be x10
support setSupportSetV3WeatcherAddSnowfall effectively
atmospheric_pressure int Atmospheric pressure
units: 30000 ~ 110000 mpa
support setSupportV3WeatherAddAtmosphericPressure effectively
moon_phase int The moon type:
1 new moon (N)
2: crescent (WXC)
3: first quarter (FQ)
4: surplus gibbous moon (WXG)
5: full moon (F)
6: kui gibbous moon (WNG)
7: last quarter (LQ)
8: Last Moon (WNC))
version4 is valid
moonrise_hour int the moon rises,hour
version4 is valid
moonrise_min int the moon rises, minute
version4 is valid
moonset_hour int the moon down,hour
version4 is valid
moonset_min int the moondown, minute
version4 is valid
sunrise_item_num int Number of sunrise and sunset time details
Currently, the maximum number of days is set to 7
Invalid for version 1
air_grade_item char [] Air quality level content
Invalid for version 1
hours_weather_items array Collection of weather data for the next 48 hours
Collection of weather_type, temperature, and probability
future_items array Weather data for the next seven days
Collection of weather_type, max_temp, and min_temp
sunrise_item array Sunrise and sunset time details
Collection of sunrise_hour, sunrise_min, sunset_hour, and sunset_min
Invalid for version 1
Field Name Type Description
weather_type int Weather type
temperature int Temperature
For negative temperatures, add 100 to the temperature and transmit
probability int Precipitation probability
0-100 percentage
Field Name Type Description
weather_type int Weather type
max_temp int Maximum temperature
For negative temperatures, add 100 to the temperature and transmit
min_temp int Minimum temperature
For negative temperatures, add 100 to the temperature and transmit
Field Name Type Description
sunrise_hour int Sunrise hour
Invalid for version 1
sunrise_min int Sunrise minutes
Invalid for version 1
sunset_hour int Sunset hour
Invalid for version 1
sunset_min int Sunset minutes
Invalid for version 1

Example:

{
    "version": 0,
    "month": 12,
    "day": 26,
    "hour": 16,
    "min": 31,
    "sec": 30,
    "week": 1,
    "weather_type": 1,
    "today_tmp": 21,
    "today_max_temp": 23,
    "today_min_temp": 12,
    "city_name": "shenzhen",
    "air_quality": 53,
    "precipitation_probability": 1,
    "humidity": 0,
    "today_uv_intensity": 0,
    "wind_speed": 0,
    "sunrise_hour": 6,
    "sunrise_min": 20,
    "sunset_hour": 18,
    "sunset_min": 17,
    "sunrise_item_num": 0,
    "air_grade_item": [],
    "hours_weather_items": [
        {
            "weather_type": 1,
            "temperature": 0,
            "probability": 0
        },
        {
            "weather_type": 1,
            "temperature": 0,
            "probability": 0
        }
    ],
    "future_items": null,
    "sunrise_item": null
}

JSON Fields Received by the App:

Field Name Type Description
version int Protocol library version number
err_code int Error code, 0 for success, non-zero for error codes

Example:

{
    "version": 0,
    "err_code": 0
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2025-04-30 09:32:44

results matching ""

    No results matching ""