Presenting an internet radio player for Linux based on the Music On Console player. It is a test bed for an Internet radio player to be built around a Raspberry Pi to be connected to an older sound system. The source code is available. The application written with Lazarus, the open source Free Pascal RAD IDE. [...more]
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]
In HTML, floating areas in a <div> type block do not change the size of the block. This can result in a local alignment problem. There are more or less well-known solutions, this is about some of them [...more]
Just two days ago, I removed the search bar from the top of every page on this site. I wanted to have more than one search engine but I did not have a compact way to do it. Then I thought of an input box for the search words followed by three buttons for each of the search engines [...more]
Kyle Fleming found two errors in the posts on ESP8266 watchdogs. Because his suggested corrections were spot on, it was not hard fix the posts. Kyle co-founded Black Prism. Those interested in the interface of decorative arts and technology should visit the site.
The search box is gone from the top of all pages. Instead, there are
three search boxes (DuckDuckGo, Google and Bing) on the one
page, previously titled Archives but now renamed Archives and Search. It dawned on me that I don't
use Google Search by default on my main browser.
Why then was I foisting one particular engine on the readers who
wanted to search my site?
DuckDuckGo does not offer the ability to embed the search result in a frame on the site as was the case with the Google search box that I was using before. So, for the sake of symmetry, the search results will be displayed in a new browser tab or a new browser window no matter which engine is used.
The November 6, 2017 post on Google Assistant on an Orange Pi Zero running DietPi is out of date. I added a warning to that effect. Google Assistant is a moving target; it is not easy to be on the leading edge.
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]
Some readers have been sending emails about missing downloads.
I didn't think much about because it only involved one
file. I just uploaded the file again and tested to verify that it was
there. Everything seemed fine and I answered the emails saying that
the file was available.
On a hunch today, I checked and was mildly annoyed that the file
was no longer available. I was rather surprised when I realised that
zip file was gone from the server. What is going on?
I have uploaded hopefully all the missing archives. And I will check tomorrow and later to see if they are still there. In the meantime my apologies to all that have been and may yet be inconvenienced by this.
Correction, Winter Storm and Announcement
The previous post has been corrected because I had not correctly
report the linguistic abilities of
They are the same as is
google-assistant-demo at least for English and French.
The fourth snowstorm in March arrived with the chronological beginning of spring. If I mention it here it is because it caused a power failure that damaged the SD card of the Raspberry Pi hosting the home automation system. Since then, one of the Sonoff switches no longer communicates with the local network, no matter the recovery manoeuvres attempted. I had to rebuild the operating system. Did you know that Domoticz et Raspbian (Stretch) are incompatible? It's time for me to look at three things: transferring the file system to a USB drive, installing watchdogs for the Raspberry Pi, and adding an uninterruptible power supply (UPS). There may be future posts on these topics.
Soon there will be a post on the use of
voice recognition, and
with the ReSpeaker 2-Mics HAT.
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]
Pursuant to the previous post, this is another short note about enabling threads in Free Pascal programs for the Unix/Linux environment. [...more]
Another Free Pascal short note about running a process in a thread. In it I
show how the
aplay utility can be launched to play a
wav file in a thread so that the application GUI remains
responsive and it becomes possible to stop
aplay at any
This is just a short note about using
Mea culpa for a very local solution to getting weather reports in a previous post which would have been of interest to only a few. Here is a solution using Yahoo! YQL queries with a potentially wider audiance [...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]
This is a happy day! I finally managed to get the scanner of the Brother DCP-7040 working in Ubuntu 17.10. [...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]
As I have been trying to learn Python by dabbling with voice recognition and home automation project, it has become obvious that I had to familiarize myself with virtual Python environments. The principle is not difficult, but I ran into practical problems. This post, more than two weeks in the writing, describes how I now manage and use virtual environments on three different Debian based Linux distributions. [...more]
A chance meeting with cheap Bluetooth portable speakers with hands free capabilities led to a grand scheme to use them to talk to vocal assistants with the help of a Raspberry Pi 3. Before going ahead with the project, I had to learn the basics of using Bluetooth in Raspbian (Stretch). Here is a description of my first steps in this arcane world. [...more]
Today I had a good reason to test the debug UART port which is next to the RJ45 connector on the Orange Pi Zero. I really like this method of connecting to the headless OPiZ, so I wrote a short note about it [...more]
The cause of all this was an upgrade of Armbian that for some unknown reason went haywire. The system became unusable. I had to update the post about dietPi on the Orange Pi Zero.
I also updated my first post about the
OPiZ to mention that
ssh is not the only way of
logging on the board initially.
- The following posts have been updated:
- Updating to Sonoff-Tasmota (October 31, 2017)
- Programmation du Sonoff dans l'EDI Arduino (2) (2017-05-19)
- Programmation du Sonoff dans l'EDI Arduino (1) (2017-05-17)
- USB-Serial Converter, Counterfeit or Not? (February 9, 2017)
- Flashing a Sonoff with a Raspberry Pi (January 23, 2017)
- Programmation d'un commutateur Sonoff avec un Raspberry Pi (2017-01-23)
esptool.pyor with the Arduino IDE flashing tool. Thanks to Sébastien Giroux for reminding me to update these older instructions.
- I stumbled on the precompiled binaries of
sonoff.inoby Theo Arends. I thus corrected my November 17 update of Flashing a Sonoff with a Raspberry Pi to indicate that ITEAD Sonoff product can be flashed with Theo Arends' latest offering,
Sonoff-Tasmota, with a Raspberry Pi without installing the Arduino IDE
- Firefox Quantum 57.0 has become available on Ubuntu and I mechanically updated. Not a good idea... I lost all my bookmarks and my last backup was quite old. Shame on me. Hope readers of this do better. Also, an older post A Domoticz application in Linux is now out of date. Maybe I will be able to look into updating it in the coming weeks.
- The updating of the
CSSstyle sheet continues. The boxes showing terminal sessions now use an almost black background which more closely resembles what is seen on screen. Hopefully, that is an improvement although it does make the pages look a bit more busy.
The novelty of talking with Mme Google has worn out, it is time to do something practical with voice recognition. Furthermore, who wants an open microphone streaming all sounds in the house to the outside world? I would prefer so called "hot word" recognition to be done locally. I had problems installing snowboy from KITT.AI. Fortunately, some clever people had already found solutions [...more]
The maker of the Orange Pi Zero makes available a number of images of operating systems. I installed Raspian server found on OrangePi.org. I was not impressed it, but I could be wrong of course. In any case, I returned to DietPi. [...more]
Following excellent instructions found on the web, I managed to install Google Assistant on the Orange Pi Zero running the latest version of DietPi. [...more]
The original October 18 post written in French is now available in English. [...more]
Updating to Sonoff-Tasmota by Theo Arends has come around a lot faster than projected. At the same time, it was possible to update to version 2.4.0-rc2 of the Esp8266 Arduino Core which is one more step in preventing a key reinstallation attack (KRACK) [...more]
Theo Arends' replacement firmware for the Sonoff
WiFi switch logs error and information messages to the serial port and
to its webserver by default. It can also log debug messages, and send
all these messages to a
syslog host where they will be stored
to be reviewed later. However logging errors is not the default behaviour
and so I decided to enable it. As my home automation server is a Raspberry Pi running
Debian, it makes sense to use its default
syslog daemon rsyslog.
Curious, I bought another single board computer, the Orange Pi Zero. As a first test, I installed the home automation software Domoticz on it over Armbian. I also installed mosquitto, the MQTT server. Here are my first impressions of how it all works [...more]
Since the end of May, the company hosting my website has been providing SSL certificates (OpenSSL from cPanel.inc). The site can be browsed securily with the HTTPS protocol. That should inspire confidence; the little green padlock is now visible in the address bar. There was a catch, the style files and images were no longer found when viewing files in sub-directories. A solution had to be found. [...more (in French)]
I took the opportunity to reorganize the site. Updating the site had become a daunting task. New directories have been added, HTML files have been moved, and file names have been changed. I hope that the permanent redirection I have added will make the transition as smooth as possible.
An Update and Small Change
The post on Flashing a
Sonoff from a Raspberry Pi was modified to insist on the need to
turn the Sonoff on and off after flashing. The
script used to upload the firmware cannot perform a hard reset of the
ESP8266 when used as described.
There is now a little envelope icon after my name at the bottom of each page. It should be clearer that these are links to send e-mail messages with questions or suggestions. These links start your default mail client and fill in the subject line with the name of the HTML file containing the link making it easier to identify what your comment or question is about.
In the original September 19 version of the post, I made an important error. Further tests, showed that the board does not boot when powered up from the VIN pin. Hopefully, the seller or manufacturer of the board can help resolve this problem and I suspect that I will be rewriting the post once I get more information. For some users (including myself), this is a significant factor which may tip the scales when comparing the board to the WeMos D1 mini which is not subject to this problem. [...more]
I have purchased a new ESP8266 NodeMCU development board. I compare the latest Geekcreit/DOIT board to the Wemos D1 mini which I have been using up to now. Both based on the "orignal" NodeMCU development kit, they are quite similar but they do offer an interesting tradeoff. [...more]
This post continues with improvements to the third loop watchdog introduced in the previous post. But most importantly, it provide a useful technique to recover in a hands-off way to watchdog timeouts and exceptions. [...more]
Adding a third watchdog is a good idea for some ESP8266/Arduino based projects. That's because it is very easy to write code that feeds the built-in watchdogs but nevertheless goes off the deep end. The task of this watchdog is to ensure that the Arduino loop is executed regularly. [...more]
Updated: August 27, 2017
While the hardware and software watchdog timers of the ESP8266 are essential, they are not sufficient to ensure the kind of reliability needed in an IoT device. In a future post, I will discuss how to implement yet a third watchdog to further improve the dependability of the firmware programmed into this chip. In the mean time, I thought it would be useful to discuss watchdogs in general and to delve into some of the details of the ESP8266 watchdogs. [...more]
This post contains a corrected Python script for reading the temperature and relative humidity from a DHT11 sensor and sending them on to a Domoticz server. Bogus values will not be passed on when it is not possible to read the sensor. The second topic of the post is human comfort as it relates to relative humidity and temperature. This is groundwork for controlling an air exchanger and a dehumidifier in the future. [...more]
This post explains how to connect a DHT series temperature and humidity sensor on the Raspberry Pi GPIO and how to monitor its values in Domoticz, a home automation server hosted on the same Raspberry Pi. There are plenty of descriptions on the Web on how to do this. But most assume that the default One-Wire GPIO pin will be used. Unfortunately, I could not use that pin. To increase the post's value-added, I also describe how to monitor the temperature of the Raspberry Pi [...more]
First, the sidebar about the use of an
independent power supply for the Sonoff in the post entitled Flashing a Sonoff with a Raspberry
Pi was confusing. Hopefully, the new version is an improvement. Thanks
to Robin de Kruyf for pointing out that deficiency.
Second, I updated my Lua script for handling MQTT messages from
Domoticz in the January 30th post NodeMCU, MQTT and Domoticz
- part 2. Turns out that the
CJSON module has been
replaced with the
The missing second post in the new series about home automation with Domoticz on a Raspberry Pi is finally added. I explain how I use FileZilla to more easily modify files on the Raspberry Pi. The instructions on making backups have been moved to this post [...more]
This post explains how I added the X10 ActiveEye Motion Sensor (outdoor model MS16A) to a Domoticz home automation server running on a Raspberry Pi. The latter is linked to the sensor through a CM11A serial computer interface and a RR501 transceiver. It is a reworked version of Adding an ActiveEye Motion Sensor that showed how the same sensor was used with a wireless CM19A computer interface [...more]
This post shows how to use an X10 PalmPad Remote Control to manually control a lamp connected to a Sonoff WiFi switch from ITEAD. This is a continuation of the previous post about the necessity of providing a way of manually turning on and off lamps connected to Sonoff WiFi switches [...more]
This post continues the new series about home automation with Domiticz and ESP8266 based hardware showing how I installed an MQTT broker on the Raspberry Pi and how it is used with the home automation software [...more]
This post continues with the building of a home automation system
using legacy X10 hardware with
This post continues with the building of a home automation system
using legacy X10 hardware with
This is a detailed description of installing the Raspbian operating system and the Domoticz home automation server on a Model B Rev 2 Raspberry Pi and on a Pi 3 Model B. This is the first in a series of posts about DIY home automation using legacy X10 hardware and using the newer, cheaper, and in my opinion better ESP8266 based hardware [...more]
One of the very useful features of the
Sonoff-MQTT-OTA-Arduino firmware for Sonoff switches by Theo
Arends is its ability to update itself over the air (OTA). Here is how
to use this very usefull capability especially once a switch is
This follows the May 15th post, showing how to flash the
Sonofo-MQTT-OTA-Arduino - TASMOTA firmware from Theo Arends on
a Sonoff switch Wifi. TASMOTA is complete and makes adding the switch
in the home automation program Domoticz very simple.
[...more (in French)]
There is nothing very new here. I show how to upload a sketch in a Sonoff WiFi switch from the Arduino IDE. The steps described are a) Installation of the Arduino IDE in Ubuntu; b) Preparation of IDE; c) Serial port access; D) USB-serial connection with the Sonoff switch and e) Uploading a Blink sketch [...more (in French)]
Since the Raspberry Pi does not have a physical clock, schedules events triggered by the time of day will not work properly in Domoticz if access to the Internet is lost during a power failure. The obvious solution is to install a hardware real-time clock (RTC) [...more]
Occasionally it is convenient to control devices with a smart phone or tablet,or even a desktop computer. But, very quickly, one tires of having to use such a device to simply light a lamp. I will describe how I added manual switches to control two bedside lamps connected to Sonoffs... [...more]