2023-11-10
md
News and Recent Posts

Things Like SD Cards and Code Do Fail

November 10, 2023

A precautionary tale about failure upon failure, some of them my fault some not, that brought the home automation system down and later made it hard to bring it back on line [...more]

Two Updates Today

September 8, 2023

There has been a major change to Installing the AT Firmware on an ESP-01S first posted on May 22, 2022. Hopefully, the instructions are more detailed and clearer so that beginners will find it easier to follow along. More importantly, there are now instructions on how to install the newest version of the ESP-IDF (ESP RTOS) SDK based ESP-AT on the 1MB ESP-01S module. Currently that is version 2.2.1.0. No compilation is required.

Robert Hammelrath has rearranged the directory structure of his Shared Stuff repository and changed the file names of the device specific Micropython versions. The instructions on downloading a version for the Wemos W600-PICO board in A Second Look at the W600-PICO Development Board have been updatedd, but there's been no time to update the rest of the post first published January 9, 2023.

Adding a Local Network Time Server in Linux

June 20, 2023

How to integrate a local time server such GNATS into a local network. Shows how to add the local server as a time source in the three Linux NTP clients (systemd-timesync, chrony and ntp) whether explicitely or automatically through a DHCP server. Also covers adding the local server as a time source in Tasmota [...more]

GNATS, a Tiny Basic ESP32 GPS Based NTP Server

Last Update: July 21, 2023. Original version: June 13, 2023

A tiny and very basic NTP server based on a GPS receiver (ATM336H 5N-31) and which runs on the SeeedStudio XIAO ESP32C3 or XIAO ESP32S3 [...more]

A Wi-Fi Switch for Domoticz using a XIAO ESP32C3 - Part 4

Last Update: May 24, 2023. Original version: April 24, 2023

Commands - version 0.0.8
This post contains a list of commands and their syntax valid for version 0.0.8 (12_with_mqtt). [...more]

A Wi-Fi Switch for Domoticz using a XIAO ESP32C3 - Part 3

Last Update: May 27, 2023. Original version: April 20, 2023

Better User Experience
After a long delay, part 3 is completed. It contains a long-winded discussion of some major improvements to the basic version. These include a logging module, a Web console and command interpreter à la Tasmota, and user managed settings. In addition, the techniques used to avoid blocking methods such as HTTP requests are presented [...more]

A Wi-Fi Switch for Domoticz using a XIAO ESP32C3 - Part 2

Last Update: April 26, 2023. Original version: April 20, 2023

Asynchronious Web Page Updates
Finally, part 2 is completed. It covers a) Asynchronous JavaScript And XML (AJAX), b) Web Sockets and c) Server-sent events (SSE) as a means of dynamically updating data on the Web interface without reloading the complete web page. As before the source code for the project is made available on GitHub [...more]

A Wi-Fi Switch for Domoticz using a XIAO ESP32C3 - Part 1

Last Update: June 24, 2023. Original version: March 25, 2023

Demonstration Projects
On creating a XIAO ESP32C3 based Wi-Fi switch that will run a Web server and integrate into the Domoticz home automation system. It's not just a matter of turning a LED or relay on or off with a button on a Web page; numerous examples of that can be found on the Web. Whenever the state of the light is changed locally with the button, the light's status has to be updated on the Web page displayed by all clients connected to the Web server and in the home automation system. Similarly, if the toggle button on a client's Web page is clicked, then the hardware controlling the light must be activated accordingly and the light's status must be updated in the home automation system and on all connected clients' Web page simultaneously. Likewise, if the virtual light switch in the home automation system is toggled on or off, the actual relay or LED on the Wi-Fi switch must be updated and the new status of the light must be shown on all connected clients' Web pages. This is the first of what should be multiple posts as functionality such as over-the-air updates and MQTT support are added [...more]

About

Last Update: March 23, 2023. Original version: December 7, 2016

The post has been updated with the addition of a section on privacy, including the disclosure that a Matomo analytics script has been included to each page. Another section on the removal of the downloads page has been added while also pointing out that bigger source files are being made available on GitHub [...more]

Bluetooth®, PulseAudio, and BlueALSA in Raspberry Pi OS Lite (March 2022)

Last Update: March 14, 2023. Original version: March 17, 2022

