Set the weather forecast
Function table
__IDO_FUNCTABLE__.funcTable11Model.weather
|| __IDO_FUNCTABLE__.funcTable38Model.setV3Weather
Description of Weather Switch Model
- IDOSetWeatherSwitchInfoBluetoothModel
Parameter | Description | Remark |
---|---|---|
isOpen | Switch | bool |
Set the weather switch
Objc:
IDOSetWeatherSwitchInfoBluetoothModel * model = [IDOSetWeatherSwitchInfoBluetoothModel currentModel]; [IDOFoundationCommand setWeatherCommand:model callback:^(int errorCode) { if (errorCode == 0) { //Set successfully }else if (errorCode == 6) { //Device not supported }else { //Setup failed } }];
Swift
let model = IDOSetWeatherSwitchInfoBluetoothModel.current(); IDOFoundationCommand.setWeather(model) { (errorCode) in if errorCode == 0 { //Set successfully }else if errorCode == 6{ //Device does not support this method }else { //Wrong setting } };
v2 weather forecast model descriptionv2天气功能表 : _IDOFUNCTABLE.funcTable11Model.weather
- IDOSetWeatherDataInfoBluetoothModel
Parameter | Description | Remark |
---|---|---|
timeStr | Timestamp of weather forecast update | str |
todayTemp | Average temperature today | int |
todayType | Weather type of the day | 0:Other, 1: sunny, 2: cloudy, 3: overcast, 4: rain, 5: heavy rain, 6: thunderstorm, 7: snow, 8: sleet, 9: typhoon, 10: sandstorm, 11: Clear at night, 12: Cloudy at night, 13: Hot, 14: Cold, 15: Breeze, 16: Strong wind, 17: Fog, 18: Showers, 19: Cloudy to clear |
todayMaxTemp | Highest temperature of the day | int |
todayMinTemp | Minimum temperature of the day | int |
humidity | Temperature | int |
todayUvIntensity | UV intensity | int |
todayAqi | Air pollution index | int |
future | Weather collection for the next three days | 格式:@{@"type":@(0),@"maxTemp":@(0),@"minTemp":@(0)} |
- Set v2 weather data
Objc:
IDOSetWeatherDataInfoBluetoothModel * model = [IDOSetWeatherDataInfoBluetoothModel currentModel];
[IDOFoundationCommand setWeatherDataCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetWeatherDataInfoBluetoothModel.current();
IDOFoundationCommand.setWeatherData(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};
Set v2 city name model description
- IDOSetWeatherDataInfoBluetoothModel
Parameter | Description | Remark |
---|---|---|
cityName | City name | str |
- Set v2 city name
Objc:
IDOSetWeatherDataInfoBluetoothModel * model = [IDOSetWeatherDataInfoBluetoothModel currentModel];
[IDOFoundationCommand setWeatherCityCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetWeatherDataInfoBluetoothModel.current();
IDOFoundationCommand.setWeatherCity(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};
Set v3 weather forecast model instructions
V3 Weather Menu: _IDOFUNCTABLE.funcTable38Model.setV3Weather
IDOSetV3WeatherDataModel
Parameter | Description | Remark |
---|---|---|
weatherVersion | Version | int Assignment 2 |
month | Month | int |
day | Day | int |
min | Minute | int |
sec | Second | int |
week | Week | Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday:6 |
weatherType | Weather Conditions | 0:Other, 1:Sunny, 2:Cloudy, 3:Overcast, 4:Rain, 5:Rainstorm, 6: thunderstorm, 7: snow, 8: sleet, 9: typhoon, 10: sandstorm, 11: clear at night, 12: Cloudy at night, 13: Hot, 14: Cold, 15: Breeze, 16: Strong wind, 17: Fog, 18: Showers, 19: Cloudy to sunny 20: New Moon, 21: Emei Moon, 22: First Quarter Moon, 23: Full Moon, 24: Full Moon, 25: Losing Gibbous, 26: Last Quarter, 27: Waning Moon 48: thunder, 49: hail, 50: blowing sand, 51: tornado |
todayTmp | Current temperature | int |
todayMaxTemp | Maximum temperature | int |
cityNameLen | City name length | int |
cityName | City name | str |
airQuality | Air quality | int |
precipitationProbability | Precipitation probability | int |
humidity | Temperature | int |
todayUvIntensity | UV intensity | int |
windSpeed | Wind Speed | int |
sunriseHour | Sunrise hour | int |
sunriseMin | Sunrise minute | int |
sunsetHour | Sunset hour | int |
sunsetMin | Sunset minute | int |
airGradeInfo | Air quality description | str |
future24HoursItems | The next 24\48 hours weather collection | IDOFuture24HourWeatherModel weatherType、temperature、probability |
future7DaysItems | Future 7 Weather Collection | IDOFuture7DayWeatherDataModel weatherType、maxTemp、minTemp |
futureSunriseItems | Future 3 Sunset Sunrise Weather Collection | IDOFutureSunriseWeatherDataItems sunriseHour、sunriseMin、sunsetHour、sunsetMin |
- Set v3 weather data
Objc:
IDOSetV3WeatherDataModel * model = [IDOSetV3WeatherDataModel currentModel];
[IDOFoundationCommand setV3WeatcherDataCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetV3WeatherDataModel.current();
IDOFoundationCommand.setV3WeatcherData(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};