Things Like SD Cards and Code Do Fail
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]
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]
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.
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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)]
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 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]
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]
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]
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]
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)]
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]
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 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]
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]
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]
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]
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]
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]
Some niggling points concerning the TThread
class mostly about memory leaks
[...more]
How to mount an NFS share on a remote OpenMediaVault system accessed through a WireGuard virtual private network [...more]
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]
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]
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)]
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)]
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]
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]
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]
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 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.
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]
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]
Small addition to the post about problems when translating the ASCII "|" character [...more]
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]
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]
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]
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]
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]
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]