The heating is a night-storage system (German: Nachtspeicherheizung) is a bit of a nuisance. It's from the 1960s or 1970s and the idea was/is to use excess electricity during night time for heating. So the system gets power only between 22:00 and 06:00 o'clock. This is fixed and cannot be changed. Simply turning the heating on during day time does not work. During night time, electric heaters heat some stones which radiate the heat to the room during the following day. The control is just a wheel to set how much power is used to heat during the night. There is no thermostat. You have to think in advance if you want to have it warm or not. This is quite uncomfortable if you're not permanently in the flat.
This weird heating system is the main reason for my hack. The other one is that I didn't want to spend several hundert euros per year for an internet landline which I hardly use.
I had a Raspberry Pi (one of the earlier generations) and a UMTS stick lying around. So I came up with the idea of building a remote control using text messages (SMS) since this did not require a permanent internet connection. After searching around, I found the gammu project which was what I needed.
As for the driving of the heating control I used a stepper motor (28BYJ-48) and a belt drive.
For the temperature acquisition I use a DS 1820 temperature sensor.
Building was then relatively straight forward. I use python scripts to read the temperature , to drive the stepper motor and to process incoming and outgoing text messages. Details can be found on github (in German).
The OS is Debian 8 and I use also a rather old version of gammu. It is some time ago that I build the system and I never updated anything any more (no connection to the internet anyway).
The system collects the temperature data based on cron jobs. The day before I typically set off for work I get a SMS on my phone which looks like this:
fri min 24.5 max 26.4 avg 25.1
sat min 24.5 max 26.1 avg 25.2
sun min 24.7 max 26.4 avg 25.4
now 25.1 r: 53 s: 0
This includes temperature information about the past days, how many text messages can still be sent (r) and the setting of the heating (s).
A can also send various commands by text message to the system, e.g. to get a status report which looks like this:
Fr 21. Jun 07:30:07 CEST 2019
07:30:07 up 35 days, 8:15, 0 users, load average: 0,01, 0,02, 0,00
now 24.6 r: 63 s: 0
All incoming messages which the (very simple) parser does not understand are relayed to my phone. In this way I get all messages which my provider sends automatically, too.
Text commands for the system include commands to set the heating, pull status information, set a new number of remaining text messages (after I have put money to the prepaid SIM card) and to reboot the system.
The system has been running now for almost two years without any trouble.
The whole system could also run on a simple microcontroller like an arduino and a GSM modem. However, since I had a Raspi and a surf stick lying around this was the cheapest solution for me.