Lurker News
Curious to know if anyone has written programs for their own, regular, & personal use. And if so what they are? E.g. A colleague of mine tracks all of his homes energy use through a custom program which disaggregates the energy consumption per device and outputs a report to a tablet.

Comments (651) 385 threads

Earlier comments
dohko69#
Yeah bunch of scripts mostly. Things I find most useful are tamper/grease monkey scripts that makes interacting with common websites easier.

- I play a lot of chess and I want to click a button to copy the chess PGNs from chess.com easily while playing a game: https://pastebin.com/UKVUXQxc
- Another one is to grab property info from Redfin and paste it in google sheet for easier analysis and comparison b/w properties: https://pastebin.com/EmH66Q0r

jffry4 replies#
Most of my light bulbs are color-temperature-adjustable. So I wrote a small program which varies the color temperature throughout the day and night.

I started by matching it to the solar elevation, but ultimately I like it more just on a fixed schedule. I've also programmed it to make a more dramatic warm shift near bedtime, and to fade up a bedroom light when it's time to wake up.
Due to the inevitability of scope creep this system also now tracks the charging status and position of my robot vacuum, and I'm working to expand it to collect the 15-minute-interval usage data from my electric provider's website.

ryanchants1 reply#
I've been wanting to build something like your light system. What smart lights do you use?
jffry#
Hue bulbs, the kind that talk to a central bridge over, I believe, ZigBee.

The bridge just hooks up over ethernet and provides a locally accessible no-nonsense REST api that is surprisingly well documented (sadly requires logging in with a free account: https://developers.meethue.com/develop/hue-api/ ).
Authentication is simple. Press the big button on the bridge, hit an API endpoint within 30 seconds, and you get an auth token.
The only other requests I needed were a GET to list the id and status of all bulbs, and a POST per bulb that is on to change its color temperature (you cannot set color temp of a bulb that is off).

arthurofbabylon1 reply#
Super curious about the inter-workings of this system
jsf011 reply#
I was about to make something just like your light bulb system for my own home (minus the vacuum part anyway). Any chance that code is open source? Very interested in any other details you’d be willing to share.
jffry#
It's not open source, but the good news is it's relatively simple. My bulbs are Hue bulbs which use their bridge/hub, which just plugs into ethernet and provides a REST API.

The basic loop, run once per minute is:
- Make one API call which returns the id/on/off/brightness of every bulb
- For each bulb that is on, set its color temperature (this has to be one API call per bulb because there is no way to bulk update a list of bulbs. Bulbs can be put into at most one "room" and you can bulk set a whole room but not a subset of bulbs in that room)
As far as scheduling color temperature goes - I just define a few keyframes based on minutes since midnight local time, and then linearly interpolate to get the color temp. Over 24 hours the steps are so small that the change is basically imperceptible.

Cd00d#
Really clever idea - thank you for sharing!
aynyc#
I have many apps and scripts over the years, but the ones still in use are:

1. StrongLift 5x5 tracker. This is a python CLI based script that tracks 5x5 (Strong Lift) program. I haven't used it in awhile, but a few friends still do.
2. HNews calendar style home page. I wrote this as a way to reduce my daily HN screen time but don't want to miss anything. So I created an app (django on raspberry pi) that downloads from HN API and group HN articles by date and point in a calendar style page. Pretty useful, but the code is still in Py2 and awful.
3. A crawler that downloads swim school class availability so I can sign my kids up.

sbehere#
I have created a personal finance tool that Works-For-Me and requires no sharing of login credentials with third parties.

Something that scrapes financial transactions from bank and credit-card accounts in a fully automated way where possible, and semi-automated way where necessary, dumps those transactions into a database, automatically categorizes them, and creates dashboards for commonly used views and analyses.
I've blogged a bit about it here: https://sagar.se/blog/where-is-the-money/

Load more comments