Gracefully Degrading Home Automation

Over the past two years, I have gradually increased my use of home automation in our small city apartment. I started with an IKEA TRÅDFRI light and a button, and today have over 40 devices doing useful things, saving electricity and making our living more pleasant. I won’t lie: I have done a lot of this just for fun and learnt quite a bit in the process. But if it doesn’t eventually result in utility or aesthetics, then I get rid of it. I can’t stand keeping frivolous stuff in the long run.

In this post, I’d like to describe the architecture of our home automation and specifically talk about how a graceful degradation of capabilities is crucial to the reliable operation of devices at home, which itself has important safety implications. Unfortunately, most people do not have access to a setup like mine, and it takes an industry and perhaps regulation to streamline these fundamental capabilities into smart home devices. On the other hand, if you have the time and the skills, this post should have some useful tips.

read the rest …

Understanding Color Management

I worked on a project where I dived deep into understanding how modern color management works, including things like color spaces, ICC profiles and more. As I learnt here and there, I decided to write this post, both for my future self, and others who may struggle with some of the concepts as well.

What is color management?

Color management deals with translating between representations of colors across a variety of devices. Throughout this post, we’ll use natural language as an analogy to describe various terms and concepts.

Why is color management needed?

Just as with language, one’s notion of the color “orange” can be different to someone else’s. One person could be referring to the color of a highlighter, while another can think of the skin of the orange fruit. Extending this analogy further, not everyone speaks the same language. Therefore, being able to translate is essential for a shared understanding.

read the rest …

Annotate PDFs on Linux

This post is about a GUI tool called pdfrankenstein that fills a gap on mostly Linux machines where a powerful and easy to use PDF annotator does not exist.

Adobe Acrobat® on Windows and Mac allow you to add text, drawings and signatures to PDF documents. This is useful when filling forms or marking notes to send back to someone. Such a tool with similar capabilities and easy of use does not exist on Linux. The reason that’s often cited is that PDF is a complex format and creating a general purpose PDF editing tool requires far too much effort than can be expected from an open source project.

read the rest …

Travel Tips

A bunch of disorganized tips and product recommendations for when traveling abroad:

read the rest …

Defeat Street

Some of the sincerity slimed up on me
Cards wrote themselves and rifled me
Rigging the blast door to explore didn’t pan out this time
Rushed in, gobbled up and left me bottled up, that monstrous cub

To tell you the truth, I snort mousse
Rust seeps into cereals I produce
Rum may run rampantly down the drain, so let me think
I’ll leave a limb in the pipes to entice a drink

Days with you

My days with you roll off the line
shrink wrapped and mint

I get to live brand new days
behind a floral tint

My dreams of you are extended by you
past the morning light

Am I awake or fast asleep baby?
I need a hint

Powering Starlink on the go with Tesla Model 3

I’ve had my Tesla Model 3 for more than a year now. It has been an absolute pleasure so far and I would not trade it for anything else at any price including Tesla’s other offerings (yes, talking about S Plaid). Model 3 just has the most beautiful exterior of any other car. OK, let’s stop here because I can go on forever. But not without a photo of Tin Can:

Tesla Model 3

“Tin Can” is a reference to Major Tom’s spaceship.

I live in the city and have a fixed broadband and 5G around but being the tech head that I am, I had to sign up for a Starlink service. I actually thought of uses, mostly for when traveling. I put down my deposit in February and received my dish two month ago. I knew when I signed up that I would need to make it work with my car and while I waited, I crunched some numbers, with the assurance that should I determine it won’t be feasible to run Starlink from the car, I can simply cancel my order.

Model 3 can output 12A continuously on its accessory outlet (aka cigarette lighter port). With a nominal voltage of 12.7V, that’s 150W of continuous power, or 140W when taking into account the regulation losses when stepped up to 56V needed by Starlink. Starlink’s own power supply has a total maximum output of 180W. That doesn’t look too good until one digs a bit deeper through forums and learns that Starlink’s user terminal, called Dishy McFaltface, generates heat either as a result of higher transmit power, or specicially to deal with cold weather and snow. That’s where half of that 180W seems to go into. As luck has it, I live in a warm climate so it’s unlikely that mine would consume as much power. It’s also worth noting that with each firmware update, the dish’es consumption seems to drop ever futher down (40W reported by some users as of late).

TL;DR we need 90W of continuous power to run Dishy and have 140W available from the car.

read the rest …

Installing Arch Linux on Raspberry Pi with WiFi pre-configured

TL;DR Super easy to use standalone offline Arch Linux installer for Raspberry Pi which also configures your WiFi and other config on first boot.

Arch Linux and Raspberry Pi are made for each other. I run them together every where in my home. However, I have found the official installation instructions to be a bit cumbersome, especially if you are doing it often. So I made a GUI application where you just pick your SD card, and hit install. That’s it! It even allows you to configure your WiFi settings so your Pi will boot connected to your network and ready to be SSHed into.

Raspberry Pi Arch Linux Installer Screenshot

This application also runs in interactive command line and batch mode.

fpx: easy USB‑C power for all your devices

TL;DR tiny and easy to use USB-C module to power everything; get one and configure it anywhere, even on your phone!

My first attempt in using USB-C adapters as a power source was met with great enthusiasm. It was just a breakout board for STUSB4500 autonomous USB-PD sink controller. It has since been picked up by Sparkfun with a much better design (as you would expect).

Although sufficient, I wasn’t very happy with how much effort was needed to program the chip. It required talking I2C which for me meant an Arduino had to be available, connected to a computer with USB and a whole bunch of jumper wires. I have since used Adafruit’s MCP2221A breakout board and a Raspberry Pi but the process still has a lot of friction. So, I set out to simplify the programming aspect of STUSB4500 and this post will take you through to what became fpx, a smaller and easily configurable version of fabpide2.

3D render of fpx board

This is a tiny module, measuring 21 mm × 12 mm

read the rest …

How to cut PDF pages into tiles

This post is about a command line tool called pdftilecut which I wrote a while ago that allows you to cut PDF pages into tiles in order to print a large page on small form printers for instance.

A little background: for my wedding, we decided to make an art piece we called “the portal”. It was basically a steam punk spaceship door with an iris window.

Art piece in shape of steam-punk spaceship door

This thing took many weekends to get done and it was so much fun. Too bad we didn’t have the space to keep it so we threw it away. It sat on the background and every now and then would slowly open and show a planet pass-by.

read the rest …