Primitive webcam server using inetd and fswebcam

Hi all!

This weekend I was thinking how to make my webcam connected to
OrangePI send a picture “on demand”. There are daemons (e.g. motion or
webcam-mjpg) which do this but they capture images even when you are not
watching and I wanted to avoid this. There are also projects (fswebcam)
which are able to take single picture, save it to disk and end. I just
needed to run it after http request and send back the image. Installing
full webserver with some kind of interpreter (php, lua,…) seemed to me
like an overkill. So I came to an idea to use inetd.

And this is how I did.

Continue reading Primitive webcam server using inetd and fswebcam

Yet another IoT thermostat

Hi all,

this post will be about my homemade IoT thermostat.  The goal was to not install any cables (because I live in a rented flat), to go really cheap and to be able to set the temperature from anywhere. I’ll also give you some tips you should think about when building your own. Let’s get started.

Continue reading Yet another IoT thermostat

Example systemd unit config

/etc/systemd/system/my-service.service

[Unit]
Description=My super service
After=network.target

[Service]
ExecStart=/full/path
#Type=forking
#PIDFile=
Restart=always
RestartSec=2
User=root
Group=root
WorkingDirectory=/opt/service/
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=my-service
Environment=PATH=/bin

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable my-service