M0AGX / LB9MG

Amateur radio and embedded systems

  • Home Assistant and HAN port electricity meter

    All modern electricity meters in Norway have a local interface called the HAN port. It allows you to read out live data from the meter using your own hardware. Even though all electricity suppliers these days provide apps that show you your usage they rarely do it in real-time and …

    Read more...

  • Interview questions for embedded engineers

    This is an article about technical questions that can be asked in an interview for an embedded systems engineer that I have "standardized on" after doing multiple interviews. It does not cover other topics like how to do the initial screening, task assignments, soft skills, or "fantastic beasts, where to find them and how to retain them".

    Read more...

  • What is inside a Mean Well DIN rail power supply

    I bought a small power supply in DIN rail form factor to provide 12V for the Waveshare RS485 to Ethernet converter mounted in my breaker panel. The exact model is HDR-15-12.

    Installation is trivial as it only has 2 screw terminals for the AC input and 2 for the DC …

    Read more...

  • Scheduling posts with Pelican

    Pelican has no facility for scheduling posts. However, it is very easy to do it with basic shell scripting and cron. I started by adding Scheduled: yes field to the draft post. Read more...

  • Practical comparison of ARM compilers

    My inspiration for this article was this thread in r/embedded. There are still many myths and misconception when it comes to the simple questions "Which compiler should I use?" or "Which compiler is the best?". I will try to share my practical experience with GCC, Clang and IAR on …

    Read more...

  • Connecting Modbus RTU to TCP with Waveshare RS485 to Ethernet converter

    I have been planning to connect my Modbus electricity meter to Home Assistant for a while. Unfortunately my Home Assistant machine is placed far away from the breaker panel and I wanted to avoid running extra cabling. Modbus RTU to Modbus TCP conversion has been a solved problem for a …

    Read more...

  • Connecting a Modbus energy meter to Home Assistant

    I have an electricity meter that supports communication over Modbus. I wanted to add it to Home Assistant. Modbus is supported out-of-the-box by Home Assistant but I could not find an end-to-end tutorial how to connect a device and how to use a Modbus sensor for energy tracking. This article …

    Read more...

  • Getting Home Assistant uptime in minutes

    My Home Assistant installation sends out several "device normal" notifications right after startup. I wanted to avoid being bombarded with useless notifications so I needed to filter out these events. The most obvious condition can be Home Assistant uptime. Basically: send a device status notification only 1-2 minutes after startup …

    Read more...

  • Water leak app notification in Home Assistant

    Home Assistant is an extremely flexible home automation solution that does not come in a magic locked-down box. The flexibility comes with difficulty figuring out how to actually do things because of so many options and different approaches (just like with Linux overall).

    I installed some Zigbee water leak sensors …

    Read more...

  • Migrating to Pelican

    Returning readers: please update your feed reader with the new RSS or Atom URL.

    Last updated 06 Aug 2023.

    I decided to migrate my blog from Wordpress to a static site generator. My main motivation, apart from just trying something new for the sake of it, was the endless stream …

    Read more...