I recently bought a new router (AVM Fritzbox 7390) since my older router doesn’t support 802.11n and didn’t have an integrated dsl modem. Shortly after, I visited the tradeshow Cebit where home automation was a big topic. I’m always trying to find new ways to make life easier and home automation has been a long standing dream of mine. Visiting AVM’s booth I noticed they are also pushing towards giving their routers home automation capabilities. In the meantime, their labs firmware incorporates FHEM, an open source home automation server based on perl. Immediately I ordered the required USB device to connect wireless home automation devices and a control unit for a radiator.
Installing went fine, I was able to reach fhem via http://fritz.box:8083/fhem/. While it was pretty cool to be able to control my radiator via mobile phone, this does not relieve me of needing to control my heating schedule. Ultimately, I want my radiators to know if I am home or not, when I come back and maybe even what room I am in. This requires a lot of work so I decided to start small.
I use a FHT80b to control my radiator, which supports automatically setting the temperature in two intervals per weekday. I then created a module for fhem which reads this schedule and transforms it into recurring events in the ical (rfc5545) format. This is readable by your favorite calendar client, mine is obviously the Lightning extension to Thunderbird. The first version of this module is merely read-only, but support for actually changing the schedule is planned.
- Get the module from my github repository. You should save it in your fhem module directory, i.e /usr/share/fhem/FHEM/. If you are also using a Fritzbox it will be here.
- Add the line
define ICS FHEMICSto your fhem.cfg
- Make fhem reload your config (i.e kill -HUP $pid, telnet host 7072 and rereadconfig, or restart your Fritzbox)
- Now you should be able to subscribe to http://fhemhost:8083/fhem/fhem.ics
- The FHT80b doesn’t advertise the weekly schedule by itself, so it needs to be initialized. Use the control unit and cycle through each day’s heating schedule.
- It takes a while until all commands are transmitted (1% bandwith usage regulation enforced by most 868Mhz devices)
If you’d like more options, please take a look at the module file itself. If you are not seeing events, the following commands are available via the telnet interface of fhem:
telnet fhemhost 7072 list FHT_1234 # lists the readings of your FHT device called FHT_1234. # If you are missing readings like "mon-from1" or "fri-to2" # then the FHT has not transmitted its schedule. list # Shows all defined devices, make sure there is a FHEMICS device list ICS # Show state information about the ICS device. get ICS # Retrieves the ics stream. This should contain more than 2 lines.
If you find a bug, please report at github.