Use pixlet to build apps for Tidbyt using Starlark.
- Install the VSCode
vscode-starlark
extension. - Install the iOS app.
The pixlet
executable is included in the project, so you can develop with:
$ bin/pixlet serve --watch src/example.star
Then visit http://localhost:8080/
This Starlark file for a clock is generated from fuzzy_clock_data.star.erb
by running:
ruby bin/fuzzy_clock_data.rb
It interpolates the DATA
dict in the file so that it can use Ruby to fetch and format data in ways that Starlark cannot. It also uses a local file cache with a TTL for each value to prevent hitting APIs too often.
Assuming go
and npm
are installed:
cd ~/pixlet
npm install && npm run build && PATH=$PATH:/usr/local/go/bin GOPATH=$HOME/golang make build
cp pixlet ~/tidbyt-apps/bin/pixlet_linux_arm32
https://github.com/drudge/homebridge-tidbyt/wiki#how-do-you-install-pixlet-on-the-raspberry-pi tidbyt/pixlet#700
Include a .env
file in the root of the project that includes:
TIDBYT_DEVICE_ID=the-device-id
TIDBYT_TOKEN=1lkjdf09jasdlfkj23094lslkdfj0.9234nf
Those values can be found in the Tidbyt mobile app.
Then to push to the device:
$ bin/push src/example.star