This week, a lot of networking and Home Automation fixing

Last Updated or created 2026-06-02

(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

Mailbox resorting attachments

Last Updated or created 2026-06-02

(I often forgot to download important attachments, like orders and important paperwork.

I am using paperless-ngx to make pdfs searchable.

  • export (takeout) mail from for example gmail
  • extract all attachments using below script
  • sort into media types
  • use dangerzone.rocks installation to sanitize (remove malware/virus)
cat All\ mail\ Including\ Spam\ and\ Trash-002.mbox | formail -des munpack

Cleanup script

find -type f -iname '*.desc' -exec rm  {} \;


for f in =X*; do
    new=$(echo "$f" | sed -E 's/^=X//; s/X=(\.[0-9]+)?$/\1/')
    mv -- "$f" "$new"
done

for f in *.[0-9]*; do
    base=${f%.[0-9]*}

    if [ -f "$base" ] && cmp -s -- "$base" "$f"; then
        echo "Removing duplicate: $f"
        rm -- "$f"
    fi
done

for f in *.[0-9]*; do
    n=${f##*.}          # 1, 2, 3 ...
    base=${f%.*}        # winmail.dat
    ext=${base##*.}     # dat
    name=${base%.*}     # winmail

    mv -- "$f" "${name}-${n}.${ext}"
done

for f in -*; do
    new="${f#-}"
    mv -- "$f" "$new"
done

for f in -*; do
    new="${f#-}"
    mv -- "$f" "$new"
done

for f in *X; do
    mv -- "$f" "${f%X}"
done


mkdir -p pdf images audio text movies bww zip midi html vcf xml
mv *PDF pdf 
mv *pdf pdf
mv *gif images
mv *GIF images
mv *jpg images
mv *bmp images
mv *BMP images
mv *jpeg images
mv *JPG images
mv *Jpg images
mv *png images
mv *tif images
mv *eps images
mv *PNG images
mv *Png images
mv *svg images
mv *psd images
mv *mp3 audio
mv *MP3 audio
mv *wma audio
mv *wav audio
mv *m4a audio
mv *txt text
mv *wri text
mv *doc text
mv *docx text
mv *xls text
mv *XLS text
mv *ppt text
mv *pptx text
mv *xlsx text
mv *mp4 movies
mv *MP4 movies
mv *avi movies
mv *mov movies
mv *MOV movies
mv *mpg movies
mv *MPG movies
mv *bww bww
mv *abc bww
mv *pio bww
mv *zip zip
mv *ZIP zip
mv *tgz zip
mv *tar zip
mv *rar zip
mv *mid midi
mv *html html
mv *htm html
mv *vcf vcf
mv *xml xml

Next thing to do .. sanitize PDF’s

paperless-ngx to ingest