You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SimpleWeather service : new weather implementation
This new implementation of the weather feature provides a new BLE API and a new weather service.
The API uses a single characteristic that allows companion apps to write the weather conditions (current and forecast for the next 5 days).
The SimpleWeather service exposes those data as std::optional fields.
This new implementation replaces the previous WeahterService.
The API is documented in docs/SimpleWeatherService.md.
The Simple Weather Service provide a simple and straightforward API to specify the current weather and the forecast for the next 5 days. It effectively replaces the original Weather Service (from InfiniTime 1.8) since InfiniTime 1.14
6
+
7
+
## Service
8
+
9
+
The service UUID is `00050000-78fc-48fe-8e23-433b3a1942d0`.
10
+
11
+
## Characteristics
12
+
13
+
## Weather data (UUID 00050001-78fc-48fe-8e23-433b3a1942d0)
14
+
15
+
The host uses this characteristic to update the current weather information and the forecast for the next 5 days.
16
+
17
+
This characteristics accepts a byte array with the following 2-Bytes header:
18
+
19
+
-[0] Message Type :
20
+
-`0` : Current weather
21
+
-`1` : Forecast
22
+
-[1] Message Version : Version `0` is currently supported. Other versions might be added in future releases
23
+
24
+
### Current Weather
25
+
26
+
The byte array must contain the following data:
27
+
28
+
-[0] : Message type = `0`
29
+
-[1] : Message version = `0`
30
+
-[2][3][4][5][6][7][8][9] : Timestamp (64 bits UNIX timestamp, number of nanoseconds elapsed since 1 JAN 1970)
31
+
-[10] : Current temperature (°C)
32
+
-[11] : Minimum temperature (°C)
33
+
-[12] : Maximum temperature (°C)
34
+
-[13]..[44] : location (string, unused characters should be set to `0`)
35
+
-[45] : icon ID
36
+
- 0 = Sun, clear sky
37
+
- 1 = Few clouds
38
+
- 2 = Clouds
39
+
- 3 = Heavy clouds
40
+
- 4 = Clouds & rain
41
+
- 5 = Rain
42
+
- 6 = Thunderstorm
43
+
- 7 = snow
44
+
- 8 = mist, smog
45
+
46
+
### Forecast
47
+
48
+
The byte array must contain the following data:
49
+
50
+
-[0] : Message type = `0`
51
+
-[0] : Message version = `0`
52
+
-[2][3][4][5][6][7][8][9] : Timestamp (64 bits UNIX timestamp, number of nanoseconds elapsed since 1 JAN 1970)
53
+
-[10] Number of days (Max 5, fields for unused days should be set to `0`)
0 commit comments