News and Recent Posts

Ubuntu 20.04 Server: Wi-Fi, Snap, etc

September 5, 2020.

Installation and configuration of Ubuntu 20.04 Server on an older computer with a lesson learned about network configuration in Ubuntu [...more]

DNS and Static IP Address


Self inflicted wound: I had not expected that changing the domain name servers would break time synchronization on the backup server [...plus]

Belated Spring Cleaning

Last Update: August 14, 2020. Original version: August 9, 2020

After delaying for quite some time, I have begun the long and boring job of cleaning up this site. This involves a slightly fresher and more compact start to each page as seen here. The home automation and programming indexes were removed mostly to make my life easier but also because I was feeling increasingly cramped with that choice.

There are now only two search engines on tap for a local search. I chose DuckDuckGo and StartPage because of their privacy claims. This choice is not an endorsement, as I have no way of verifying if a site tracks searches and uses, shares or sells the data. Searches limited to this web site with the usual search engines can be done from the archives page.

Converting the whole site will take quite some time. So far, the posts published in the last 12 months and a few older ones have the new look. Hopefully, nothing is broken but please send me an e-mail (link at the bottom) if there is something wrong.

Installing and Configuring WireGuard on Raspberry Pi OS (August 2020)

Last Update: August 5, 2020. Original version: July 4, 2020.

The WireGuard package is now included in the Debian and Raspbian testing repositories. The latter is very good news, because the Raspbian continues to support the ARMv6 architecture found in older Raspbery Pi models and current Zero models as well as the ARMv7 and ARMv8 architectures found on recent models. There is now a single approach to installing a WireGuard virtual private network server on any Raspberry Pi model [...more]

Installing and Configuring WireGuard on Raspberry Pi OS (May 2020)

Last Update: July 30, 2020. Original version: July 4, 2020.

While Raspberry Pi OS, the newest version of the "official" operating system for the Raspberry Pi, has changed name, it remains based on the 4.19 Linux kernel just as Raspbian Buster had been. Nevertheless, I tried to improve my post on the installation and configuration of a WireGuard virtual network server, because it is one of the most consulted pages on this site. There is an addendum showing how to install WireGuard on all Raspberry Pi models using a "beta" Raspbian WireGuard package [...more]

Serial Peripheral Interface on the Raspberry Pi

Last Update: July 18 2020. Original version: May 10, 2020.

This post is another of those that document my never ending need to learn something about micro-controllers. This time I am investigating the Serial Peripheral Interface (SPI) on the Raspberry Pi. I examine both the hardware and the Python spidev module and even attempt to update a "well-known" document about the later which was available about five years ago. The SPI is investigated under the newest version of Raspberry Pi OS in the revision and, hopefully, the descriptions of the buffering functions xfer2 and writebytes2 are improved [...more]

"Hello XIAO" in PlatformIO

June 24, 2020

PlatformIO now supports the Seeeduino XIAO. Some prefer PlatformIO to the Arduino IDE. New users of PlatformIO or those that are curious about that programming environment may want to consult this short post on how to upload a very simple program to the XIAO in that environment [...more]

I²C Clock and EEPROM Memory Module in Rasberry Pi OS

June 21, 2020

While Raspberry Pi OS and Raspbian Buster are both based on Debian 10 and the 4.19 Linux kernel, there are differences that made my Febrary post about a ubiquitous DS3231 real-time clock with an AT24C32 EEPROM module out of date . I found it easier to leave the old post in place, and copy and paste most of it in this new article, only changing what needed to be fixed in the new OS. That way, it will not be necessary to refer to the old article unless one is still using Raspbian [...more]

Domoticz Backup Scripts

Last Update: June 12, 2020. Original version: May 29, 2020.

Once again, I will try to set up reasonable backup strategies. In this post, I discuss an important part of that endeavour, backing up the home automation server data files [...more]

Serial Peripheral Interface on the Raspberry Pi

Last Update: July 18, 2020. Original version: May 10, 2020.

This post is another of those that document my never ending need to learn something about micro-controllers. This time I am investigating the Serial Peripheral Interface (SPI) on the Raspberry Pi. I examine both the hardware and the Python spidev module and even attempt to update a "well-known" document about the later which was available about five years ago [...more]

Seeeduino XIAO Serial Communication Interfaces (SERCOM)

May 4, 2020

There are some good explanations on how to add a serial communication interface on SAM D21 based boards. However all those that I have found are for boards with many more I/O pins than the XIAO so that they are not that pertinent for this tiny board. In this post, I explain just what the problem is and how it is nevertheless possible to add a supplementary SPI, I²C or USART port on the XIAO as long as another type of communication interface is forgone [...more]

Adding the Seeeduino XIAO in PlatformIO

May 3, 2020

