Installation and configuration of ThunderAI on Ubuntu 24.04

ThunderAI is a powerful Thunderbird extension that leverages the advanced capabilities of AI to revolutionize email management. By integrating with ChatGPT, OpenAI and Ollama ThunderAI empowers users to:

  • Craft compelling emails: Define custom prompts to generate email drafts, refine existing messages, and ensure professional tone and style.
  • Gain deeper insights: Analyze emails using additional data provided by the user, such as context files or previous communications.
  • Enhance productivity: Automate tasks like email tagging and categorization, freeing up time for more important matters.
  • Improve communication quality: Leverage ChatGPT’s language expertise to identify and correct grammatical errors, enhance clarity, and optimize email content for maximum impact.

And of course, you want that AI running on your own computer. Luckily that is not that difficult… The installation and configuration of ThunderAI on Ubuntu 24.04 consists of 4 easy steps:

  • Install Ollama on Ubuntu
  • Configure Ollama service on Ubuntu
  • Install ThunderAI in Thunderbird
  • Configure ThunderAI in Thunderbird

Install Ollama on Ubuntu

  • Go to the Ollama website.
  • Follow the installation steps for Linux:
  • Open a terminal
  • Run the following command: curl -fsSL https://ollama.com/install.sh | sh
  • Download and run an LLM model.
  • For example by typing: ollama run zephyr:7b-beta-q8_0
  • After downloading the LMM it will start Ollama running the zephyr:7b-beta-q8_0 LLM.
  • You can exit Ollama by entering: /bye

Configure Ollama service on Ubuntu

  • Open a terminal and type: sudo nano /etc/systemd/system/ollama.service
  • In the file, you will see a line starting with Environment
  • Add the following sentence just beneath it: Environment="OLLAMA_ORIGINS=moz-extension://*"
  • Save and exit the file
  • Restart your computer

Install ThunderAI in Thunderbird

  • Open Thunderbird and go to Tools, Add-ons and Themes.
  • Search the ThunderAI extension by typing ThunderAI in Find more add-ons, and install it.

Configure ThunderAI in Thunderbird

  • Open Thunderbird and go to Tools, Add-ons and Themes.
  • Search the ThunderAI Extension.
  • Click the wrench Icon.
  • Select Ollama API (Local LLM) as the Connection Type.
  • Fill in http://127.0.0.1:11434/ as the Host Address.
  • Choose your favorite Ollama Model, and you can use AI in your favorite email client ;-).

Now you should be ready to run your own LLM as a useful assistant on your favorite email client.

Suggestions for improving this article are welcome, please let me know and drop me a line.

Copy the programming of an ESP WROOM 32 to another ESP WROOM 32

How to back up and restore the programming of an ESP WROOM 32 to Another ESP WROOM 32

Step 1: Preparation

  1. Install Python and pip (if they are not already installed): sudo apt update sudo apt install python3 python3-pip
  2. Install the latest version of esptool: First, remove any old versions of esptool: sudo pip3 uninstall esptool sudo apt remove python3-esptool Then, install the newest version via pip: pip3 install esptool

Step 2: Reading the Firmware from the Original ESP WROOM 32

  1. Connect the original ESP WROOM 32 to your computer via USB.
  2. Identify the serial port:
    Run the following command to find the serial ports: ls /dev/ttyUSB* Note the serial port that appears, for example, /dev/ttyUSB0.
  3. Read the firmware:
    Use esptool to read the firmware. Replace /dev/ttyUSB0 with the correct serial port if needed:
    bash esptool.py --chip esp32 --port /dev/ttyUSB0 read_flash 0x00000 0x400000 firmware_backup.bin
    This command reads 4MB (0x400000 bytes) of flash memory and saves it to the file firmware_backup.bin.

Step 3: Flashing the Firmware to the New ESP WROOM 32

Flash the firmware to the new ESP WROOM 32:
Use esptool to flash the firmware to the new ESP. Replace /dev/ttyUSB0 with the correct serial port if needed:
bash esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x00000 firmware_backup.bin

Connect the new ESP WROOM 32 to your computer via USB.

Identify the serial port:
Repeat the command: ls /dev/ttyUSB* Note the serial port that appears for the new ESP WROOM 32.

Using an ESP32 and PCM5102 as a Bluetooth audio receiver

I wanted to upgrade my built-in car stereo with a bluetooth receiver, for streaming audio from my mobile phone. So I built one myself using the line-in port on my stereo that’s normally used for the CD-changer. In this case, I am using the ESP32 as a Bluetooth receiver and the PCM5102 as a DAC module for converting digital audio to an analog stereo signal. Advanced Audio Distribution Profile (A2DP) is a Bluetooth profile that allows hi-fi sound to be transmitted over a wireless Bluetooth connection. The connection between the ESP32 and the PCM5102 is based upon I2S (Inter-IC Sound) an electrical serial bus interface standard used for connecting digital audio devices together.

Continue reading “Using an ESP32 and PCM5102 as a Bluetooth audio receiver”

Joplin note taking templates

I love Joplin as a note-taking and to-do application! So I created several Joplin note-taking templates, which I would like to share with you! Joplin can handle large numbers of notes organized into notebooks. Joplin is a great, free, and easy to use open-source note taking and to-do application. Created notes can be synchronized with multi-platform clients across various cloud services. Joplin templates make it even easier for you to quickly create new notes within the Joplin desktop app. You can also insert templates into existing notes.

Continue reading “Joplin note taking templates”