Contains a quick update about the proper way to install PulseAudio in Raspberry Pi OS Lite. Hopefully there will be a new version of the post on the same subject but using the latest February 2023 version of Rapsberry Pi OS Lite. [...more]

First Look at the Seeed Studio XIAO ESP32C3

Last Update: March 1, 2023. Original version: February 25, 2023

A first look at the latest addition to the XIAO family of tiny development boards, the Seeed Studio XIAO ESP32C3. The posts ends with five sketches that manage to toggle an LED on and off. There's nothing very innovative here, it's just about getting familiar with the RISC-V based microcontroller in the Arduino framework and testing out MicroPython on the board. Updated to link the source files [...more]

NFS Share Over a WireGuard Tunnel

Last Update: February 19, 2023. Original version: February 23, 2022

This is a complete rewrite of the older post showing how to access an NFS shared directory through a WireGuard virtual private network. The remote system is an OpenMediaVault appliance, but the instructions should be valid for any Linux based system using NFS [...more]

Local Control of Two Sonoff Switches

February 12, 2023

A reworked 2017 project that was among the first home automation projects installed in our new house. Hopefully this new way of controlling two bedside lamps will prove more dependable [...more]

A Second Look at the W600-PICO Development Board

Last Update: September 8, 2023. Original version: January 29, 2023

This post is a reworked and expanded version of A First Look at the Winner Micro W600 which, this time, is based on the latest version of the MicroPython port to the W60X. It contains detailed instructions on uploading the latest firmware, some explanations about working with the board and a number of MicroPython scripts. [...more]

Macro Keyboard: an Arduino and Free Pascal/Lazarus Project

November 21, 2022

About creating a 16-key macro keyboard with an Arduino Nano connected to a computer by a serial connection. A service is responsible for injecting macros into the current application according to the keyboard key activated. Macros can be character strings that are copied to the clipboard whose contents are subsequently pasted, or they can be sequences of keyboard events that simulate keyboard input. The program running in the background is written in Free Pascal/Lazarus. An icon in the taskbar gives access to macro management functions, including editing macros, saving them to files and loading these files. [...more (in French)]

Mochad on Recent Linux Distributions

August 19, 2022

After installing and using mochad for the last 6 years on at least four different single-board computers and many different Linux images, I ran into difficulties on what was to be the last time I would install mochad. The source would not compile on a Ubuntu 22.04 based image from Armbian nor on the latest version of Raspberry Pi OS. Luckily, a work around was not too hard to find [...more]

Installing WireGuard on openmediavault 6.0.24 (August 2022)

August 3, 2022

Installing and configuring WireGuard in omv 6.0.x is, in practice, the same as it was in omv 5.6.x. However the change over to nftables from iptables as already done in Raspberry Pi OS, looks to be getting nearer to completion in Debian. This short note contains a few observations on that topic [...more]

Turning an Amlogic S192 Android TV Box into a Linux Appliance

Last Update: August 5, 2022. Original version: July 3, 2022

Clever people have solved a problem encountered some time ago which made it posssible to repurpose an Android TV box into a capable Linux server. An Alfawise S92, based on an 8-core A53 Arm SoC, running Armbian 22.08 - Ubuntu Focal with a 5.15.52 Linux kernel, is now the host of my home automation system. It's a good upgrade from the Raspberry Pi 3B in the present situation where getting a Raspberry Pi 4 at a reasonable price is so difficult [...more]

OctoPrint on a Rock Pi S D4W

June 30, 2022

More than a year after announcing a "soon to be available" post on installing Octoprint on a 512 MB Rock Pi S, it is finally here [...more]

Armbian 21.08 / Ubuntu Focal 20.04 on a Rock Pi S D4W

June 19, 2022

On installing a recent version of Armbian on a Rock Pi S (RK3308) more than a year after the initial attempt in Installing an OS on the Rock Pi S that ended in failure. While this version of Armbian does function, it will not be suitable for a projected use of the board because of the lack of device tree overlays in this image. [...more]

Sonoff Zigbee Bridge Gateway (ZBBridge) with Domoticz

May 30, 2022

Here is how to add a Zigbee button to a Domoticz-based home automation system. To carry out this project, the ESP8266 firmware of a Zigbee - Wi-Fi gateway (Sonoff ZBBridge from Itead) was replaced by a specialized version from Tasmota [...more (in French)]

