Central Heating System (C#.NET, WCF) based on FHT80b system

Show or discuss your existing Home automation project here, so a detailed explanation!.....
Post Reply
pbrand
Member
Member
Posts: 100
Joined: Wed Oct 01, 2008 10:17 pm
Location: Netherlands
Contact:

Central Heating System (C#.NET, WCF) based on FHT80b system

Post by pbrand »

It has taken me quite a while (due to diverse circumstance amongst which lack of time) to finally succeed in automating my city central heating system. And it is still not finished because I hardly have any user interface which I’m always having difficulties with.

But here is an overview of the system for the few that are interested. Although the FS20 system itself is unidirectional and therefore not very usable, the FHT80b device luckilly is (sort of) bidirectional.

My goal for the system was to be able to control the temperature in every room of the house (which has a radiator), independent of the rest. I live in an area where there is city heating, so the system would have to live with that. Furthermore, and the main reason for doing it myself, was that I needed a time schedule of more than one week. And to be able to control it externally.

I made a choice for the FHT80 based system, because it was cheap and still looked reliable. I had no money for X Comfort and 2 years ago Z-Wave was not yet widely spread.

For the controlling software I made a choice for IP-Symcon for, at the time, it supported a web service interface to control devices from my own software. The system as it is now consist of the following hardware:

-An FHZ 1300 PC Usb gateway;
-The hall with one FHT80b and one FHT radiator valve;
-The living room with one FHT80b and three FHT radiator valves;
-The Bath room with one FHT80b and one FHT radiator valve;
-The Bed room with one FHT80b and one FHT radiator valve;
-The spare room with one FHT80b and one FHT radiator valve;
-The Hobby room with one FHT80b and two FHT radiator valves;
-An FHT 8W used to control the valve of the city heating system;
-Windows 2008 R2 server for running the software;

Without any additional software, the FHT80b’s would control each room separately using the radiator valves. The FHT 8W valve on the city heating system is connected with all present FHT80b’s and only opens when there is a need for warmth. This system operates quite well, but as I said I needed some more control. I therefore wrote some additional stuff to support this.

Firstly I wrote a WCF (c# .net) wrapper service around the Ip-symcon web service. The wrapper only exposes the functions I need and a bit more comfortable in calling than the ip-symcon web service equivalents. The WCF service is facilitated in a windows service on the server.

Then I wrote a WCF service, which contains a queue for timed temperature commands. The FH80b is not completely reliable when controlled from within software because it’s not bidirectional but ‘sort of’. You can send a temperature command to it, and most of the time it receives it. But not always. You can however verify if the command has been sent by checking the status fields of the FHT80b device. So when polling you can control it reliable. This mechanism has been encapsulated in the WCF service. I can call the service with a command to set the temperature of Room ‘X’ to ‘Y’ degrees at ‘Z’ o’clock. The service takes care of it from that moment on. When the command fails to be received by the FHT device, it is resent until the unit confirms that the correct temperature is set. So it's set and forget.

Using that mechanism, the system is now quite reliable, though not very fast. This is because the FHT uses a 116 second time loop. Every 116 seconds it receives commands. So when at first it fails, you have to retry after 116 seconds. But usually all goes quite well.

Finally the windows service which encapsules the above, also contains a polling mechanism to a google calendar which I have setup for this purpose. I use the calendar to control the temperatures of all the rooms. This gives me a very flexible schedule with virtual no limitations in frequency or length. In practice I use a scheduled temperature state for the entire house. If needed you can override this with a scheduled even for a separate room.

After some testing and bug fixing the system now operates quite nicely for over a month. So, apart from current lack of user interface, I think it is quite finished now :)

Next step will be to include controlling the airco in the bed room (nothing more fancy than on/off I think). But since the rest of FS20 device is not very reliable, I have ordered an Aeon labs ZWave USB gateway for this. So next part will be enhancing the Ip-Symcon WCF service with ZWave functionality. Never a dull moment :D
Post Reply

Return to “Home Automation Projects”