Summary
It can be controlled trough webrequest. Available Parameters at the moment:
- Mode
- Hue of the hands
- Brightness
It can return
Then there is a request which triggers an alert, filling up the whole ring with a given color, and empy it again. Cool to use from IFTTT.
The different modes
Mode | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Binary mode | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Reverse mode | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | x |
Draw trail | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | x |
Draw seconds hand not every second | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | x |
Seconds hands hue according to it's position | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | x |
Webrequests
Possible requests are:
POST
- setHHue sets hue for the hours hand (0-359)
- setMHue sets hue for the minutes hand (0-359)
- setSHue sets hue for the seconds hand (0-359)
- setHaMode sets the mode, see table (0-16)
- setBright sets the brightness (1-150)
- alert triggers an alert in the given hue (0-359)
- rndMode sets random mode and hues (parameter is ignored, but should be sent (Particle wants it))
- tellTime tells the hour, was for debug purposes, will disappear or altered soonish.
GET
- getHHue returns hue for the hours hand
- getMHue returns hue for the minutes hand
- getSHue returns hue for the seconds hand
- getHaMode returns the mode, see table
- getBright returns the brightness
- getWifi returns the SSID of the network, the clock is connected to
- getConfig returns the hues, brightness and the mode in a compact form
Webrequest examples
POST to set the mode to 8:
curl https://api.particle.io/v1/devices/PARTICLE_ID/setHaMode -d access_token=ACCESS_TOKEN -d params=8
POST to set random mode:
curl https://api.particle.io/v1/devices/PARTICLE_ID/rndMode -d access_token=ACCESS_TOKEN -d params=0
GET to get the hand mode
curl https://api.particle.io/v1/devices/PARTICLE_ID/getHaMode?access_token=ACCESS_TOKEN