Making red wine from the grapes we got from our neighbours.
Funny movie – feet i a bucket of wine
Some books about the subject we own




A script to check the age of sensors.
Sometimes you don’t have a good 433Mhz connection.
Or the battery has died of your sensor.
This script will warn you.
sensoragescript.sh (for cron)
#!/bin/bash #Call as follows #sensoragescript.sh <ipdomoticz> <idx-of-sensor> <age-to-test-in-seconds> now=$(date +%s) lastupdate=$(curl -s -i -H "Accept: application/json" "http://$1:8080/json.htm?type=devices&rid=$2" | grep LastUpdate | cut -f4 -d\" ) #echo $lastupdate seen=$(date -d "$lastupdate" +%s) #echo $seen #echo "$(( $now - $seen))" difftime="$(( $now - $seen))" if [ $difftime -gt $3 ] ; then echo "WARN : too old - $difftime seconds" exit 1 else echo "OK : $difftime seconds" exit 0 fi
Outputs:
./new.sh 192.168.1.1 123 60 OK : 22 seconds ./new.sh 192.168.1.1 123 60 WARN : too old - 69 seconds
check_mk / icinga check
#!/bin/bash IPDOMO=192.168.1.1 IDX=123 agewarn=300 now=$(date +%s) lastupdate=$(curl -s -i -H "Accept: application/json" "http://$IPDOMO:8080/json.htm?type=devices&rid=$IDX" | grep LastUpdate | cut -f4 -d\" ) seen=$(date -d "$lastupdate" +%s) difftime="$(( $now - $seen))" if [ $difftime -gt $agewarn ] ; then echo "1 \"WARN - Age check Fridge\" realage=$difftime|age=$agewarn Age of fridge" exit 1 else echo "0 \"OK - Age check Fridge\" realage=$difftime|age=$agewarn Age of fridge" exit 0 fi
For my home automation i’m using Home Assistant and Domoticz.
All 433Mhz Temperature/Humidity are connected to a RFXcom device on two domoticx instances. (Master slave construction)
I’ve made a php script and a bash script to draw all sensors on a floorplan in realtime.
There is also a cron running which takes a snapshot of the generated image every 5 minutes.
These images are being converted to MP4 and animated GIF to have a timelapse with all temperatures displayed on a floorplan.
The circles are where sensors are placed.
Colors are from blue till red, representing the heat.
In the center is the measured temperature value.
The (shortened) PHP script: (index.php)
<?php
header('Content-type: image/png');
// This is the floorplan empty ..
$png_image = imagecreatefrompng('plattegrondenmerge.png');
$white = ImageColorAllocate($png_image, 0, 0, 0);
$max = 40;
$min = -10;
// living
// getstate is a bash script (see below which gets the values from domoticz using curl)
// 840 is the domoticz idx
$temp840 = shell_exec('./getstate 840');
// A gray circle will be drawn if the temperature age is > 500 seconds
$age = shell_exec('./new.sh 18 840 500 >/dev/null || echo gray');
// location of circle
$start_x = 950;
$start_y = 760;
$line = $temp840 + 10;
// get x-th line from colors
$colorfromlist = shell_exec("tail --lines=$line ./colors2 | head -1");
if(strpos($age, "gray") !== false){
$colorfromlist = "128,128,128";
};
$colors = explode(",", $colorfromlist);
$color = imagecolorallocatealpha($png_image, $colors[0], $colors[1], $colors[2], 50);
// draw circle
imagefilledellipse ($png_image, $start_x, $start_y, 175, 175, $color);
$start_x = $start_x - 70;
$start_y = $start_y + 15;
// add text
imagettftext($png_image, 24, 0, $start_x, $start_y, $white, './verdana.ttf', $temp840);
// winecellar
$temp840 = shell_exec('./getstate 839');
$age = shell_exec('./new.sh 18 839 700 >/dev/null || echo gray');
$start_x = 560;
$start_y = 840;
$line = $temp840 + 10;
$colorfromlist = shell_exec("tail --lines=$line ./colors2 | head -1");
if(strpos($age, "gray") !== false){
$colorfromlist = "128,128,128";
};
$colors = explode(",", $colorfromlist);
$color = imagecolorallocatealpha($png_image, $colors[0], $colors[1], $colors[2], 50);
imagefilledellipse ($png_image, $start_x, $start_y, 175, 175, $color);
$start_x = $start_x - 70;
$start_y = $start_y + 15;
imagettftext($png_image, 24, 0, $start_x, $start_y, $white, './verdana.ttf', $temp840);
// ETC ETC
imagesavealpha($png_image, TRUE);
imagepng($png_image);
imagedestroy($png_image);
?>
getstate bash script
(gets the temperature from domoticz instance1 given an idx)
#!/bin/bash
curl -s --connect-timeout 2 --max-time 5 "http://ip-domoticz1:8080/json.htm?type=devices&rid=$1" | egrep "Temp|Humid" | awk '{print $3 }' | cut -f1 -d\. | grep -v \" | tr -d "\n\r" | sed s/,/%\ /g | awk '{ print $2"° "$1 }'
new.sh script gets the age of the reading from
domoticz1 or domoticz1
Usage: ./new.sh <domoticz-last-numer-ip> <idx> <maxageinseconds>
#!/bin/bash ## server idx time now=$(date +%s) lastupdate=$(curl -s -i -H "Accept: application/json" "http://192.168.1.$1:8080/json.htm?type=devices&rid=$2" | grep LastUpdate | cut -f4 -d\" ) #echo $lastupdate seen=$(date -d "$lastupdate" +%s) #echo $seen #echo "$(( $now - $seen))" difftime="$(( $now - $seen))" if [ $difftime -gt $3 ] ; then echo "WARN : too old - $difftime seconds" exit 1 else echo "OK : $difftime seconds" exit 0 fi
colors2 – a list of colors representing the temperature
red -> green -> blue
255,0,0 255,10,0 255,20,0 255,30,0 255,40,0 255,60,0 255,70,0 255,80,0 255,90,0 255,100,0 255,120,0 255,130,0 255,140,0 255,150,0 255,160,0 255,180,0 255,190,0 255,200,0 255,210,0 255,220,0 255,240,0 255,250,0 253,255,0 215,255,0 176,255,0 101,255,0 62,255,0 23,255,0 0,255,16 0,255,54 0,255,131 0,255,168 0,255,208 0,255,244 0,228,255 0,196,255 0,180,255 0,164,255 0,148,255 0,132,255 0,100,255 0,84,255 0,68,255 0,50,255 0,34,255 0,2,255 0,0,255 1,0,255 2,0,255 3,0,255 5,0,255
Crontab and gif/mp4 generators
# crontab 5 * * * * root /scripts/domotemp/crontemp.sh # crontemp.sh # stores an image with a date. cd /www/webdir/domotemp wget https://mydomoticzweb/domotemp/ -O $(date +%Y%m%d%H).png >/dev/null 2>/dev/null 1>/dev/null # rest scripts mkdir -p embed # below adds the time to the image ls 2020*png | sort -n -k1 | while read ; do hour=$(echo $REPLY | cut -c9,10) ; convert -pointsize 80 -fill black -draw 'text 1650 100 '\"$hour:00\"'' -resize 960x540 $REPLY embed/$REPLY ;done # convert to gif convert $(ls embed/2020*png | sort -n -k1) animation.gif # convert to mp4 ffmpeg -f image2 -r 24 -pattern_type glob -i '*.png' -vcodec libx264 -profile:v high444 -refs 16 -crf 0 -preset ultrafast -vf scale=1920:1080 domotemp.mp4
I have a rol of printer paper that was used by an old 8bit computer. I forgot which one, one out of my collection.

