Love Locks at Pont des Arts

Circuit Playground Halloween Ghost

Just in time for Halloween ­čÄâ, I made a ghost decoration that uses an Adafruit Circuit Playground Express.

The ceramic ghost is from a home decoration shop. I have put a little sandwich paper inside, so the LED light can be seen.

The MicroPython source shows a candle light effect. For the flame, a mystic cyan color is used, so the ghost appears really spooky. ­čĹ╗

If you copy .wav files to the Circuit Playground, a random sound effect is played from time to time. I found nice free sound effects on soundbible.com that surely give everyone the chills. The sound files should be converted to mono and 16 kHz sampling rate, so they fit into the tiny Playground Express memory. The sound effects can be muted using the switch on the Playground, if they should become too annoying. ­čśë

Read this article...
How acme4j handles POST-as-GET requests

In the latest ACME draft 15, Let's Encrypt introduced POST-as-GET requests. It is a breaking change that is not downward compatible to previous drafts.

This brought me into an uncomfortable position. While the Pebble server enforces the use of POST-as-GET, other servers don't support it yet, like the Let's Encrypt server. For this reason, acme4j needs to support both the pre-draft-15 GET requests and the post-draft-15 POST-as-GET requests. Luckily I have found a solution that is totally transparent to the user, at least as long as no other ACME server is used.

This is how acme4j v2.4 works:

  • If you connect to Boulder via an acme://letsencrypt.org URI, acme4j falls back to a compatibility mode that still sends GET requests. Let's Encrypt has announced a sunset date for GET requests on November 1st, 2019. You are safe to use acme4j v2.4 (and older versions) up to this date.
  • If you connect to a Pebble server via an acme://pebble URI, the new POST-as-GET requests are used.
  • If you connect to a different server implementation via http: or https: URI, acme4j sends POST-as-GET requests now. This is likely going to fail at runtime, if the server you connect to does not support draft-15 yet.
  • As a temporary workaround, you can add a postasget=false parameter to the server URI (e.g. https://localhost:14000/dir?postasget=false) to make acme4j enter the fallback mode and send GET requests again.

As soon as Let's Encrypt supports POST-as-GET on their production servers, I will remove the fallback mode from acme4j again. It just clutters the code, and I also have no proper way to test it after that.

Hint: Before updating acme4j, always have a look at the migration guide. It will show you where you can expect compatibility issues.

Google Earth Pro auf Fedora installieren

In dem Fedorablog, den ich ganz fr├╝her mal geschrieben hatte, hatte ich ein regelm├Ą├čig wiederkehrendes Thema: Die Installation von Google Earth. Lange Zeit war das echte Handarbeit, obwohl Google ein RPM-Paket bereitstellte.

Seitdem sind viele Jahre vergangen. Mittlerweile stellt Google die ehemals kostenpflichtige Pro-Version von Google Earth zum kostenlosen Download f├╝r Linux zur Verf├╝gung. Und auch die Installation ist gl├╝cklicherweise kein Problem mehr. Es reicht schon, das RPM-Paket zu installieren:

sudo dnf install google-earth-pro-stable-current.x86_64.rpm

Auf deutschen und ├Âsterreichischen Systemen┬╣ muss anschlie├čend noch eine kleine manuelle ├änderung vorgenommen werden. Der Grund daf├╝r ist, dass die Google-Server bei der Ortssuche Geokoordinaten mit Dezimalpunkt ausliefern, das System aber das bei uns ├╝bliche Dezimalkomma erwartet und die Zahlen deshalb nicht verarbeiten kann. Die virtuelle Erdkugel dreht sich dann immer mitten auf den Atlantik statt auf die gew├╝nschte Markierung.

Eine einfache L├Âsung ist, die Datei /opt/google/earth/pro/googleearth mit einem Texteditor zu bearbeiten (Root-Rechte erforderlich) und in der letzten Zeile der Datei ein LC_NUMERIC=us_US.UTF-8 einzuf├╝gen:

LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH LC_NUMERIC=us_US.UTF-8 ./googleearth-bin "$@"

Danach sollte Google Earth Pro problemlos und stabil laufen.


┬╣) Nach meinen Recherchen verwendet ein Linux mit schweizerdeutscher Einstellung den Dezimalpunkt. Die Anpassung ist dann nicht n├Âtig, schadet aber auch nicht.

CircuitPython and Fedora

The season of long winter nights is coming, so I got myself an AdaFruit Circuit Playground Express for some home decoration.

My plan is to program it using CircuitPython, a MicroPython derivate that is adapted to the AdaFruit hardware.

CircuitPython must be installed to the Circuit Playground first, which turned out to be difficult with Fedora Linux in a first attempt. The troublemaker was the ModemManager, which is still installed by default. It detects the serial port of the AdaFruit device, and then hogs this resource because, well, it might be a modem. ­čÖä

My older readers certainly still remember what a modem is. ­čśë But to make a long story short, almost no one is using a serial modem nowadays, so the ModemManager does not serve any useful purpose. However, it cannot be removed, because other important packages still depend on it. The only way is to stop it permanently:

sudo systemctl stop ModemManager
sudo systemctl disable ModemManager

After that, I could finally install CircuitPython to the Circuit Playground. First I downloaded the matching uf2 file. After that, I connected the Playground via USB, and changed to the bootloader mode by pressing its reset button twice (like a double-click).

The Circuit Playground is now mounted as an USB drive called CPLAYBOOT. All there is to do now is to copy the uf2 file to this drive. The Playground automatically reboots after that. If everything went fine, it will come back as an USB drive called CIRCUITPY.

The next step is to install the AdaFruit libraries to that drive. I downloaded the latest library bundle that matched my CircuitPython version, and just unpacked it to the CIRCUITPY drive.

That's it... All there is to do now, is to open the code.py file in an editor and change the code. It is immediately executed when it is saved.

For a start, there are a lot of code examples for the Circuit Playground Express on the AdaFruit web site.

Reviving a Sony CDP-991, Part 5

The player is playing again. Time for some final cleanings.

Fifth Problem: Crackling Volume Pot

The volume assembly with the pots on the left. Just spray into the hole. After the calibration part, this is going to be a walk in the park. Or so I thought.

On the CDP-991, the playback volume can be changed via remote control. There's a motor that actually drives the volume knob and the potentiometers. The custom file feature allows to store individual volume settings for different CDs.

Due to the construction with the pots and the motor, the volume control assembly is rather big and is mounted to the front panel with screws. I removed the screws and the volume knob, but still could not remove the assembly for cleaning. It was still fixed somewhere else. The service manual gave no hint about how to remove it.

So I just tried my luck and sprayed some contact cleaner into the holes of the three pots close to the front. It worked, and saved me from finding a way to remove the assembly.

And that's it... I closed the case and polished it with a microfiber cloth and a soft cleaner. Then I put batteries into the remote control.

Welcome back to the living room, my good old CD player! ­čśÇ

Retrospective

Looking back, I am surprised how much is still working and in a good shape after 27 years. I am also surprised that I could still get a good service manual, and all the necessary replacement parts.

For most parts of the restauration, I just needed a screwdriver, cotton buds, isopropanol, and grease. So basically it can be done by anyone who isn't all thumbs. Just the pickup replacement and the calibration needs more elaborate equipment.