A very knowledgeable reader of the first version of the Overview of the SAMD21 Arm Cortex-M0+ Based Seeeduino XIAO kindly provided instructions to manually install the XIAO board definition in the PlatformIO development environment. Because all the hard work was already done for me, it was a simple two-step procedure [...more]

I²C Light Sensor using a Seeeduino XIAO

April 24, 2020

Using the XIAO in master mode to control and I²C slave device was already discussed in the first look at the Seeeduino XIAO. The topic of I²C communication with the XIAO is again the topic but this time the emphasis is on data exchange with a Raspberry Pi. To the latter, the XIAO will appear to be an I²C analogue light sensor [...more]

Installing and Configuring WireGuard on Raspbian Buster

April 19, 2020

For a few reasons, I decided to rewrite in large part the instructions on how to self-host a WireGuard virtual private network on a Raspberry Pi. For one thing, the original post was rushed because at it was difficult to get the correct repository keys. At the time, I was in the process of writing a long winded yet superficial explanation of VPN. Reading my old post when answering a query from someone, it became clear that there was a supposition that readers had read that non-existent dissertation. Clearly, pieces of the puzzle were missing. Another problem was that the old post was getting... old. More bits were expended on installation on Stretch than on Buster which is now on its third edition [...more]

Asynchronous Ping for an ESP8266 Internet Watchdog

April 11, 2020

While reviewing my ESP8266 router watchdog code, it struck me that using a blocking (or synchronous) ping library to check the status of the Internet connection was not the proper approach. In this post, I present an example project that monitors if the Internet can be reached using the AsyncPing library by akaJes [...more]

Overview of the SAMD21 Arm Cortex-M0+ Based Seeeduino XIAO

Last Update: May 11, 2020. Original version: April 4, 2020.

This post contains my first impressions of the Seeeduino XIAO from Seeed Studio. Because I don't really have much experience with micro-controllers except for a bit of work with the ESP8266 and the occasional experiment with Arduino boards, this overview will be at a rather superficial level. Nevertheless, it describes some 15 Arduino sketches showing different capabilities of this new development board. Hopefully, this will be of interest to others starting out with this impressive little board [...more]

Blink with a Wio Lite RISC-V

April 3, 2020

Seeed Studio has come out with a new board called the Wio Lite RISC-V with ESP8266. The unusually shaped board is based on the 32-bit RISC-V GD32VF103CBT6 micro-controller by GigaDevice. In addition there is a Wio core based on an ESP8266 which should provide Wi-Fi connectivity. The development software is not yet completed at least for the Arduino platform, but I did manage blink the on board LED with the PlatformIO development environment on a Linux desktop [...more]

"Hello World!" with the Longan Nano

March 31, 2020

These are my first steps with the Sipeed Longan Nano based on the 32-bit RISC-V GD32VF103CBT6 micro-controller by GigaDevice. Development of three Blink projects is done in the PlaformIO environment using the Arduino framework on a Linux desktop. The first blinks an LED, the second also sends the state of the LED to a serial port while in the third, the state of the LED is shown on the included display [...more]

Raspberry Pi Hardware Watchdog: Two Pies Please

March 28, 2020

This is about using a Raspberry Pi as a hardware watchdog of another Raspberry Pi. The watchdog Pi could be a Raspberry Pi Zero or Zero W while the monitored Pi is a "mission critical" server such as a home automation system. Hopefully, the intelligent watchdog will prove better than the hardware watchdog for crypto-currency mining rigs that I have been using for some time, but which suffers from three problems which are important enough to warrant its replacement [...more]

Warm and Cold Reboots of the Raspberry Pie

March 21, 2020

In preparation for the new hardware watchdog that will monitor the home autpmation system on a Raspberry Pi, I delved into the details of software and hardware resets of the Pi under the Raspbian operating system. I found that both aspects were well thought out by their respective developers so that it will be relatively easy to create an "intelligent" hardware watchdog for the Pi [...more]

Rethinking the Raspberry Pi Hardware Watchdog

Last Update: March 20, 2020. Original version: February 5, 2020.

Although the hardware watchdog for crypto-currency mining rigs has been operating without apparent problems as a device for monitoring the home automation system for several months, I am not entirely satisfied with it for three reasons. It is time to develop a replacement. So here is the announcement of a research program on this subject. Please excuse this pompous last sentence, but I intend to document five or even six approaches in the coming weeks. [...more]

I2C on the Orange Pi PC 2 with Armbian Bionic

March 5, 2020

This post discusses available I2C buses on the Orange Pi PC 2. It shows how device tree overlays are used to enable up to three I2C physical buses, two available on the 40 pin GPIO connector and the third on the cameral serial interface connector. It also illustrates how compile and enable a custom overlay that installs a driver for DS1307 compatible real-time clock using one of the physical I2C buses. [...more]

