Remapping Keychron K15 (QMK) media keys to control Sonos

  • Post author:
  • Post category:MacOS

Disclaimer: despite what people seem to assume when you buy a mechanical keyboard, I am not a keyboard fetishist. I’ve been using Microsoft Sculpts for over a decade because of historical repetition injury issues, and with Microsoft discontinuing the Sculpt and the new manufacturer taking their time taking over, all I want is a keyboard which is like a Sculpt, except where I haven’t worn out the space bar. I will then go back to thinking approximately never about keyboards.

So, the keyboard I could find which was closest to the Sculpt after a lot of Googling was a Keychron K15 Max, which is a QMK keyboard. For those which don’t know, which included me until yesterday, QMK is the open source firmware that many of these mechanical keyboards run and yes you really can customize the firmware on your keyboard now. The K15 is a 75% “Alice” layout, which means split with no numpad. It does have media, function, and macro keys which is nice. I’ve never had a keyboard with macro keys before. It also has low profile switches, which is nice because the Sculpt basically has laptop style switches, and I chose the Gateron Brown low profile switches because I didn’t think I wanted the tactile “clicky” thing. Then again, I have now tried exactly one mechanical keyboard, so its entirely possible the K15 isn’t “perfect” for me — its simply good enough to make me stop thinking about such things.

(more…)

Continue ReadingRemapping Keychron K15 (QMK) media keys to control Sonos

HomeAssistant configuration

I've recently been playing with HomeAssistant, which is quite cool. Its not perfect -- for example it broke recently for me without any debug logs indicating problems because it didn't want to terminate SSL any more, but its better than anything else I've seen so far. Along the way its been super handy to be able to refer to other people's HomeAssistant configurations to see how they got things working. So in that spirit, here's my current configuration with all of the secrets pulled out. Its not the most complicated config, but it does do some things which took me a while to get working. Some examples: The Roomba runs when no one is home, and let's me know when its bin is full. A custom component to track when events last occurred so that I can rate limit things like how often the Roomba runs when no one is home. I detect when my wired doorbell goes off, and play a "ding dong" MP3 in the office yurt out the back so I know when someone is visiting. ...and probably other things. I intend to write up interesting things as I think of them, but we'll see how we…

Continue ReadingHomeAssistant configuration

Thermostat (or, its happening again)

  • Post author:
  • Post category:Arduino

This is just a quick post at the moment because the project isn't done and I am distracted by other things... The thermostat for the central heater in my house became unreliable a week or two ago. My wife rang around and a new one from the manufacturer of the heater was going to be $450 AUD. So, it seemed obvious to make my own. I've just installed the 1.0 of it, with the board layout and manufacture being done by Doug once again. Other people seem to lack a PCB manufacturing back neighbour. I highly recommend you acquire one if possible.

Continue ReadingThermostat (or, its happening again)

Building a hygrometer with a HS1101

  • Post author:
  • Post category:Arduino

The next sensor I wanted to add to my home was a set of hygrometers. Specifically I wanted an exterior one, and a matching interior one. This would be useful as we have evaporative cooling, and if the humidity level outside is already high, then it doesn't make a lot of sense to put extra water into the air. Worse than that, it can also damage my books and make the house really clammy. So, adding some sensors was the first step in some form of alerting. I picked up two HS1101s from ebay quite cheaply (about $4 each IIRC). These devices are capacitors whose capacitance varies proportionally with relative humidity. You also need to provide a temperature at the sensor to correct the value, although the correction is pretty minor so I guess you could skip this if you really wanted to cut costs. Given I have plenty of code for Dallas 1820s now, I just dropped one of those onto the board too. I just used the circuit from the data sheet for my design, with a few simple tweaks (like the DS1820). Here's my surprisingly unprofessional circuit diagram: The DS1820 stuff that's not on the data sheet…

Continue ReadingBuilding a hygrometer with a HS1101

The Beer Fridge saga continues

  • Post author:
  • Post category:Arduino

