13
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I use Github pages for a portfolio website when I apply for jobs. On my document.onload function, I implemented a simple thing that sends me email notifications, therefore logging page views. To avoid spamming myself when they switch between index.html and other subpages, I set it up to use cookies that expire after 24hrs. The basic email notification is being done through an Ajax call to submit a Google form that gives me email notifications. I am planning on implementing having the page viewer also submit IP addresses, so that if I submit an application to two different cities, I could look up that IP address to view which organization is reviewing my application. I do need to do further research into that still though.
For my audio player project, that is currently on temporary hold. I believe I shorted out some USB connections and therefore fried my USB controller, so I am currently waiting on a replacement RPi to arrive. I also need to modify the case design, but I messed up dependencies in FreeCAD (more so did not know that existed, so the dependency tree is a dependency line), so it might just be easier to design from scratch again.
Edit: Got the new RPi today, and was able to connect everything together. I now have a working portable prototype of my audio player. After months of work, it is exciting seeing it so close to being fully working.
I use GitHub pages as well, but behind a domain through cloudflare. I say this because it has built in analytics and I get quite a bit of what I suspect is bot traffic. My primary concern would be that you still would ultimately spam yourself with emails once your site gets indexed.
I recently renewed my subscription with my domain provider, but I took a quick look and cloudflare might be the way to go when I need to renew. The pricing seems a bit better, and my current provider while cheaper, did not include a certificate. I should look into what my current provider provides for stats (if any) in the meantime though
I set up some websites using Astro for static site generation hosted on Cloudflare pages (small nonprofit) and we were comfortably in the free tier for hosting. The integration to auto build when the github repo is updated is pretty great.
You can easily host through Cloudflare (for free) even with a domain registered elsewhere. Just need to do a bit of DNS configuration and changing nameservers. Just did it yesterday as Cloudflare doesn't support registering .eu domains. So I registered the domain with porkbun.com and then set it up at Cloudflare.
Hosting right now is not my issue, as with Github pages hosting is free. The bigger thing I would want to do in switching over to Cloudflare is it seems that it is a cheaper place to buy domains from compared to my current provider
Been running analytics for about two weeks, and this has been partially correct. I get notifications every day or two, but looking at the timestamps I have started to suspect some are bots. Nothing too out of the ordinary, until I had one in the very early hours of the morning. I have since implemented IP address analytics (I get IP address and city by doing a fetch to https://ipinfo.io/json) and the first and so far only visit was from an AWS datacenter. If it seems that most of these visits are coming from non-prospective employers, I will turn off the email notifications, which is a simple setting on my Google form.
Why not use a tool like Plausible Analytics instead?
Trying to keep the cost down, since analytics are more of just a nice to have, it is not something worth paying for.
If you're referring to them being a subscription service, Plausible CE is their free/AGPL self-hosted offering.
I am hosting via Github pages so I can only run static HTML, so self-hosting is not an option for now.
You could check out https://posthog.com/. They have a generous free tier and it's very simple to set up. Also offers session replays which could show you where they are focusing on your site.
I've just succeeded, finally, in writing a proof-of-concept shim for the Aqara FP2 presence sensor that translates zone presence and illumination data to the MQTT broker which is the backbone of my smarthome infrastructure- in a totally offline way!
The problem is that the FP2, unlike the FP1, is a "wifi" smart device- in that it communicates with the Aqara cloud and is accessible in the Aqara Home App. I would refuse to use it, except that it's the only device that I have found that manages to handle zoning of the detection space. I don't know how corporations have managed to normalise externally hosted smarthome functionality. IMHO, cloud-enabled smarthome devices are moronic for multiple reasons:
Why would I want to send the data that describes my living patterns to an external service which is likely poorly secured, and often sold off to advertising services?
Why would I want the functionality of my smarthome to degrade the second I experience internet connectivity issues?
Why would I want the lifetime of my smarthome to be at the whim of a third-party who could choose to stop providing the service at any moment?
Fortunately, the device does support at least one other protocol. Unfortunately, it's Apple's HomeKit- which may be documented well but perhaps this device doesn't subscribe to any form of the published standard because no matter how I prod it according to specification, it doesn't respond.
Recently, Aqara announced that the device has been updated to support Samsung's SmartThings protocol- yet another cloud-nonsensery, but after looking through the SmartThings driver for the device, on GitHub, I found that there are a number of entirely undocumented endpoints on the device through which you can actually fetch the device status! And so I have implemented a shim in Python, using aiohttp instead of requests because I need to do an amount of debouncing for global occupancy events, and I'd love to be able to bridge a number of devices at once.
The device listens on port 443, and has the following endpoints:
Endpoints!
GET /info
Returns the device model, vendor, serial number, etc, in application/json
GET /authcode
Returns an authentication token which must be used in more complex requests, in application/json
GET /attr
Requires a token, passed in with the header "Authorization: Bearer $TOKEN"
Returns a set of static attributes, such as number of zones, in application/json
GET /status
Requires a token, passed in with the header "Authorization: Bearer $TOKEN"
This is a server-sent event (SSE) stream, as text/event-stream, which streams events
The attributes are all opaque numerical identifiers, with a small amount of determinism, but it's enough to go off of- and I've mapped zone presence events to occupancy booleans, including a debounced global occupancy parameter which performs a consensus of all zone on the device.
It's a little rough around the edges, and the device isn't exactly reliable to start with (lots of false detection events / ghosts), but the consensus online is that it improves over time, or "learns". I'm just glad that it handles a much larger detection zone than the Sonoff SNZB-06P which we use in smaller rooms (all relative- it's not a big apartment). If I can get triggers consistently working, such as brightening lights at a workbench when you sit down at it, I'll be very happy indeed.
I’m working on a cross platform electron application to stitch images together along lines that match up - like a panorama
Currently I’m using JIMP npm library, but not having a lot of luck.
If anyone has experience/advice in this domain please let me know!
using github actions, I made a scraper for This American Life. It scraped all of the episodes and segment info
It doesn't post repeats but it does post the clean / beeped version for each episode. I don't know why there isn't a feed for that, but there isn't. Its inconsequential, but it also cleans up the URL for the file itself.
If this does work, I might include the repeats along with the original air date in the title. This runs once a day on Sundays around 6pm, which is usually after the episodes are posted. This will prevent promos from being posted.
There are a few feeds like this around. If this works, I might make one just for the clean episodes for public use.
sample xml
quick edit: weekly scrapes only pull the latest episode but it has a toggle to pull five episodes for testing or the full archive.
I have noise canceling headphones that I use for meetings at work, and if I take them off for ten minutes, they turn themselves off. Their passive isolation is pretty good, so sometimes I'll put them on and not notice they are off. When I start a zoom call, it's pretty annoying because I have to do the "oh, I can't hear you, is it you or me?" routine, followed by actually connecting the headphones, which take about a thousand years (not really, but it seems so while people are staring at the screen waiting on you).
So with the help of Claude Sonnet, I built a gnome plugin that monitors for new zoom windows and sends a dbus notification to a system service. The service checks to see if the bluetooth device for my headphones is connected, and if it isn't, it sends a desktop notification to remind me.
For what it is, it has a lot of moving parts, but it seems to be reliable. It didn't take long to set up, and it has a decent install script so I should be able to reuse it.
It's not massively technical I suppose, but I did install (a long time ago, unused) and recently updated and enabled Home Assistant on my Unraid server and am now using that for my smart lights instead of Google Home. I've been wanting to go local with my control, but for a long time my bulbs (Tuya) had a buggy/broken integration in HA. Well that finally got completely fixed!
There's still one achilles heel which is that I think I have to occasionally re-authorize HA with the Tuya app for it to keep functioning, which is the one step away from having full control that I find annoying. It at least does mean I have the Tuya app as a backup if anything local goes awry, but I also don't like Tuya having any power over me in that regard.
At some point I might switch to Nanoleaf bulbs (a friend recommended) or whatever I can find that I can hook up directly with HA without needing some kind of cloud tether/authorization/etc that at some point could be wielded against consumers.
I've been trying to de-Google, as well as get rid of any cloud-connected smart speaker/microphones, especially any opened by big corps that have tons of annoyances. Got rid of Alexa a long time ago, got rid of Google Home speaker a while back, and just used the app for light control.
Now, finally, I just have Home Assistant interface on PC and HA apps on my mobile devices to control my lights. Things I've noticed: the control is MUCH faster, the controls/UI themselves are more accurate/less prone to fumbling, the control is WAY less buggy (when I select a scene it works immediately instead of having to be triggered multiple times) and it's so nice and simple with HA's interface. No extra clutter and unnecessary "actions" like in the Google Home app. With HA all the cruft is gone, just a few controls for my lights, and it all works flawlessly now.
I'm thinking about building with 3D printing + an rPi/HAT + some physical "arcade style" buttons a physical control panel interface, not because it's practical, but just for fun, so I can have some kind of little old sci-fi style "control panel" for my lighting. It's 2025 and we're re-inventing the light switch! lol
In an effort to learn F# I am building an application to manage tasks. It is a GUI app built with GTK and uses the todo.txt specification.
So far I have built the app shell and completed the todo.txt parser using the FParsec library.
Next up is turning those parsed todos into UI elements.
I've been slowly getting used to the tools in the Picotron system, which is a "fantasy workstation" that has been compared to an Amiga.
I am currently torn between trying to make a legit demo, getting good with the tracker, or making an awful game. My mathematical coding skills are not what they once were, so trying to do anything with graphics is going to be... interesting, to say the least. Should be fun though!
I've built a CD dumping app for macOS. Native, with a better* UI than all other dumping apps. The USP of my app—other than being a great native experience—is that it can dump from multiple drives at the same time. The UI duplicates itself in a vertical stack. So I'm calling it... Spindle.
Thread: https://bsky.app/profile/gingerbeardman.com/post/3lz4rpu4qfs2l
That makes 4 macOS apps I need to launch ASAP. The others are: a quick access bookmark tool (done), sound effects generator (done; needs a name), pixel art app (done; needs help/docs).
* I'm biased