Transform your unused Smiirl counter into a stylish clock with a Raspberry Pi. This project updates your Smiirl counter to display the current time.
- Raspberry Pi (e.g., Raspberry Pi Zero W or newer)
- MicroSD card (8 GB or more)
- Computer with an SD card reader
- Internet connection
- Wi-Fi network credentials
- Smiirl device ID and token
- Visit the Raspberry Pi OS Download page.
- Download the "Raspberry Pi OS Lite" version.
- Download and install the Raspberry Pi Imager.
- Open the Raspberry Pi Imager.
- Select "Raspberry Pi OS (other)" -> "Raspberry Pi OS Lite (32-bit)".
- Choose your SD card and click "Write".
- Once the image is written, open the SD card on your computer.
- Enable SSH by creating an empty file named
ssh
in the root directory. - Set up Wi-Fi by creating a file named
wpa_supplicant.conf
with the following content:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
Replace YOUR_SSID
and YOUR_PASSWORD
with your Wi-Fi details.
- Insert the SD card into your Raspberry Pi and power it on.
- Find your Raspberry Pi’s IP address (check your router).
- Connect via SSH:
ssh pi@raspberrypi.local
Default username: pi
, password: raspberry
.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nodejs npm
- Open a terminal on your Raspberry Pi.
- Install the Smiirl Clock package from npm:
npm install -g smiirl-clock
Run the script with your Smiirl device ID and token:
smiirl-clock YOUR_DEVICE_ID YOUR_TOKEN
You can find the counter ID and Token in your Smiirl CURL Details:
To ensure the script runs on startup, add it to crontab:
crontab -e
@reboot /usr/bin/node /usr/local/bin/smiirl-clock YOUR_DEVICE_ID YOUR_TOKEN >> /home/pi/smiirl-clock/cronlog 2>&1
Ensure the path to the script (/usr/local/bin/smiirl-clock
) is correct.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Stefan Kunze - @stefankunze