I’m also rendering and pushing my apps to my new Tidbyt every N seconds/minutes. If you have a docker host handy, here’s my Dockerfile (a bit crude but works for my controlled environment)
FROM golang:bullseye
ENV WEBP_VERSION libwebp-1.2.2-rc1
ENV REPO=$GOPATH/src/github.com/tidbyt/pixlet
RUN apt-get update \
&& apt-get install -y ca-certificates tzdata openssl libwebp-dev bash
RUN apt-get update && apt-get install -y cron && which cron && \
rm -rf /etc/cron.*/*
RUN git clone https://github.com/tidbyt/pixlet.git $REPO && cd $REPO && make build
COPY entrypoint.sh /entrypoint.sh
COPY crontab /etc/crontab
COPY INSERTYOUR.star /INSERTYOUR.star
ENTRYPOINT ["/entrypoint.sh"]
CMD ["cron","-f", "-l", "2"]
You could COPY in your crontab/star or do a volume/mount for them.
Some other info / files you’ll need: Running Cron in Docker
It would be great to at least have some guidelines published for what an acceptable app will look like - at least in terms of inputs into the main function, what kind of config values are appropriate and how to handle them.
I’m working on an app for Strava, and I’m really interested in how the workflow should work for someone entering / approving the connection to their Strava account, and how the auth key / refresh token can be provided to the Starlark code.
Any guidance as to how often of a refresh is acceptable? If I am refreshing every 5 seconds all day… is that going to put too much load on the Tidbyt servers?
There’s no way to push directly to the Tidbyt without going through Tidbyt servers… so, not really any other options at this point…
@DanS are you getting your app to actually refresh after a certain amount of time? I can’t get mine to refresh, including the bitcoin.star example. I did open a separate issue here for this though.
@DanS That’s like 17,000+ pushes a day… I am just curious… what sort of app is it that you want 5 second updates?
I am interested in making some stock apps, and they can be pretty high frequency, if you like to watch the markets as closely as possible.
I am also looking at a satellite tracking idea and that might be pretty active at times.
@rohan can you tell us what sort of plans you have for supporting the user base when they want to implement all these ideas? Do you see it being better for us to generate our own images at high rates and push them through, or having TibByt servers to do the processing and send the results, or will it be the local device that does the work?
Super pumped to see the Aircraft applet! Technically, if we don’t rate limit you we support it. On the flip side, please be nice to our services. We pay per push - so if we get a lot of folks pushing so frequently, we’ll need to implement stronger rate limits across the board.
Pushing updates every 30-60 seconds feels more then adequate to get up to date aircraft information. Unless of course you’re trying to use Tidbyt for an air traffic control tower in which case I’d have to advise against that .
Understand. What would be good is a way to get the tidbyt to hit a URL (with parameters) that returns a webp file… or allow a direct push to the tidbyt from the same IP network… that way it all stays local and doesn’t stress your servers. (I assume you’re using AWS?)
I can also write it so that it only pushes when an aircraft is within 1-2 miles or so.
Do I just add background=true after the installation Id when you push to the pixlet? Or is it separate?
And does the background key only work with the installation ID? or if you push without an installation ID and with background then it just appears as the final image before it starts the cycle again?
Where is the flag supposed to be exactly? Whenever I add it in there it keeps telling me that the device ID variable I have is not a file (because it’s not).