Flic 2
A Flic button starts, switches or stops your timer with one press. This works through the Flic app on your phone or through a Flic Hub, both with the action "Internet Request".
- Under Settings, API and devices, add a device of the kind "Flic button" and copy the token. It is shown only once.
- Open the Flic app, choose the button and then the trigger: click, double click or hold.
- Choose the action "Internet Request" (in the app under "Advanced" or "Tools", in hub mode under the hub).
- Enter the values below. Under "Headers" add two lines, under "Body" the JSON text.
- Save and press the button once to try it. The timer appears in the app straight away.
A layout that works well: click toggles the project (toggle), double click switches to a second project (switch), hold stops (stop).
Click, toggle the timer:
URL: https://api.horaka.com/v1/track/toggle
Method: POST
Content-Type: application/json
Headers: Authorization: Bearer YOUR_TOKEN
Body: {"project": "PROJECT"}
Hold, stop the timer:
URL: https://api.horaka.com/v1/track/stop
Method: POST
Content-Type: application/json
Headers: Authorization: Bearer YOUR_TOKEN
Body: {}
A second press within two seconds is ignored, so a double click never counts twice. When the Flic runs through your phone, the phone needs Bluetooth and a connection; with the hub, Wi-Fi at the hub is enough.