BLE Beacons with Tasmota32 - Proof of Concept

May 27, 2022

Tasmota32 supports Bluetooth Low Energy (BLE). While the current release receives and retransmits messages from a BLE beacon as MQTT messages, don't use the stable version (11.1.0), use the development version of Tasmota32-bluetooth (11.1.0.3) if you want to trigger rules based on those beacon messages. For the few that might be interested, here is some information about this [...more]

Installing the AT Firmware on an ESP-01S

May 22, 2022

It is surprising how complicated it is to install AT firmware on an ESP8285 or ESP8266 with 1 MB of flash memory such as the ESP-01S. I managed to install two relatively recent versions, one from Espressif, the other from a third party based on more recent Espressif code. There is also another project that trades off some capabilities to provide more TLS cyphers. It is not obvious which should be used [...more]

A First Look at the Winner Micro W600

Last Update: December 15, 2022. Original version: April 29, 2022

A couple of years ago, I ordered a couple of Wi-Fi switches from a well-known Chinese vendor whose cave overflows with electronic gadgets. Surprise, the switches were not based on the ubiquitous ESP chips. Instead there was a tiny daughter board which was labeled TW-02, V2.0. This is a small Wi-Fi module based on the W600 from Beijing Winner Microelectronics. Some months later I ordered a Wemos W600-Pico with the idea that it could be used to learn something about the W600. Then this week I finally resumed my time consuming and costly quest to hide the shame of my $10 mistake and managed to upload some MicroPython scripts to the board [...more]

Blink on a NodeMCU ESP-12H-Kit

April 20, 2022

On uploading a blink sketch onto a NodeMCU ESP-12H-Kit which is a development board using the single core ESP32-S2 that I had never used before. There was no problem with the upload, I just could not get the Arduino IDE serial monitor to open correctly to see the serial output from the sketch [...more]

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

April 13, 2022

This is a complete rewrite of the post that was about two years old. The coverage of the Seeeduino XIAO is broader and hopefully better. Twenty Arduino sketches accompany the overview. [...more]

Three, Nay, Four Hardware Serial Ports on a SAM D21 XIAO

March 26, 2022

Four hardware serial interfaces on the Seeeduino XIAO, can anyone do better? Here's why I feel pretty confident that this is the limit and how to go about doing it. It's also a story about getting tripped by an almost trivial mistake and how frustrating it can be to get out of such a self created mess [...more]

Seeeduino XIAO Serial Communication Interfaces (SERCOM)

Last Update: March 20, 2023. Original version: May 4, 2020

Refreshed the post about the SAM D21 serial communication interface (SERCOM) on the XIAO which is still being consulted. Hopefully, the additional SERCOM pad multiplexing table will be of help, along with the correction to the previous table showing the mapping in SERCOM order. Also added warnings about the inadvisability of moving I²C to any other SERCOM port on the XIAO. An error in the wiring diagram for I²C on SERCOM0 was removed, with abject apologies for time lost until the penny dropped that the SDA signal could not be connected to the single ADC pin. In the inimitable style of Bart Simpson: D'oh. Finally there's a warning about the fact that pin assignment is not as simple as the post makes it appear [...more]

Bluetooth®, PulseAudio, and BlueALSA in Raspberry Pi OS Lite (March 2022)

Last Update: March 14, 2023. Original version: March 17, 2022

Perhaps not surprisingly given other posts along the same line (The Mosquitto MQTT Broker in Raspberry Pi OS (Bullseye) and WireGuard on Raspberry Pi OS (Bullseye)), the newer versions of Raspberry Pi OS Lite break my previous instructions about streaming sound with Bluetooth®. While BlueALSA has been removed, it can, nevertheless, be installed or replaced with PulseAudio to continue to stream sound to or from the Pi running Raspberry Pi OS Lite (Bullseye) [...more]

Free Pascal/Lazarus TThread Gotchas

March 6, 2022

Some niggling points concerning the TThread class mostly about memory leaks [...more]

NFS Share Over a WireGuard Tunnel

February 23, 2022

How to mount an NFS share on a remote OpenMediaVault system accessed through a WireGuard virtual private network [...more]

