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 [...more]
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]
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]
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]
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
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]
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]
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]
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
Stretch than on
Buster which is now on its third edition
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]
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]
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]
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]
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]
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]
Temperature and Humidity Sensor and Reboot/Shutdown Switch for the Raspberry Pi
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.
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 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
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
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...
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
posts need to be updated. The fight against one of the banes of the Internet,
the out of date how to blog, continues.
Want to git rid of all those socket errors and MQTT disconnects occurring for not apparent reason? Just upgrade your ESP8266 device firmware [...more]
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
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.
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]
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]
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]
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]
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
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]
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
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
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 impresssions after I installed Debian Stretch on a headless system [...more]
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
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
A major retailer sells Wi-Fi dimmers and other IoT devices that meet Canadian safety standards and that are certified by recognized agencies. Here's how I installed two of these devices and how it was possible to integrate them into the Domoticz home automation system. Voice commands (Google Home and Alexa) also work [...more (in French)]
About some problems with the May 5th stable version of Domoticz. There was no reason to adopt it so quickly and had I been less eager I would have avoided some difficulties. Nevertheless, all's well that ends well [...more]
It is about time that a watchdog be setup on the Raspberry Pi that is hosting my home automation system. This post describes a first effort which aims to implement the basics:
- Reboot if the hardware watchdog times out.
- Reboot if Domoticz hangs.
- Send an email notification when the system reboots.
Perhaps undeservedly, the Orange Pi Zero has the reputation of running
hot. I wanted to use the Domoticz data logging
facilities to record the core temperature of the single board computer
which is on all the time running
HA-Bridge. And while
setting that up, I decided that I should also log any errors occurring
during the execution of the script that updates the temperature data on a
regular basis and look into sending some sort of notification if the
Orange Pi Zero seems to be getting too hot
This note is about how to configure an
rsyslog server to
have it forward some or all of the log messages it receives to a remote
syslog server. A method to send an email in response to an
alert message is also discussed.
As I speculated, HA Bridge is very good as a proxy between Amazon Alexa and IoT devices defined in Domoticz. And installation was a snap [...more]
ir-keytableutility contains over 130 remote control definitions and can be used to craft one if the IR remote is not among that list [...more]
To quote lirc.org "Using lirc on Raspberry Pie [sic] is quite popular these days." Being a self-style contrarian I installed the package on the Orange Pi Zero. I managed to get simple demonstration programs working with it. [...more]
The note shows the basics about handling button presses from an infrared
remote control using the
python-evdev package and the
built in kernel support for IR events on an Orange Pi Zero. Neither
LIRC (Linux Infrared Remote Control) nor
ir-keytable is used
Lately, I'm using an Orange Pi Zero for new projects. This means burning the OS image on a microSD card and then performing a number of initial steps, setting up networks, upgrading all installed packages and so on, that need to be repeated in exactly the same way each time a new image is used. All this takes time. So I decided to create a custom binary image that avoids these steps [...more]
This is a second look at the Amazon Echo Dot 3rd generation with emphasis on using it with HA Bridge on an Orange Pi Zero for local control of IoT devices. This is not a detailed explanation but a reassurance that devices installed in the bridge will be discovered with the 3rd generation Echo Dot [...more]
This is a continuation of the previous note on Bluetooth on the November 2018 version of Raspbian Stretch in which the default version of BlueZ is replaced with version 5.49 and later version 5.50. There is not much difference between these three versions of Bluetooth protocol stack at least for audio streaming [...more]
This is a short note reporting some changes encountered with the newest version of BlueAlsa when used with BlueZ version 5.43 with the latest version of Raspbian Stretch [...more]
Lately, I have experimented a lot with the new version of Raspbian Stretch Lite, trying different configurations and
software. To check that everything works, I prefer to return to the
operating system as obtained from the Raspberry Foundation. Whenever the
image is copied to the SD card, the
/boot partition must be
changed in order to start the Raspberry Pi without a keyboard or monitor.
Then the operating system has to be upgraded. All this takes time. So I
decided to create a binary image that avoids these steps
[...more (in French)]
This post shows how to install version 1.4.35 of the Lighttp web server in Rasbian Stretch. It then becomes possible to route the video stream obtained from MJPG-Streamer as could be done in Jessie. The problem with version 1.4.45 of Lighttpd is also better identified though no solution is offered [...more]
The original post has been corrected. Some changes were minor but it was wrong to state that the latest version of Mosquitto could not be installed. It was a good opportunity to make clearer how to connect the real-time clock and temperature and humidity sensor without having to refer to older out of date posts. [...more]
How can I get on with software experiments and updates when new hardware keeps on arriving? In this second "mailbag" post without a video stream, I will present my first impressions of a cheap wireless IP camera, the 3-pole Itead Sonoff T1 wall switch, the new version of the Itead Sonoff Basic and the 3rd generation Amazon Echo Dot. [...more]
The post entitled All does not always work has been updated and translated into English. I added an item about the automatic update of the home automation IP address at FreeDNS. I also added an explanation for my problems with using the Arduino IDE to compile TASMOTA.
Information about installing and using K3b to burn a CD/DVD/Blu-Ray disk has been added to Installing Ubuntu 18.04.1, Additions and Adjustements. This post is in French only.
The New Year seemed like a good time to tackle once again the task of updating the Raspbian operating system on my Raspberry Pi hosting my home automation server. This is but another of my series of posts on setting up a Raspberry Pi so it would be of interest mostly to new fans of small single-board computers. I did manage to do a truly headless installation, and I did resolve some little problems which may be of general interest [...more]
Here are three projects under development that work on the home Wi-Fi network: a touch-controlled lamp, a Wi-Fi temperature sensor, and a weather data display. The first two are connected to home automation software, Domoticz, the latter could be in the future [...more (in French)]
By way of proof that I am far from being an expert in the field, here are some projects that have not succeeded as expected [...more (in French)]
New version of Domoticz
A new version of the home automation server Domoticz (version 4.9700) has been available for a few weeks. This version in now compatible with Raspbian Stretch (version: June 2018, kernel: 4.14).
However, I ran into problems with the secure connection of the video stream as described in the post entitled Secure Webcam streaming with MJPG-Streamer on a Raspberry Pi. For some reason, I can get snapshots through the secure lighttpd proxy server but not the video stream. If I ever solve this mystery, I will update the post.
This is a second take on connecting a Bluetooth speaker to the Raspberry Pi 3 running under Raspbian Stretch (based on Debian 9). In this version, the somewhat more radical route of updating BlueZ is used. This post also goes on to show how the Raspberry Pi 3 can be a used as a Bluetooth speaker playing sound emanating from another Bluetooth enable device. [...more]
Installing Music On Console (MOC) on a Raspberry Pi 3 running with Raspbian Stretch was just as simple as it had been when I installed it on an Orange Pi Zero with Armbian a few weeks ago. However things got complicated when I tried to send the sound out to a Bluetooth speaker [...more]
Update: April 23, 2018
I have just finished translating the April 11 post to French. As often occurs when there is a fair amount of time before I undertake a translation, I actually modified the content a little bit. This reflects the experience I have gained in streaming the webcam. The English version is now updated.
Using MJPG-Streamer it is possible to stream video from a webcam connected to a single core Raspberry Pi B+ that is also running my home automation server and an mqtt broker. Furthermore, using a web server on the same Raspberry Pi, the video stream can be encoded and served over an HTTPS connection. [...more]
With a seeed studio ReSpeaker 2-Mics Pi HAT, it becomes possible to move my voice recognition project over to a Raspberry Pi 3. Hotword recognition will be done with snowboy from KITT.AI. The good news is that the ReSpeaker HAT seems to work well. The bad news is that there is now some sort of incompatibility between snowboy and Google Assistant Service [...more]
This post is just like a ubiquitous YouTube "mailbag" video only without a video feed and without a sound track. In the space of a few days, I have received, from far, far away, five 8G micro SD cards, two ReSpeaker 2-Mics Pi HATs and a Xiaomi Mi WiFi 3G router [...more]
This post is all about using the Music on Console (MOC) audio player on an Orange Pi Zero running Armbian. In other words it is a continuation of the previous post wherein MOC replaces the Music Player Daemon (MPD) which could not quite handle some streams running at higher bit rates. [...more]
These last few days I have been improving my home automation assistant based on experience gained from using the Google Home Mini. While not at all anticipated, the latter's ability to play radio stations has proved useful. It has also been helpful to get weather information with Google Home. Accordingly I wanted to add similar capabilities to my DIY project running on the Orange Pi Zero [...more]
I installed two Python libraries for voice recognition on an Orange Pi Zero running DietPi. The libraries are the hotword recognition engine snowboy from KITT.AI and the excellent SpeechRecognition library by Anthony Zhang (Uberi). It provides a uniform Python interface to many speech recognition engines. I have tested with two online services: Google Speech Recognition and Microsoft Bing Voice Recognition as well as with the off line engine Pocket Sphynx from Carnegie Mellon University. I wrote this back at the end of November, I don't recall the reason I delayed putting it up. [...more]
I have finished translating the corrected post on the use of the Google Home Mini as a home automation voice assistant. The original text was published a week ago and considerably modified since then to remove a bad suggestion on my part that compromised the security of the home automation system. [...more]
Taking advantage of a half price sale before the holidays, I bought the Google Home Mini. Unfortunately, Google Home no longer supports Sonoff switches programmed with Theo Arends' Tasmota firmware. On the other hand, it is possible to create applets with IFTTT to send HTML requests to the Domoticz server and thus control home automation devices with voice commands [...more]
This is a short follow up on a previous blog about using a Raspberry Pi as a remote log server. Using information posted by knowledgeable persons, I removed the source of what turned out to be spurious error messages that were filling up the log... [...more]