A device for clocko:do time tracking
The hardware part is not very complex. The device consists of:
- 1 display
- 1 knob to select a task
- 1 button to start / stop tracking time for the selected task
You can easily find tutorials on how to connect the individual components to the ESP32.
I used the following:
- Olimex ESP32-WROVER-DevKit
- SSD1306 OLED Display
- 10k Ω Potentiometer
- Button
These Pins are hardcoded at the moment:
- Display: 21 for SDA, 22 for SCL
- Potentiometer: 36
- Button: 15 (using the internal pull up resistor)
For the software part only some configuration and copying of files is necessary.
You need to configure some values for clocko:ctrl to work.
Copy config.example.json
to config.json
and set all values:
- Wireless network name (ESSID) and password
- clocko:do API credentials
- A service ID for the activity you want to track
- Multiple tasks you want to select from.
This can be a combination of
customer_id
andproject_id
or just acustomer_id
. You can choose whatever name you want for the tasks.
- Load the micropython firmware to your ESP32 so it can understand python.
- Install ampy. This is used to copy files to the ESP32.
- Run
deploy.sh [port]
with the device plugged in ([port]
is usually something like/dev/ttyUSB0
).