One of the main functions of a smart watch is displaying important information on the screen, it is the owner of the watch that is important, not the application developer. For a very long time, I was looking for an application for Pebble watches, which can be used to specify which information to show on the clock. I wanted to see on the clock the status of my servers, data from the weather station, traffic jams in the city. After a long search, I realized that what I am looking for does not exist and I have to do it myself. This is how the application for Pebble My Data smart watch appeared, which follows the link for JSON and shows the data on the watch screen. Perhaps it can be useful not only for me. You can find out about what a Pebble watch is in this review or in this article .{ "content": "Hello\nWorld!", "refresh": 300, "vibrate": 2, "font": 4, "theme": 0, "scroll": 1, "light": 1, "blink": 3, "updown": 1, "auth": "salt" }| Field | Description (all fields are optional) |
|---|---|
| content | the text to be displayed on the clock screen is used to wrap the line using "\ n" |
| refresh | delay in seconds before the next update (update interval, default 300 seconds) |
| vibrate | rejoin for hours (1 - quickly, 2 - twice, 3 - long) |
| font | change the font (1 is the smallest ... 8 is the largest) |
| theme | change design (0 - dark, 1 - light) |
| scroll | 0..100 - go to a specific point in the content (0 - start, 100 - end) |
| light | 1 - turn on the clock light for a while |
| blink | blink content (number - the number of flashes) |
| updown | change the behavior of the up / down buttons (0 - scrolling content, 1 - use pin to update content) |
| auth | salt to generate authentication token |
lat and lon GET parameters will be added to the URL with each update. It is possible, for example, on the server to calculate the time of sunrise / sunset in the place where the clock is now and to change the design depending on this.select=1 with a short press and select=2 with a long press. If in the last update of JSON, the behavior of the up / down buttons has changed, then when you click on these buttons, the application will follow JSON with the parameters up=1|2 or down=1|2 . Thanks to this feature, you can try to implement the server side menu. If the update function is enabled by shaking the clock, the GET parameter shake=1 will be added with this update.Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data . Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data .Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data .Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data .Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data .Pebble-Token: . /, - . .
JSON' , HTTP Pebble-Auth: <MD5(MD5(password)+salt)> . . . , . , .

Pebble App Store
GitHub
Pebble Forums
, Pebble My Data .Source: https://habr.com/ru/post/229491/
All Articles