imagemagick and ffmpeg cheat sheet

Make a sprite from photos

magick.exe  *.jpg +append sprites_P0100.jpg

Resize all images in place

magick.exe mogrify -resize 380 *.jpg

Crop images in place

magick.exe mogrify -crop 3200x3200+400+400 *.jpg

Make and scale video from images

ffmpeg  -i DSC_%04d.jpg -c:v libx264 -vf fps=25 scale=800:800  alpin_400.mp4

Smart Home DIY on a tight budget

After twenty years of reading about smart homes I decided to finally make mine smart(-ish) as well. I’m working to reuse as much of existing infrastructure, so I can spend as little as possible.

At the moment my system consist of:
* hub
* four google assistant speakers
* hive thermostat
* cctv camera
* two electric switches
More will follow shortly (they are on their way from China).

The hub

My hub is based on QNAP NAS TS-453A, which I had already. I wouldn’t buy it just for that, Raspberry Pi would work as well. This NAS drive runs a QTS operating system, which is basically a linux machine with very convenient web UI. Among many features it offers a “Container Station”, which is a docker subsystem with large set of packages ready to install. I’m running two:
* Home Assistant – opens source hub for home automation
* Eclipse Mosquitto – MTQQ broker working as a transport layer between switches and the hub

Note: the container station offers three ways to connect the docker deployed apps to the network. I’m using the “Host” mode, which mean the apps are binding directly to the network interface of the NAS. You want to set it as such, so the devices on the network can easily connect to both apps.

Google assistants

Home Assistant is available as a service for Google Assistant. There’s currently a limited set of accepted commands – currently they support lights and thermostat only. service in assistant directory.

All switches/lights can be renamed from Google Home app on Android.


I’m using cheapest Sonoff Basic switches (less than £4 on Banggood) flashed with custom firmware Sonoff-Tasmota.