The Mosquitto MQTT Broker in Raspberry Pi OS (Bullseye)

February 21, 2022

A short note on creating a minimal working configuration for version 2.0.11 of the Mosquitto MQTT broker included in the January 2022 release of Raspberry Pi OS [...more]

WireGuard on Raspberry Pi OS (Bullseye)

Last Update: February 20, 2022. Original version: February 19, 2022

The January 28, 2022 release of Raspberry Pi OS based on Debian 11 (Bullseye) broke the the installation procedure described in the September 2021 post because the iptables package is no longer included. While I put up a temporary addendum in February 6 to document the problem and a work around, I decided it was best to redo the complete guide which now shows how to route IP packets through a Wireguard VPN "server" using nftables. The old guide remains available for those not yet using Bulleye (including the Legacy version of Raspberry Pi OS) [...more]

The ESP32-CAM as a video server

Last Update: January 5, 2022. Original version: December 22, 2021

Another post about the CameraWebServer example by Espressif, which is a video server based on the ESP32 module with a camera. I have adapted the code in such a way that it is compatible with both the Arduino and PlatformIO development platforms, adding some features, including support for an LED that serves as a photographic flash found on the ESP32-CAM by AI Thinker [...more (in French)]

First Look at the ESP32-CAM

December 14, 2021

With the ESP32-CAM module from Ai Thinker, DIY enthusiasts have access to the equivalent of a low-end Wi-Fi camera for a very low price. It is therefore not surprising that it has generated a lot of interest. Although it's been a year since I bought a clone, it wasn't until recently that I started examining this development board. Here is the story of my initial experiences with this module that I plan to install in the garage as the ultimate means of checking if the cars are parked there and if the door is properly closed. [...more (in French)]

Cleaning a Web Site

Last Update: December 2, 2021. Original version: November 10, 2021

Here is an idiosyncratic choice of tools to help in cleaning HTML files. It reflects constraints imposed by some design decisions when I created my web site and particular requirements, notably that I prefer programs that can be used locally on my desktop [...more]

W3C LogValidator in cPanel

November 20, 2021

On how I installed and ran the W3C LogValidator on my remotely hosted web site. This was done with a mixture of cPanel tools and standard Linux tools using an SSH session [...more]

Update: Setting up a Raspberry Pi as a Headless Computer in September 2021

Last Update: November 24, 2021. Original version: September 4, 2021

I will not be moving to the latest Debian 11 Bullseye based version of Raspberry Pi OS for a while yet. Consequently I updated the guide to installing the OS on a Raspberry Pi to explain why it may be prefereable to continue using the Debian 10 Buster based version of the operating systm and showing how to get that older version [...more]

Changes to the Site

November 7, 2021

The process of updating the appearance of old posts started back in August of 2020 continues at a slow pace. It is boring, to say the least. At the same time, there have been some internal changes made to the GTML project file and source files needed because of an unfortunate choice of delimiters when the site was first started. I had not anticipated that [: and :] would appear in the text of a number of posts and confuse the GTML preprocessor. The delimiters were changed to and ²). If I remember correctly, the only systematic use of the ² glyph is in some serial communication protocol names such as I²C which should not cause any problems. It would have been too much work to manually change the delimiters in all the source files so it was done with typical Linux tools (find, grep, sed and so on). That did introduce some errors, but I hope that the most egregious ones have been eliminated. If you find an error, please warn me by sending an e-mail. There is a link at the bottom of each page for that purpose.

Another change is that local searches with Startpage (using the SP button beside the search box at the top of each post) function again. I do not know when it stopped working, but the problem was easily identified: the syntax query was changed for reasons that escape me. Not as easy was finding the new incantation which required considerable trial and error. Unfortunately, there is no guarantee that the syntax will not be changed in the future.

While only two search engines, DuckDuckGo and the above-mentioned Startpage, can be used for a local search from the top of each page on this site, another three engines are provided on the Achives archives page: Qwant, Google and Bing. I removed Yahoo search because it gets its results from Bing without providing any additional value that I could see.