ALSA and Bluetooth on the Orange Pi PC 2 with Armbian Bionic

February 29, 2020

Yet another Bluetooth related post, but this time the context is different. The post describes setting up Bluetooth on an Orange Pi PC 2 (an Allwinner H5 based single board computer) running the latest version of Armbian Bionic [...more]

The DS3231 Century Flag and Day of Week Register

February 21, 2020

Somehow, I got sidetracked while trying to follow up the previous post with DS3231 real time clock alarms and the SQW interrupts. Instead I looked into how the DS3231 and Linux keep track of centuries and the day of week [...more]

I2C clock and EEPROM memory module for Raspberry Pi

Last Update: February 23, 2020. Original version: February 18, 2020.

When installing a new hardware clock, I learned a bit more about the DS3231. The clock module also contains AT24C32 type 32K bit EEPROM memory (4K 8-bit bytes). Rereading the post, I realize that its main subject may very well be the I2C bus on the Raspberry Pi [...more]

A Second Look at the Orange Pi PC 2

February 16, 2020

Six months ago I purchased an Orange Pi PC 2 which is a single board computer based on the Allwinner H5 system on a chip. I never finished writing up about my first impressions. Now that the board is no longer available, I have reexamined the board. Hopefully the post will be of some use to new owners of other boards based on the H5 that want to use Armbian Bionic as the operating system [...more]

Using the Sparkfun Tiny AVR Programmer in Ubuntu 18.04

January 16, 2020

After fumbling around for a couple of hours, I have finally managed to flash the traditional blink sketch on an ATtiny85 with the Sparkfun Tiny AVR Programmer using the Arduino IDE (version 1.8.10) in Ubuntu 18.04. Perhaps others will run into some of the difficulties I encountered so here is how I go about it [...more]

Temperature and Humidity Sensor and Reboot/Shutdown Switch for the Raspberry Pi

December 18, 2019

Two additional sections have been added to the never ending post on Various Hardware with Raspbian Buster Lite. The first shows just how easy it is to connect a DHT11 or DHT22/AM2302 temperature and humidity sensor to a single general input/output pin of the Raspberry Pi. The second shows how to add a reboot/shutdown switch to the Pi.

Upgrading U-Boot and Installing Linux on a Headless La Frite (AML-S805X-AC)

December 13, 2019

Here's how to upgrade the U-Boot boot loader of a headless La Frite (no monitor and no keyboard connected) from a Linux computer and upload an operating system to the eMMC memory module of the single-board computer. Libre Computer [...more]

The Domoticz Time Synchronization Problem

December 9, 2019

The solution that I was using for the problem causing Domoticz to shut down if there was time synchronization problem does not work in Ubuntu 18.04 (Bionic). The problem is discussed at length and a new solution using a systemd unit file to start the service is provided. I removed the lengthy discussion in the guide to Home Automation Servers on Raspbian Buster Lite and only show how to use a unit file to start Domoticz [...more]

Cheap Of-the-Shelf Raspberry Pi Hardware Watchdog

Last Update: December 21, 2019. Original version: December 4, 2019.

This is about using a cheap so called USB watchdog meant for cryptocurrency mining rigs as an external hardware watchdog for the Raspberry Pi. This is a single relay watchdog which performs hard resets as a last resort. Perhaps later I will test the ubiquitous two relay USB watchdogs that appear to be much more flexible [...more]

Real-Time Clock on Raspbian

November 16, 2019

The section on the RTC in Various Hardware with Raspbian Buster Lite has been rewritten. I am quite happy to report that installation of a real-time clock is now much simpler in Buster. However, I still have questions on the subject and I have been investigating time keeping in Linux on and off over the last few days. Will I ever emerge from that rabbit hole? And if I do, will there be anything worthwhile to say about it? Stay tuned...

Report on Progress or Lack of...

November 12, 2019

I am making slow progress with the guide to installing a home automation system using Domoticz on a Raspberry Pi running Rasbian Buster Lite. The third part on installing hardware, still in draft form, is taking longer than expected as I stumble with changes because of the new version of Rasbian. I am striving to ensure that each step described is warranted. For example, I have found out that it is not necessary to explictely update the real-time clock nor is ntp needed. I am also learning perhaps more than I wanted to know about systemd. Older posts need to be updated. The fight against one of the banes of the Internet, the out of date how to blog, continues.

No More Tasmota/ESP8266 Mosquitto MQTT Disconnects

November 8, 2019

Want to git rid of all those socket errors and MQTT disconnects occurring for not apparent reason? Just upgrade your ESP8266 device firmware [...more]

Installation and Configuration of Raspbian Buster Lite

November 5, 2019