Since the last update on the beer fridge, we've had to do some murdering of the original PCB to get it to fit in a case. In addition, we'd failed to take into account the startup power draw for the compressor (5 amps), and had to upgrade the relay we're using from a 3 amp solid state relay. Luckily Doug had the beefier relay just sitting around in his shed. That means we've lost our opto-isolation because the new relay is a simple mechanical one, but we have a relay coil doing the same thing now. A new PCB will make the world a lot neater, which will be nice. Oh, we've also been mentioned on Hack a Day, which has generated some interesting comments on their site. I've observed that sometimes the relay doesn't turn on, even though the arduino thinks it has done so. An example can be seen here: (Note that graph is a Google chart server image, generated by a simple visualization program I wrote in python. If you're that way inclined, the visualization software is in my public SVN repository). At first we thought this was a software problem with comparing ints to floats, but…

Continue ReadingThe Beer Fridge saga continues

Beer fridge controller 0.3

  • Post author:
  • Post category:Arduino

Last night Doug made up the first cut of the PCB for the beer fridge controller mentioned in previous posts, and we fitted the arduino to it. There wasn't much in the way of software changes, apart from changing the pin that the compressor runs on. You can see here that we've mounted both the arduino and the Ethernet shield onto the PCB -- this is just temporary until we get the PCB right. The black rectangle at the front right is a 240 volt capable relay, and the thing behind it is a 240 volt transformer which is capable of powering all the electronics on the boards. In the final PCB we wont need the arduino at all -- just the Ethernet shield and the atmega 328 from the arduino. However, that didn't work out this time around because of problems getting the Ethernet socket to fit nicely. Its clearer on this picture of the other side of the board: See how we had to cut a hole in the PCB for the socket? That took out some of the pin holes for the atmega, and a few tracks. Its not a big problem because we're going to iterate…

Continue ReadingBeer fridge controller 0.3

Beer fridge controller 0.2

  • Post author:
  • Post category:Arduino

Further to yesterday's post about the beer fridge thermostat replacement, I've been hacking on ethernet support for the controller. This is handy because I'd like to log the temperature and compressor state over the network, because I'm hoping that can be used to make calculations about the thermal mass of the contents of the fridge, and therefore derive how much beer is actually in the fridge at any given time. Because the controller also supports more than one temperature probe, I'll also add more 1-Wire temperature sensors around the house so I can determine important things like if its hot in the outside world. The code is currently experiencing some bloat in the binary size, mainly because the ethernet library and the sprintf implementation are quite large. I'll have to think more about that. Here's the current code: #include <enc28j60.h> #include <etherShield.h> #include <ip_arp_udp_tcp.h> #include <ip_config.h> #include <net.h> #include <websrv_help_functions.h> #include <OneWire.h> #include <DallasTemperature.h> // Temperature sensor and compressor setup #define COMPRESSOR 9 #define ONEWIRE 3 #define HIGHTEMP 4 #define LOWTEMP 3.6 // 220L Kelvinator is 85 watts #define COMPRESSOR_WATTAGE 85.0 #define SLEEP_SEC 10 OneWire oneWire(ONEWIRE); DallasTemperature sensors(&oneWire); unsigned long runtime = 0, chilltime = 0, last_checked = 0, this_check…

Continue ReadingBeer fridge controller 0.2

Beer fridge controller 0.1

  • Post author:
  • Post category:Arduino

On the weekend I picked up a 220 liter beer fridge for $20. Its in really good condition (ignoring some minor rust in the freezer section), and the only real problem with it is that the thermostat doesn't work leaving the compressor on the whole time. Doug suggested that instead of just buying a new thermostat, we should build an arduino fridge controller. I'm not really a hardware guy, but once Doug had pointed me at the Dallas 1820 1-Wire temperature sensor, and lent me some resistors, it was pretty easy to pull the software side together. Note that this version doesn't actually do any of the compressor control -- it simulates that by turning a LED on. The compressor stuff has been delegated to Doug and will be mentioned later. You can see that the circuit is in fact really simple. There is a LED to simulate the compressor (with a resistor), and then the 1-Wire temperature sensor (with another resistor). The code is pretty simple too. Here's my latest fancy version: #include <OneWire.h> #include <DallasTemperature.h> #define COMPRESSOR 13 #define ONEWIRE 2 #define HIGHTEMP 4 #define LOWTEMP 3 #define SLEEP_SEC 10 // 220L Kelvinator is 85 watts #define COMPRESSOR_WATTAGE…

Continue ReadingBeer fridge controller 0.1

End of content

No more pages to load