I dont think it is thermal paper, maybe the printer uses electricity just like the movie clip you see below. (Well .. not using 220V directly on the paper maybe) 🙂
Using OBS and chromakey (greenscreen)
In 2012 I started with 3D printing, I didn’t have my own yet. So it was done using shapeways.
April 2019 I ordered my own, a Creality CR-10S.
Specs
Problem with this 3D Printer is the lack of a thermal runaway detection. My solution is a MQTT/Nodered warning system which plays an alarm and uses a shelly to disconnect the power.
https://www.henriaanstoot.nl/2022/05/11/mqtt-bash-nodered-notify/
Software I Use – see other posts
Hardware
I’m using a filament sensor like the one in below picture
It used to be a DIY thingy using an arduino. (below)
Filament under my table ( in the “dark” )
Software on my mobile
Hints and tips
Want to know what filament is in your gcode?
grep M104 <file.gcode> # M104 is the temperature M104 200 -> PLA M104 240 -> PETG
Laser engraving using my 3D printer (pre lasercutter)
Websites
UPDATE 20230803
Best gap filler i found which is easily sanded down with a dremel.
Alabastine Polyester Plamuur
I wanted to control the input of my monitors, these are my findings.
DDC – Display Data Channel
I2C – (Inter-Integrated Circuit, eye-squared-C), alternatively known as IIC, is a synchronous, multi-master/multi-slave (controller/target) bus
Getting monitor information with the ddccontrol -p command
##### PART OF THE OUTPUT ##### Detected monitors : - Device: dev:/dev/i2c-9 DDC/CI supported: Yes Monitor Name: VESA standard monitor Input type: Digital (Automatically selected) - Device: dev:/dev/i2c-7 DDC/CI supported: Yes Monitor Name: VESA standard monitor Input type: Digital - Device: dev:/dev/i2c-6 DDC/CI supported: Yes Monitor Name: VESA standard monitor Input type: Digital Reading EDID and initializing DDC/CI at bus dev:/dev/i2c-9... I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/AOC2490.xml"
Switching inputs
ddcutil -b 7 setvcp 0x60 0x11 # 7 is Second monitor (starts with 6), 0x60 is the input register (see below) and 0x11 is HDMI ddcutil -b 6 setvcp 0x60 0x0f # First monitor DP (Displaylink) alternative command ddccontrol -r 0x60 -w 15 dev:/dev/i2c-7
List the control registers
ddccontrol -d dev:/dev/i2c-6 ddccontrol version 0.6.0 Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su) Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch) This program comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of this program under the terms of the GNU General Public License. Reading EDID and initializing DDC/CI at bus dev:/dev/i2c-6... I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/AOC2490.xml" Document not parsed successfully. EDID readings: Plug and Play ID: AOC2490 [VESA standard monitor] Input type: Analog =============================== WARNING =============================== There is no support for your monitor in the database, but ddccontrol is using a basic generic profile. Many controls will not be supported, and some controls may not work as expected. Please update ddccontrol-db, or, if you are already using the latest version, please send the output of the following command to ddccontrol-users@lists.sourceforge.net: LANG= LC_ALL= ddccontrol -p -c -d Thank you. =============================== WARNING =============================== Controls (valid/current/max) [Description - Value name]: Control 0x02: +/1/2 C [New Control Value - No changes] Control 0x04: +/0/1 C [Restore Factory Defaults] Control 0x05: +/0/1 C [Restore Brightness and Contrast] Control 0x08: +/0/1 C [Restore Factory Default Color] Control 0x10: +/90/100 C [Brightness] Control 0x12: +/50/100 C [Contrast] Control 0x14: +/5/13 C [???] Control 0x16: +/50/100 C [Red maximum level] Control 0x18: +/50/100 C [Green maximum level] Control 0x1a: +/50/100 C [Blue maximum level] Control 0x60: +/772/4 C [Input Source Select (Main)] Control 0x62: +/17/100 C [Audio Speaker Volume Adjust] Control 0x6c: +/50/100 C [Red minimum level] Control 0x6e: +/50/100 C [Green minimum level] Control 0x70: +/50/100 C [Blue minimum level] Control 0xac: +/6750/65535 [???] Control 0xae: +/6000/65535 [???] Control 0xb2: +/1/8 [???] Control 0xb6: +/3/8 C [???] Control 0xc8: +/5/65302 C [???] Control 0xc9: +/8/65535 C [???] Control 0xcc: +/4/255 [???] Control 0xd6: +/1/4 C [DPMS Control - On] Control 0xdf: +/513/65535 C [???] Control 0xfe: +/4/255 [???]
Setting volume (reg 0x62) of monitor 2
ddcutil -b 7 setvcp 0x62 0x01
AOC monitor PROBLEM
You can’t switch from an input which is not active!
So my workstation is connected via DP, and i can switch to HDMI.
Now i HAVE TO use the hdmi to switch back to DP.
A solution could be to ssh into the machine connected with HDMI (passwordless login) and switch back to DP.
I made a mqtt button sending a topic that was read by the two machines using the mqtt python program elsewhere on this site.
(Rotary Mqtt Volume control)
gddccontrol
Needed to explain a method you can use with shelly devices to some colleagues.
Forgot about this test later, a friend of mine visited me a few days later and warned me about this still being there.
Big mistake 😉 It a Linux ARM system with Busybox
Less do some searching on the web.
Ah .. enable telnet
Open in a browser:
http://192.168.1.x/admin/cgi-bin/debug.cgi
Enable telnet:
Connect and install Pong:
telnet 192.168.1.x (username root) # wget http://agilo.acjs.net/files/mppong/setup.sh # chmod 755 setup.sh # ./setup.sh # ./start.sh # ./start.sh musicpal # For the normal player
Links i have to look into:
https://www.qemu.org/docs/master/system/arm/musicpal.html