PCB Holder, flashing door sensors
A while back i printed a PCB holder, perfect for accessing contacts on a print, without the need for soldering.
Flashed a doorsensor with Tasmota.
esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
Keep GND and VCC connected, to keep device awake. Else it’s going into sleep mode.

Pull GPio0 to GND @ boottime, to get into flash mode.
3v3 + GND to keep device alive for configuring.

Layer effect Art proof of concept
Extracting/converting old chats from Signal/ICQ/google
ICQ
For ICQ i only could find one that worked for me.
Search for the below file on the internet
IcqHR 1.8f (http://soft.softoogle.com/ap/icqhr-get-4581.shtml)
This will convert XXXXXmsg.dat to a html file.
SIGNAL
I’ve got signal on my linux workstation, so my encryption key lives in
~/.config/Signal/config.json
Install sqlcipher from (https://github.com/sqlcipher/sqlcipher)
And use below script (change paths/keys accordingly)
#!/bin/bash #set -x # Get your key from #cat ~/.config/Signal/config.json SIGNAL_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /Projects/sqlcipher/sqlcipher -list -noheader /home/${USER}/.config/Signal/sql/db.sqlite "PRAGMA key = \"x'"${SIGNAL_KEY}"'\";select json from messages;" > /tmp/clear_text_msgs; cd /tmp tail -n +2 clear_text_msgs > without_ok sed '$!s/$/,/' without_ok > with_commas sed '1 s/^/[\n/' with_commas > with_leading_bracket echo "]" >> with_leading_bracket rm without_ok rm with_commas mv with_leading_bracket valid.json cp valid.json /home/%{USER}/signal.$(date +%Y%m%d) cd -
Google Chat/Talk/Hangouts
Just search for google takeout!
After that convert Hangouts.json to text using
https://github.com/baldybeardedguy/hangouts-json-parser/blob/master/Hangouts_json.py
Retropi handheld
I’ve got a retro-pi running for some time, now .. posting a little movie.
The gamehat i’ve got a week now.
Retropi met Darish Zone King Image
- 512GB
- 23000 games
- 50 systems
Own hacks on this system:
- Added dos emulator
- Added DOS games
- Added Amiga demos menu entry
- Changed Font sized and look
I’ve got a bigben controller which i can connect to the Raspberry USB .
Server room cleaning
We needed to clean up the mess in the serverroom.
Gluster testing with docker
GlusterFS (Gluster File System) is an open source Distributed File System that can scale out in building-block fashion to store multiple petabytes of data.
Below is a test environment which creates 5 docker instances, which represent 5 gluster servers.
This was for test repairing our work gluster.
First install gluster and pull a image: docker pull gluster/gluster-centos
gethosts
for f in 1 2 3 4 5;
do
echo "$(docker exec -it gluster_${f} ip a s | grep 172 | awk '{ print $2 }' | cut -f1 -d/) gluster_${f}"
done
create_dockers
for f in 1 2 3 4 5; do
docker run --name gluster_${f} --privileged=true -d gluster/gluster-centos /usr/sbin/init
done
create_bricks
for f in 1 2 3 4 5; do
docker exec -it gluster_${f} mkdir -p /bricks/brick01
done
destroy_dockers
for f in 1 2 3 4 5; do
docker stop gluster_${f}
docker rm gluster_${f}
done
diskcreator
for f in $(seq 1 5); do
dd if=/dev/zero of=/root/disk${f} count=1 bs=100M
losetup /dev/loop${f} /root/disk${f}
docker run --name gluster_${f} --privileged=true --device=/dev/loop${f} -d gluster/gluster-centos /usr/sbin/init
done
lvm-dockers
modprobe dm_thin_pool (in docker)
modprobe dm_thin_pool (ook in VM zelf)
modprobe device-mapper ??
pvcreate /dev/loop0
vgcreate brick01 /dev/loop0
lvcreate -L 50M -T brick01 -n thin_brick01
lvcreate -V 40M -T brick01/thin_brick01 -n testvolume
mkfs -t xfs -i size=512 /dev/brick01/testvolume
mount /dev/brick01/testvolume /bricks/brick01
lvextend -L+10M /bricks/brick01
xfs_growfs /dev/brick01/testvolume
fash@fash-Vortex:~$ cat docker-lvm
modprobe dm_thin_pool (in docker)
modprobe dm_thin_pool (ook in VM zelf)
modprobe device-mapper ??
pvcreate /dev/loop0
vgcreate brick01 /dev/loop0
lvcreate -L 50M -T brick01 -n thin_brick01
lvcreate -V 40M -T brick01/thin_brick01 -n testvolume
mkfs -t xfs -i size=512 /dev/brick01/testvolume
mount /dev/brick01/testvolume /bricks/brick01
lvextend -L+10M /bricks/brick01
xfs_growfs /dev/brick01/testvolume
How to use
./create ./gethosts voor info docker exec -it gluster_1 /bin/bash # GEEN HOSTSNAMES INGEVULD! gluster peer probe 172.17.0.2 gluster peer probe 172.17.0.3 gluster peer probe 172.17.0.4 gluster peer probe 172.17.0.5 Geen persistent storage aangemaakt evt kunnen we ook in de docker zelf testen docker exec -it gluster_1 mkdir -p /bricks/brick01 docker exec -it gluster_2 mkdir -p /bricks/brick01 docker exec -it gluster_3 mkdir -p /bricks/brick01 docker exec -it gluster_4 mkdir -p /bricks/brick01 gluster volume create testvolume 172.17.0.2:/bricks/brick01 172.17.0.3:/bricks/brick01 172.17.0.4:/bricks/brick01 172.17.0.5:/bricks/brick01 force gluster volume start testvolume ### NOG TE TESTEN #gluster volume create testvolume replica 2 172.17.0.2:/bricks/brick01 172.17.0.3:/bricks/brick01 172.17.0.4:/bricks/brick01 172.17.0.5:/bricks/brick01 force ### NOG TE TESTEN #gluster volume create testvolume replica 2 arbiter 1 172.17.0.2:/bricks/brick01 172.17.0.3:/bricks/brick01 172.17.0.4:/bricks/brick01 172.17.0.5:/bricks/brick01 force mount -t glusterfs 172.17.0.2:/testvolume /media/ cd /media touch {1..9} exit for f in 1 2 3 4 ; do echo "gluster_${f}" ; docker exec -it gluster_${f} ls /bricks/brick01 ;done # DESTROY for f in 1 2 3 4 5; do docker stop gluster_${f} docker rm gluster_${f} done
Howto reset-replicated-brick-same-server
Using clean glusterdockers
./create_dockers
./create_bricks
./gethosts
# docker exec -it gluster_1 /bin/bash
# gluster peer probe 172.17.0.2
# gluster peer probe 172.17.0.3
# gluster peer probe 172.17.0.4
# gluster peer probe 172.17.0.5
# Gluster peer status
----------------------------------
(peers = 3 + localhost maakt 4 ;-)
# gluster volume create testvolume replica 2 172.17.0.2:/bricks/brick01 172.17.0.3:/bricks/brick01 172.17.0.4:/bricks/brick01 172.17.0.5:/bricks/brick01 force
# gluster volume start testvolume ; gluster volume info testvolume
----------------------------------
Volume Name: testvolume
Type: Distributed-Replicate
Volume ID: e5536d11-77ee-40a5-9282-e4223979f443
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x 2 = 4
----------------------------------
# mount -t glusterfs 172.17.0.2:/testvolume /media/
# cd /media
# touch {1..9}
# exit
From dockerhost we see the files nicely spread over the bricks
# for f in 1 2 3 4 ; do echo "gluster_${f}" ; docker exec -it gluster_${f} ls /bricks/brick01 ;done
------------------------------------------------------------------------
gluster_1
1 5 7 8 9
gluster_2
1 5 7 8 9
gluster_3
2 3 4 6
gluster_4
2 3 4 6
---------------------------------------------------------------------------------
Logon op gluster_3
# docker exec -it gluster_3 /bin/bash
# rm -rf /bricks
- wacht ff -
# gluster volume status
----------------------------------------------------------------------------
Status of volume: testvolume
Gluster process TCP Port RDMA Port Online Pid
------------------------------------------------------------------------------
Brick 172.17.0.2:/bricks/brick01 49152 0 Y 210
Brick 172.17.0.3:/bricks/brick01 49152 0 Y 151
Brick 172.17.0.4:/bricks/brick01 N/A N/A N N/A <----- gone
Brick 172.17.0.5:/bricks/brick01 49152 0 Y 152
----------------------------------------------------------------------------
# exit
From dockerhost:
# for f in 1 2 3 4 ; do echo "gluster_${f}" ; docker exec -it gluster_${f} ls /bricks/brick01 ;done
------------------------------------------------------------------------------------
gluster_1
1 5 7 8 9
gluster_2
1 5 7 8 9
gluster_3
ls: cannot access /bricks/brick01: No such file or directory
gluster_4
2 3 4 6
--------------------------------------------------------------------------------------
Logon on gluster_1
# docker exec -it gluster_1 /bin/bash
# gluster volume reset-brick testvolume 172.17.0.4:/bricks/brick01 start
#This is the moment to swap the md3260, but we are using here the next commands:
Create new storage on gluster_3
# docker exec -it gluster_3 mkdir -p /bricks/brick01
# docker exec -it gluster_3 ls /bricks/brick01
Logon on gluster_1
# docker exec -it gluster_1 /bin/bash
# gluster volume reset-brick testvolume 172.17.0.4:/bricks/brick01 172.17.0.4:/bricks/brick01 commit force
[root@svr1035 ~]#
From dockerhost we see the files nicely spread over the bricks
# for f in 1 2 3 4 ; do echo "gluster_${f}" ; docker exec -it gluster_${f} ls /bricks/brick01 ;done
------------------------------------------------------------------------
gluster_1
1 5 7 8 9
gluster_2
1 5 7 8 9
gluster_3
2 3 4 6
gluster_4
2 3 4 6
---------------------------------------------------------------------------------
Mini models
Blender-ing a Tubeman
Welllll .. kinda .. blender using cloth simulation.
I started using cloth simulation to get a blanket “natural/using folds, so not perfect” on a bed scene.
Very cool

Secure MQTT with bridge for owntracks

A little diagram explaining what i’m using to get a secure mqtt owntracks setup. (reinstall)
Mobile connects with certificates and password to my server in DMZ using port 8883 (no sockets activated at the moment)
Mqtt server in DMZ connects via a bridge to my internal mqtt server. (Both Mosquitto)
Node-red using a worldmap plugin displays the current position of my mobile. Coordinates are stored in a InfluxDB and geolocation is being used to activate/de-activate other node-red nodes.
Start with downloading :
https://github.com/owntracks/tools/blob/master/TLS/generate-CA.sh
Get some environment stuff into place
export IPLIST="83.161.x.x 192.168.1.1 10.12.1.1"
export HOSTLIST="internalhostname.my.lab henriaanstoot.nl mqtt.henriaanstoot.nl"
Generate Certificates and client certificates.
./generate-CA.sh # creates ca.crt and server.{key,crt}
./generate-CA.sh mqttserver # creates server certs
./generate-CA.sh client workstation # creates client certs
./generate-CA.sh client mobile # creates mobile cert
NOTE:
My workstation client is MQTT-explorer, no need to change anything
For owntracks on your mobile you need a P12 certicate, thats a combined cert+key certificate.
openssl pkcs12 -export -in mobile.crt -inkey mobile.key -out mobile.p12
Check certs with
openssl x509 -noout -text -in server.crt | grep DNS:
Download p12 and ca.crt to you mobile.
MQTT-explorer, add a new connection and select workstation.crt ca.crt and workstation.key
Create a mqtt password file
mosquitto_passwd -c /etc/mosquitto/passwordfile firstuser
mosquitto_passwd -b /etc/mosquitto/passwordfile nextuser
TLS mosquitto example, change where needed. (this is a multi setup, portforward ONLY 8883 to this instance)
1883 is only for internal bridge communication.
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
# Plain MQTT protocol
listener 1883
# End of plain MQTT configuration
# MQTT over TLS/SSL
listener 8883
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
allow_anonymous false
password_file /etc/mosquitto/passwords
# End of MQTT over TLS/SLL configuration
listener 9001
protocol websockets
# End of plain Websockets configuration
# WebSockets over TLS/SSL
listener 9883
protocol websockets
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
log_dest file /var/log/mosquitto/mosquitto.log
#include_dir /etc/mosquitto/conf.d
connection bridge-01
address INTERNALIP:1883
topic owntracks/# both 0
Plain internal ‘open’ mosquitto setup only needs bridge config
connection bridge-01
address TLSMOSQUITTOINSTANCE-IP:1883
topic # in 2