I made my first android app today. It was terrible and I plan to never do it again.
It took me about three hours of trying to get the sample apps to run before I gave up and made something from scratch. Both involved heavy use of ChatGPT (not my usual flow).
That said, if you want an app that reminds you how to tie your tie in an easy step-by-step way, you can download the APK from my website, and I believe you should be able to run that on your phone.
I don't know how to easily share Android source code, so I won't.
Today I hacked together a simple but servicable Go game. It uses chinese scoring, and you have to manually mark dead stones at the end of the game. You can play a demo here. Source code is on github.
Right now you have to sit down with someone else to play. I plan to spend a day adding multiplayer to a few games, if I have time.
This was so-so. I didn't have a ton of fun making it, and it's not that fun to play either. I spent way too much time with things like trying to get sprites to load, and not as much on making the game fun. I think it could be much better with another day or two of work (as usual for hack-a-day).
Today I made a TODO list. It has whiteboard sections to write tasks in, an eraser, and a timer. You should be able to use it flat or on the wall, though it's a little bulky to use flat.
The blue is mostly spray paint, with some hand acrylic painting near the tape. The various bits on top are held in place with magnets, which I epoxied.
The cost to make this was $17. $5 for the whiteboard marker, $5 for the MDF board, and $7 for the timer. The eraser I made for free. I already had paints, whiteboard tape, epoxy, and magnets.
Originally I had planned to add a bunch of electronics (LEDs for which task is active, a built-in timer, a buzzer, etc), but I decided not to. I was way too ambitious, so I didn't think I'd have time. On top of that, I was having a rough time getting my microcontroller to work, or figuring out how to mount hardware cleanly on MDF. I don't think I would have been happy with the electronic version (even with enough time to do it well), and I am with this version. I'm glad I gave up on that part early. I don't think I'll attempt another physical electronics project during hack-a-day -- it's too hard with too little to show for it at my skill level.
There are 24 hours in a day. This shows you how many of those are daylight. You can use it as a calendar, or you can wistfully watch it, waiting for the sun to come back.
The sensors run on AAA battery, and periodically transmit the temperature on zigbee, a radio protocol in similar frequencies as Wifi. The signals get received by a USB dongle designed to receive and transmit zigbee.
This is connected to a raspberry pi running zigbee2mqtt. The messages get sent to an mqtt broker via wifi. mqtt is a pub/sub protocol that runs over the internet. Any computer on my LAN can then be notified of temperature updates, by asking the mqtt broker to send them updates.
I wrote a small server which stays on all the time, listening to updates and recording changes to a database. It also generates reports periodically.
I think my database format is mildly interesting, in that it's designed to use a fixed amount of space. Anyone who wants to see the technical details, can check the github repo, specifically this file.
Temperatures can be seen in celsius or fahrenheit online. An example in Fahrenheit is below.
Current Temperature
last updated: 2024-11-07 8:34pm
Sensor Temperature Humidity Last update
Outside - Front 51.51°F 69.86% 1 minutes ago
Outside - Back 64.26°F 99.99% 22 hours, 49 min ago
Upstairs - Dining Room 69.67°F 53.24% 0 minutes ago
Upstairs - Bedroom - Za3k 71.35°F 60.15% 21 minutes ago
Upstairs - Bedroom - Master 68.90°F 58.11% 4 minutes ago
Upstairs - Kitchen 71.20°F 50.50% 6 minutes ago
Upstairs - Garage 65.55°F 60.65% 2 minutes ago
Basement - HVAC/Server 68.02°F 51.27% 3 minutes ago
Basement - Workshop 67.10°F 52.91% 14 minutes ago
-------------
Hourly Temperature
last updated: 2024-11-07 8:34pm
outside inside
2024-11-07 8am 54.49°F 69.44°F
2024-11-07 9am 53.81°F 69.04°F
[...]
2024-11-07 6pm 56.11°F 69.86°F
2024-11-07 7pm 53.53°F 69.65°F
-------------
Historical highs and lows
last updated: 2024-11-07 8:34pm
outside inside
2024-11-07 51.51 - 64.15°F 67.06 - 81.54°F
2024-11-06 61.21 - 71.24°F 68.36 - 81.18°F
[...]
2024-10-10 49.39 - 60.89°F 67.59 - 77.49°F
-------------
Code: https://github.com/za3k/temp-monitor
Having tested out zigbee and mqtt, I felt ready for my actual use case -- curtains. I live across the street from a major parking lot, and they have floodlights on all night. To sleep, I need blackout curtains. The problem is, it's pretty hard to wake up with blackout curtains drawn.
My solution was to get some smart curtains, and have them automatically go down at the end of the day, and go up in the morning.
This worked fine, after I got the curtains set up. I've completely forgotten about them, which is exactly how I like my home automation--I want to never think about it. For more about how to set up IKEA smart curtains, see my notes. It comes with 6 manuals.
blinds controls my blinds via the computer, and mqtt2mqtt allows my IKEA remote to control them too. cron and heliocron automatically open and close the curtains on a timer.
I worked on monitoring power usage via my circuit breaker with current transformers and the circuitsetup ESP32 energy meter but it's currently stalled. The main problem is that I can't fit the CTs into my circuit breaker. If I get it working, I'll post an update.
As on day 02, I tried to make a soma cube, this time milling it out of aluminium on a milling machine.
I picked up some aluminium from a local supplier, and headed to Hive13, the local hackerspace, to use their milling machine.
After about 7 hours, despite hard work, I had almost finished cutting the blanks, and that was it. Milling is no joke, especially for a beginner!
And had to call it a night, both because I was tired and because the weekly meeting was starting. I was feeling pretty rough after this one -- three, nearly four failed projects in a row is not a great start to a hackathon.