Category Archives: IOT / Domoticz

This week, a lot of networking and Home Automation fixing

(Sorry except for a mikrotik script, not much details)

  • Installed a new Home Assistant instance for testing on my Proxmox
  • Moved all dhcp/dns to my main Mikrotik, second backup in progress
  • Decommissioned an old trunked switch (lot of work)
  • Decommissioned an old router/firewall server (10+ years old)
  • Redraw my network in DrawIO
  • Installed Homelable to scan and draw my network (see below)

Meanwhile I am looking for a new welder.
Also doing some woodwork. (bird feeder stand)

Bird feeder pole (has a brownish tint now)

This is a cool project (Homelable). Below a still incomplete network.

Some code below to generate a CSV for DNS/DHCP entries from a Mikrotik.
(NOTE: seems spaces in comments/name/entries break stuff)

ssh admin@10.x.x.x "/ip/dns/static;export" | grep 10.1.0 | awk '{
    addr=""; comment="" ; name=""
    for(i=1;i<=NF;i++) {
        if($i ~ /^address=/) addr=$i
        if($i ~ /^comment=/) comment=$i
        if($i ~ /^name=/) name=$i
    }
    if(addr && name) print addr, name, comment
}' > dnsstatic.out

ssh admin@10.x.x.x "/ip/dhcp-server/lease;export terse" | awk '{
    addr=""; comment=""
    for(i=1;i<=NF;i++) {
        if($i ~ /^address=/) addr=$i
        if($i ~ /^comment=/) comment=$i
    }
    if(addr && comment) print addr, comment
}' > dhcpstatic.out

