Monthly Archives: November 2024

rat-ratgdo – Home Assistant.

By   November 25, 2024

My truck is too long.  The Ford website says 20’3″.  The space between the front and rear garage doors is 21′ even.  That doesn’t leave a lot of margin for error when driving in.

Enter Rat-ratgdo. This is a board that can link with Liftmaster/Chamberlain Security 2.0 garage door openers.  It can read the state of the door, sensors, and control the door.  With ESPHome firmware, it links easily to HomeAssistant.

I moved the obstruction sensor for the rear door up to the height of my bumper.  When the bumper clears, the rat-ratgdo obstruction sensor switches from “Problem” to “OK”.

This allows me to create an automation:

When I drive in the back door, a light in the ceiling turns on as soon as I block the obstruction sensors and turns off again when the sensors are clear.  If the light doesn’t turn on when I drive in, then I know that HomeAssistant isn’t working so then I just have to look in my rear view mirror and watch the blinking LED of the obstruction sensors which is slightly more error prone.

Re-create proxmox containers and VM’s from existing raw images.

By   November 20, 2024
  • Find your backups.
  • Extract pct.conf from backups
    • tar xvf /mnt2/mpv-pve/dump/vzdump-lxc-101-2024_11_16-00_03_50.tar.lzo ./etc/vzdump
  • Create null_template.tar.gz
for I in 105 103 102 101; do cat $I/etc/vzdump/pct.conf | grep -v ^lxc | grep -v "^#" | sed -e 's/^/\-/' -e 's/: / /' | xargs pct create $I /mnt/pve/nfs-beernas-containers/template/cache/null_template.tar.gz; done
for I in 100 120 121 122; do mkdir -p /tmp/$I; lzop -dc vzdump-qemu-$I-*.lzo | vma config - > /tmp/$I/$I.conf; done
for I in 100 120 121 122; do cat /tmp/$I/$I.conf | grep -v '#' | sed -e 's/: / /' -e 's/^/\-/' | xargs qm create $I; done

…and to avoid this pain in the future:

5 0 * * 0 touch /mnt/pve/nfs-beernas-backups/.timestamp
0 0 * * 0 find /mnt/pve/nfs-beernas-backups -name config.dump.* \! -newer /mnt/pve/nfs-beernas-backups/.timestamp -print | xargs rm
0 0 * * * sqlite3 /var/lib/pve-cluster/config.db .dump > /mnt/pve/nfs-beernas-backups/config.dump.$(date --utc +%Z%Y%m%d%H%M%S).sql