This is a good place to rant about two search engines: Qwant and Startpage again! Why did those two sites decide on a syntax that does not conform to the usual query string form? The others do and it is a straight forward matter to set up an HTML form (also called a webform) to construct the querry part of the URL to use those search engines. Instead, it is necessary to use Javascript to construct the URL for those two search engines. Since a user can disable the execution of scripts in a web browser, searches done with those two engines would fail without any explanation. This was a good time to improve handling the possibility that scripting is disabled. From now on, the two search engines will no longer be visible on the site if Javascript is disabled in the browser. Of course that means that local searches launched from the search box at the top of each page can only be done with DuckDuckGo.

Bluetooth and BlueALSA in Raspberry Pi OS Lite (November 2021)

Last Update: November 4, 2021. Original version: November 2, 2021

Surprisingly little has changed in the couple of years since I last looked at Bluetooth on the Raspberry Pi. As before, some tweaking is needed to use Bluetooth for audio streaming in the Lite version of the operating system. As before, the SAP profile is still being loaded as if the Pi has a built-in SIM card. That remains a simple thing to fix. Unfortunately, I have been unable to find a reliable work around for the Failed to set privacy: Rejected (0x0b) error [...more]

Additional Servers on a Raspberry Pi Based Home Automation System

Last Update: October 19, 2021. Original version: October 17, 2021

This is the third part of the guide on the installation of a home automation system on a Raspberry Pi. It covers setting up optional services: WireGuard a VPN server, Syncthing a file synchronization server, MJPG-Streamer a video streaming server for webcams and Raspberry Pi camera modules, Radicale a calendar and contact server and chrony as an NTP client and server.

Surprisingly, a post entitled Secure Webcam streaming with MJPG-Streamer on a Raspberry Pi remains relatively popular, despite its age and inadequate presentation of the security aspects. I hope to write a new post on video streaming. In the meantime, I decided to rush publishing this incomplete post because it does update how to set up MJPG-Streamer and shows how to use NGINX to create a reverse proxy enabling secure video streaming outside of the local network [...more]

On Translating Free Pascal/Lazarus Programs

Last Update: October 2, 2021. Original version: May 27, 2021

Small addition to the post about problems when translating the ASCII "|" character [...more]

Home Automation System on a Raspberry Pi

Last Update: October 11, 2021. Original version: September 30, 2021

This is the second part of the guide on the installation of a home automation system on a Raspberry Pi. It covers setting up the major services needed: Domoticz a home automation application that is the hub of the system, Eclipse mosquitto an MQTT broker that is used for communication between the hub and the IoT devices, HA Bridge a service that enables local voice control of IoT devices with Dot Echo smart speakers and NGINX a Web server that can be used to upload new firmware to the IoT devices [...more]

Installing and Configuring WireGuard on Raspberry Pi OS (September 2021)

Last Update: September 25, 2021. Original version: July 4, 2020.

The installation of Wireguard in the latest version of RaspberryPi OS (with a Linux 5.10 kernel) is much simpler because the wireguard package is now available in the OS repository. Consequently the first part of the post on the VPN server (one of the most consulted posts on this site) had to be rewritten [...more]

Setting up a Raspberry Pi as a Headless Computer in September 2021

Last Update: November 24, 2021. Original version: September 4, 2021

This post is a draft of a projected multi-part guide on the installation of a home automation system on a Raspberry Pi. This first part describes the installation of the Lite version of Raspberry Pi OS on a Raspberry Pi without connecting a monitor, keyboard or mouse to the single card computer. It is meant to replace a similar guide written in late 2019. While most things have not changed much in the intervening two years, the arrival of the Raspberry Pi Imager greatly simplifies installing the OS on a headless Pi right from the start [...more]

Web Site Offline in Previous Three Days

September 1, 2021

What can only be qualified as a malevolent attack brought down a number of servers belonging to the web hosting provider that I use. For three days, the provider has worked to restore these systems with mitigated success, but I was among the lucky customers [...more]

HA Bridge and Alexa Device Discovery

August 15, 2021

A description of the nerve-racking procedure to get induce Alexa to discover a newly added home automation device made available through HA Bridge [...more]

E-mail Notification of a Changed or Lost Public IP Address

August 9, 2021

This post presents a Python script that sends an e-mail notification if the public IP address (aslo called the outward facing or wide area network IP address) of the local area network has changed or if a dynamic domain name does not resolve to the current public IP address [...more]

For older posts see the Archivesarchives.