for f in $(seq 1 254) ; do lease=$(grep "10.1.0.$f " dhcpstatic.out | cut -f3 -d=) ; dns=$(grep "10.1.0.$f " dnsstatic.out | cut -f2,3 -d" " |sed s/name=//g | s
ed s/comment=//g | sed s/\ /,/g | head -1) ; echo -n 10.1.0.$f, ; echo -n $lease ; echo -n "," ; echo $dns  ;done > ips.csv

Meanwhile filling my own hosted “Spotify” clone, but better. (Navidrome)
(My immich server is also ingesting while we speak.)

Navidrome

Smoke detector (ShellySmoke) notification Home Assistant with friendly-names

Quick ‘n simple post, so I won’t forget.

Multiple triggers in one Automation, use friendly_name to distinguish entities that triggered the notification.

Message send example “Smoke detected ShellySmokeKitchen”

alias: Smoke detected
description: ""
triggers:
  - type: smoke
    device_id: bbd0c2ebb949b38a28c6ecca67fb4ebe
    entity_id: 888d20ea2075873284708125491695b5
    domain: binary_sensor
    trigger: device
  - type: smoke
    device_id: 31bda70d60fc815681fe951469e11a0a
    entity_id: 3a9538b025f7d263b5e145d6f4dda859
    domain: binary_sensor
    trigger: device
  - type: smoke
    device_id: 1a33c981b1dfca13202b5efe0237fea1
    entity_id: 6bf59d8de54a7bdef0bab7daf483221f
    domain: binary_sensor
    trigger: device
  - type: smoke
    device_id: 0496d720c844a5648d8b3789b8f4d093
    entity_id: e635593a29dc9af3977224b54bf19140
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - action: notify.pushover
    metadata: {}
    data:
      message: Smoke detected  "{{ state_attr(trigger.entity_id, 'friendly_name') }}"
      data:
        priority: 2
        sound: siren
        expire: 300
        retry: 30
mode: single

Software i use(d)

My much used set of tools (old draft I edited)

File managers

  • Midnight Commander
  • Thunar
  • Nautilus
  • nnn
  • Dolphin

Generic tools

  • rsync
  • dcfldd – an enhanced version of dd
  • screen/tmux
  • fdupes
  • ghex / xxd

Connecting/networking tools

  • mosh – roaming, faster, using ssh
  • sshfs – mount remote filesystems over ssh (see ssh tricks)
  • wavemon – wifi info
  • GNS3 – Graphical Network Simulator-3
  • Wireshark
  • PHPIpam
  • Homelable

Encryption

  • Luks
  • ecryptfs

Graphical/Photo

  • Gimp
  • Eog
  • rawtherapee
  • Inkscape
  • Darktable
  • PureRef
  • digiKam
  • Krita
  • Hugin
  • ImageMagick

Documents/Notekeeping

  • Vim
  • Joplin
  • Paperless-ngx
  • DrawIO – For network drawings
  • LibreOffice/OnlyOffice -> EuroOffice
  • Scribus

3D Print/Lasercutting

  • Cura
  • Orcaslicer
  • Bambuddy
  • LightBurn
  • Model editors: Blender and OpenScad, Meshroom, Sketchup

Coding

  • Mostly CLI
  • PlatformIO
  • Arduino IDE
  • VSCodium (stripped Visual Studio)

Electronics

  • Fritzing
  • Kicad
  • Logic

Ebook / Comic readers

  • Calibre
  • FBReader

GFX/Video

  • Blender
  • kdenlive
  • OBS Studio
  • Shotwell
  • Handbrake
  • ffmpeg
  • VLC
  • Kodi/Libreelec

Music

  • CLI abc tools
  • Musescore
  • Bagpipe Music Player
  • Audacity (after removing all bad things be-ing added in 2021)
  • LMMS
  • Ardour

Virtualisation/Emulation

  • proxmox
  • libvirt
  • ovirt
  • guestfish
  • dosbox
  • pcem
  • Martypc

Password management

  • Keepass / KeepassXC

API

  • Postman
  • Flask (Python) see ledserver

Beamer

  • Mapmap
  • LPMT
  • Qprompt

Brewing

  • Brouwhulp
  • Brewfather (web)

Web/App alternatives for bad companies (Mostly own hosted)

  • Gmail – Hosted elsewhere – Thunderbird + web
  • Google Drive – Nextcloud
  • Spotify – Navidrome
  • Google Photos (I never used this, i used Gallery2/3/Wipigo ) – Immich
  • Youtube – Jellyfin for own movies
  • Whatsapp/Google Chat – My own mattermost server, signal and IRC
  • Teams – Ownhosted jitsi
  • Teamviewer – Rustdesk
  • Google Timeline – Dawarich

Server generic

  • Databases : mariadb/mongodb/influxdb/sqlite
  • Grafana
  • NodeRed
  • gitea
  • HomeAssistant
  • Bookstack
  • Librenms
  • Check_mk (i’ve started with Netsaint (1999), Nagios,Icinga,
  • Mosquitto

Unsorted stuff

  • vimperator (old)
  • links/curl/dsniff/urlsnarf
  • Databases (mariadb/mongodb/influxdb/sqlite)
  • Metabase
  • Adminder
  • Scrot (snapshot tool)
  • Luminace-hdr
  • GDlib
  • Dia (old)
  • Blackmagic Fusion
  • gcalcli
  • Gcalcron
  • Domoticz
  • MQTT-Explorer
  • Android studio
  • Nextion IDE
  • Irssi
  • Mutt
  • Mailcow
  • Tinymediamanager
  • Cacti (old)
  • Winbox (Mikrotik)
  • iptraf
  • ntopng
  • Twiki/Foswiki (old)
  • Digikam
  • My own photo manager
  • Cewe Photobooks
  • qdlsrdashboard
  • gphoto2
  • Ktechlab
  • Ardour5
  • Puredata
  • Cadence
  • Natron
  • yt-downloader
  • 4k downloader
  • Taggers
  • Mp3tag
  • Tinymediamanager
  • MusicBrainz Picard
  • Beets
  • Music players
  • MOC
  • SoftSqueeze
  • Clementine
  • My Badly Designed Sound Machine
  • Server stuff
  • Namazu2
  • Netdata
  • Ntopng
  • Snort/Snortsam
  • Virtualisation

Window managers (See other post)

  • Xmonad (current)
  • Gnome (current)
  • Enlightenment (old)
  • Compiz (old)
  • Fluxbox (old)
  • Ratpoison (tried)
  • Twm (tried)
  • Xfce (old)
  • Window Maker(old)
  • Sawfish (old)
  • Kde (old)
  • i3 (old)
  • IceWM (old)
  • Motif (old)
  • Flwm (old)
  • Fvwm (old)
  • Ximian desktop (bought) (old)

  • Home Drawing
    • Sweethome3D
    • Blender
    • Sketchup
    • Drawio
  • Old but cool
    • Mainactor
    • Appleshake
    • Zbruch
    • Povray
    • Lightzone

Other tools:

Git, tig, xdotool, nmon, ntop, iotop, etc etc (lijstje genereren)

Nintendo Switch controller fix, and Lora measurements

One moment playing with LoRa. Next, a Nintendo Switch controller to fixed.

Side buttons or whatever you call them didn’t work anymore, so I replaced the flex PCB.

LoRa Antenna measurements

Using my NanoVNA and a RF test Kit I learned something about measuring antenna.

Below a measurement of a unknown antenna, ITs off, I need to shorten the metal spring inside.

Raspberry Pi 5 Projects

Again … out of SBCs
Where are all these things in my home. Someone is stealing Raspberry Pi’s, ESP32 and other sensors.
(Probably me)

So I’ve got multiple projects running on one RPi.

  • Dual Camera’s on top (brown ribbons), these are for VR streaming project.
  • Dual Camera’s on top. these are for a Red Light Green Light game. (Using motion detection on both camera’s for two players.
  • Below a INMP441 Mems microhone. This is a test for BirdNet recording.

All of the above are partially working. Code follows.

INMP441 is a tricky thing. I needed to do some bitbanging to get it working.

Loads of INMP441 info will be posted

Mqtt blinker for topic notifications

Last year I’ve made a led pole with digital fireworks.

Time to replace for something else ..

I’ve made a mqtt 1-D game in december.

I needed to change a lot to the javascript on the website to fix some stuff.

  • Fix IPhone control. (I hate iphone)
  • Fix screenlock timeout
  • Added meta refresh

The XMAS/Fireworks controller was often used, and I got notifications via my TV. (see other posts)

Now I want to see when MQTT movement when I’m in the livingroom.
So I programmed a Wemos controller to blink the internal when MQTT messages are received.

CODE:

#include <ESP8266WiFi.h>
#include <PubSubClient.h>

const char* ssid = "WIFIAP";
const char* password = "WIFIPASS";

const char* mqtt_server = "MQTTBROKER";  // MQTT broker IP
const char* mqtt_topic  = "game/tilt";

WiFiClient espClient;
PubSubClient client(espClient);

String lastPayload = "";

void setup_wifi() {
  delay(10);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
}

void blinkLED() {
    digitalWrite(LED_BUILTIN, LOW);   // LED ON
    delay(200);
    digitalWrite(LED_BUILTIN, HIGH);  // LED OFF
    delay(200);
}

void callback(char* topic, byte* payload, unsigned int length) {
  String message;
  for (unsigned int i = 0; i < length; i++) {
    message += (char)payload[i];
  }

  // Blink only if topic value changed
  if (message != lastPayload) {
    blinkLED();
    lastPayload = message;
  }
}

void reconnect() {
  while (!client.connected()) {
    if (client.connect("WemosClientMqttBlink")) {
      client.subscribe(mqtt_topic);
    } else {
      delay(2000);
    }
  }
}

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH); 

  setup_wifi();

  client.setServer(mqtt_server, 1883);
  client.setCallback(callback);
}

void loop() {
  if (!client.connected()) {
    reconnect();
  }
  client.loop();
}

LoRa and more LoRa

UPDATE : 20260126

I’ve been playing with LoRa for some time now, mostly with two adhoc LilyGO nodes.
After seeing a YT clip from Andreas Spiess I installed a meshtastic node on a Heltec V3.
Wanting more, I bought a Heltec V4 and an 8DBi (60cm) antenna.
Heltec V3 got a new home in Tyrone’s home.

GPS for the Heltec V4 module!

Via meshtastic I communicated with a guy here in the neighbourhood.
I installed Meshcore and my LoRa playground grew!

A Nebra Helium Miner was bought, and repurposed !

There is a Raspberry CM3 in there (Compute module)
Some big antenna’s and a waterproof case.
Using POE to power the thing, the plan is to have this installation at a high point around my house. (LED pole?!? 🙂 )

Meanwhile I got these : Seeed Xiao Lora ESP32 modules

MeshTUI

My mobile Heltec V4, big antenna coming and battery operated, so I can add to https://mapme.sh

STM32 Nucleo-64 development board

I’ve been playing with all kinds of MicroControllers, but not this one.

Something new to learn.

The STM32 Nucleo-64 board provides a flexible way to try out the STM32 microcontroller. The Arduino Uno V3 can be connected as a shield.

STM32 excels in high-performance, deterministic industrial control with better real-time capability, lower power, and rich peripherals, using ARM Cortex-M cores, while ESP32 dominates IoT with built-in Wi-Fi/Bluetooth, lower cost, easier Arduino/PlatformIO access, and strong community, but with higher power and less precise real-time control (Xtensa cores), making ESP32 great for connected projects and STM32 for industrial/precision tasks.

STM32 (STMicroelectronics)
Strengths:

  • Performance: Superior real-time processing, deterministic behavior, efficient for complex control.
  • Power: Advanced low-power modes, excellent for battery-powered devices.
  • Peripherals: Rich, precise analog (ADC/DAC), extensive interface options (USB, SD, LCD).
  • Reliability: Strong for industrial, medical, and automotive applications.
  • Tools: STM32CubeIDE/MX, HAL/LL libraries.

    Weaknesses:
  • Higher cost and learning curve.
  • Requires external modules for Wi-Fi/Bluetooth.

ESP32 (Espressif Systems)
Strengths:

  • Connectivity: Integrated Wi-Fi and Bluetooth (BLE).
  • Cost & Ease: Cost-effective, easy entry with Arduino IDE/PlatformIO, great for rapid prototyping.
  • Community: Strong open-source community.
  • Features: Dual-core (often), built-in OTA updates, good for audio/AI.

    Weaknesses:
  • Less deterministic/real-time performance than STM32.
  • Higher active power consumption, less precise analog.
  • Can have complex debugging/compilation.
  • When to Choose Which
  • Choose STM32 for: Industrial automation, precise instrumentation, medical devices, complex motor control, low-power wearables, general embedded systems learning.
  • Choose ESP32 for: IoT devices, smart home products, Bluetooth beacons, educational projects, rapid prototyping, audio/voice applications.

Fireworks LED addition and modifying Arcade buttons

I’ve given people on the street control over my Xmas/Fireworks lights last month. (This month it is going to be converted to an interactive game)

I saw some LED strip dividers on Aliexpress, next year it’s going to have a star on top.

Like this….

Another LED related project I started today is a Whack-A-Mole game with multiple levels.
For this I need to convert a simple arcade button to a programmable multicolor version.

From single white LED to multi color, programmable.