Linux (or macOS) related

Reading out Kamstrup Multical 402/403 with home-built optical head

By Atomstar on Monday 16 November 2020 21:09 - Comments (4)
Categories: Linux, Smarthome, Views: 1.590

Our grid heating meter has been replaced, and since I like to read out meters, I had to replace my read out sensor as well. Here I document how I custom-built an IR / optical head to read out the Kamstrup Multical heat meter using their proprietary protocol.

TL;DR:
  • Get head from using the hal9k.dk reader head (archive) then solder together (22 EUR including shipping in EU, a bargain :) Best to pay with PayPal because banks apparently charge a ridiculous amount to transfer money across currencies.)
  • Connect to an FTDI USB TTL reader (e.g. at tinytronics)
  • Use either use this python script to read out the sensor and push to domoticz, or use my fork to push to InfluxDB or MQTT. Note that the original script seems to use more battery than required (see issue on GitHub repo, being worked on)
  • Useful background info on the Kamstrump Multical meter sensor here (archive) and here (archive).


Read more »

Coupling my fiber internet directly into my router

By Atomstar on Monday 13 July 2020 21:24 - Comments are closed
Category: Linux, Views: 354

I have FttH which we use for our internet. Because I can, I replaced our NTU (Network Termination Unit) that converts optical to electrical signals, and directly coupled the fiber into my MikroTik router. Here I summarise my findings for my own record and hopefully to help others. Among other things, I cover TX/RX wavelengths, fiber ends, fiber connectors, SFP compatibility, transceivers, and DHCP & VLAN settings.

Read more »

Securely wiping SSDs

By Atomstar on Sunday 29 December 2019 10:57 - Comments (14)
Categories: Linux, Security, Views: 3.977

Wiping data carriers can protect personal data when reselling these. Since SSDs have quite some error-handling and buffering logic, these are more difficult to wipe.

I document my best-known method here. TL;DR: as commenters pointed out, ideally use OS-level encryption, then throw away the key. Alternatively, built-in security erasing via hdparm, combined with shred.

Read more »

Infrared remote control hell with an Intel NUC, Logitech Harmony, lirc, ir-keymap and Kodi

By Atomstar on Monday 11 November 2019 09:00 - Comments (3)
Categories: HTPC, Linux, Views: 4.648

So I got a new (second hand) Harmony Remote and would like to control my AV setup with this. I document my findings in the jungle of IR control on Linux here.
  1. Old situation: Kodi (on Intel NUC/Ubuntu 18.04) controlled via LIRC using Apple TV remote
  2. Desired situation: Samsung TV + Pioneer AV receiver + Kodi on NUC controlled with Logitech Harmony and Kodi also with the Apple TV remote.
What's working:
  • Harmony remote controls all devices
  • AppleTV and Harmony can both navigate Kodi
  • Harmony shuts down Kodi and NUC
What's not working:
  • Kodi doesn't detect all keys from Apple TV remote (e.g. KEY_OK / KEY_MENU / KEY_BACKSPACE). Workaround: use KEY_DELETE and remap in Kodi's keyboard.xml
What's unclear:
  • Why does evtest show two IR event inputs?
  • Why does Kodi have multiple keymaps?


Read more »

Automated full-disk backup on Linux/Ubuntu

By Atomstar on Friday 4 October 2019 18:14 - Comments (5)
Categories: Linux, RaspberryPi, Views: 3.356

Now that I'm storing my valuable smart home data (;)) on Raspberry Pi I need a backup in case something goes wrong, most notably a power failure.

I settled on a full-disk rsnapshot incremental backup scheme, combined with explicit influxdb backup which seems to work nicely.

Read more »