This is a major update to the initial October 27 post. There is a better explanation of how to do a first boot of the Raspberry Pi which now includes instructions to connect to the Pi with a USB to serial adapter. The Information for neophytes sidebar are collapsible which hopefully makes the layout cleaner. The presentation has been slightly reorganized to make it easier to follow the different paths to the initial installation of the operating system. Two sections that are more hardware related have been moved to the third post of the series on the subject. An incomplete draft of the third post is up so that these two sections remain available. [...more]

Home Automation Servers on Raspbian Buster Lite

November 2, 2019

This is part 2 of the series of posts about installing a home automation system around Domoticz on a Raspberry Pi with Raspbian Buster Lite. It covers installing the major services that are needed for the home automation system: the home automation server itself, an MQTT broker, a Web server, and others services that I find quite useful [...more]

Domoticz Tips, Tricks & Info

Last Update: May 31, 2020. Original version: November 1, 2019.

This is just a list of tips and tricks that can be found in the Domoticz documentation, Wiki or Forum that I find useful and decided to compile for easy retrieval. [...more]

Installation and Configuration of Raspbian Buster Lite

Last Update: November 5, 2019. Original version: October 27, 2019.

This is a first part of a three part series of posts that will chronicle the installation of a home automation system based on Domoticz. This first part describes in excruciating detail steps that can be followed to install the latest version of Raspbian Buster Lite on a Raspberry Pi. I hope it will be useful for a newcomer to the ubiquitous single board computer. [...more]

Hardware Watchdog - Need Information

October 15, 2019

In the hope of making my home automation system more reliable, I ordered hardware watchdogs from Chinese vendors on eBay and Aliexpres. One vendor sent the wrong item. The other sent what I ordered but there is no information about it. I think I have the basics of how the watchdog works, but can someone provide me with more detailed information? [...more]

Push Button and LED on a Single GPIO Pin

Last Update: October 13, 2019. Original version: October 8, 2019.

When a microcontroler project needs more input and output pins than the available number, it is always interesting to use a single pin for more than one purpose. I show in this post how to use a single GPIO pin as an output to control a light-emitting diode and as an input to read the state of a normally open push button switch. [...more]

An ESP8266 Based Router Watchdog

September 25, 2019

After a considerable delay, I have finally begun to improve the router monitor built around a Sonoff Wi-Fi switch that I mentioned back in April 2018. Among the improvements, I have added manual override of the monitoring function and MQTT functionality which makes it possible to remotely control the router monitor through an MQTT broker [...more]

Syslog Server on Raspbian and Tasmota Remote Logging

September 5, 2019

This is a much needed update of the original October 2017 post on how to set up rsyslog on Raspbian Buster as a centralized syslog server and how to enable remote error loggin in Tasmota [...more]

Flash Tasmota on a Sonoff in DIY Mode in Linux

Last Update: October 1, 2019. Original version: August 22, 2019.

Without Windows, the software provided by Itead to flash firmware on the newly available Sonoff Mini and Basic R3 cannot be used. Here's how to install Tasmota in Linux with the DIY mode REST API without using the Sonoff_Devices_DIY_Tools utility. I think we could do the same in Mac OS and Windows. On the other hand, more hardware is needed to create a Wi-Fi hotspot connected to the local network [...more]

Installing WireGuard on Raspbian Stretch and Buster

Last Update: July 14, 2019. Original version: July 4, 2019.

In the original version of this post, I overstated problems with the installation instructions kindly provided by Adrian Mihalko on GitHub. I hope to have made honourable amends in this revised version of the post by showing that the instructions do work in Raspbian Stretch. It is also shown that WireGuard can be installed with the apt wrapper if an additional step is taken. I have also found a German language post by Michael Bachmann, which updates the instructions for Buster. Finally, the Dietpi script which works in both Stretch and Buster [...more]

First Taste of La Frite (AML-S805X-AC) from Libre Computer

Last Update: July 14, 2019. Original version: July 11, 2019.

Back on the October 17, 2018 I backed a Kickstarter project by Libre Computer, named La Frite: Open Source Fries. Delivery was slated for November 2018, but there was a slight delay, and I received the package in the mail yesterday. Here are my first impressions after I installed Debian Stretch on a headless system [...more]

Installing WireGuard on Raspbian Stretch and Buster

Last Update: July 14, 2019. Original version: July 4, 2019.

Installing the WireGuard VPN server on Raspbian was not difficult, in great measure because there was good information available on the Web. But just lately, the instructions that I was following no longer work. So I hurriedly wrote this post to point out that the DietPi crew has a working script to install WireGuard on Rapbian Buster that also works on Raspbian Strech [...more]

Bluetooth, BlueALSA and Buster

July 2, 2019

The good news is that the newest version of the Official Linux Bluetooth protocol stack BlueZ is included in Raspbian Buster available since June 20, 2019. However some tweaking still needs to be done to use Bluetooth on the Raspberry Pi [...more]

For older posts see the Archives.