Preparing for the winter

Yep, it’ll be there before you know it. Last week our central heating spent some time in CH (Central Heating) mode, so my ELV MAX project has moved to the top of my to-do list for the next days. No more soldering, sketches or other intermezzo for a few days…

Temperature Dialog

With the basic interfacing already finished some time ago, I also started working on the other end sooner than I usually do: the GUI, so I won’t make that same mistake again. Normally the thermostats will run on their weekly program; with 13 switchpoints per day I don’t think that manually adjusting the temperature will be used much, but without the possibility of changing the temperature this way, it’s no fun, right. On the floor-plan of our house, which is the ‘home page’ of our touchscreen GUI (I should update that picture some day, a lot has been added in 2 years!) in the living room, I created a button in every room that will have MAX radiator thermostats. Touching one of these buttons will show a very basic (and still a bit ugly) dialog with a track-bar to override the temperature. This dialog is nearly finished; all I have to add is an additional combo box to set the date/time at which the radiator thermostat should return to the weekly program again. I will not be able to control each individual radiator thermostat BTW; I chose for temperature control per room and not per radiator, cause I think that will be enough.

I also updated my Domotica system yesterday, so I can test all the functions which are finished and ready to use all day long. And since I had to make sure I know exactly where all the Radiator Thermostats are installed (not in a textual way like ‘Bathroom’ in the device description, but by assigning locations id’s), I have finally categorized all my devices (actors, sensors, interfaces etcetera) on building- (we also have a littlle shed in the garden ;-) ), floor- and room level.  With more than 200 items to categorize, it won’t surprise you that some of the devices in my database are currently listed as ‘unknown’: I don’t know where they all are anymore?!

All I have to do now is order some more Radiator Thermostats and write code for the weekly program administration.  Coding will probably take less time than waiting for the delivery, so a turnaround of 10 days should be doable… MAX!

Unravelling the ELV MAX! heating control system protocol

A German company called ELV has a new heating control system since a few months – it’s called MAX!.  With this system you have the ability to control your heating system via Smartphone, Internet and local PC (oh, and manually of course). The MAX! radiator thermostats seem to have all I need: flexible daily switching programs, auto/manual/holiday mode, temperature can be set between 5 and 30 °C in steps of 0.5 °. Other components of the MAX! system are wall switches for Eco mode, window sensors and wall thermostats. Prices are good too; very good actually, when you compare them to alternatives.

The interface for all these wireless devices is the MAX! Cube LAN Gateway; with this you can control, configure and adjust all your MAX! components. Cool..

Not so cool is the web portal that has to be used when you want to control the MAX! system from outside your own house (e.g. via Internet, with your smartphone or whatever). Some people, and I’m one of them, don’t like being forced to use a web portal controlled and secured by a 3rd party; I prefer making my own solution for these kind of  things, especially since every website seems to be hack-able these days and leaking all kinds of information… No, if someone is leaking information about me/us, it should be me doing that, not some company..

Last week someone posted some details about the MAX! Cube LAN Gateway on the Domoticaforum Europe. It seems possible to connect to port 80 of the Cube and even communicate with it. OK that’s a start, now all that’s left to do is finding out how the MAX! Cube works, which can be a tough job. The protocol that’s being used is another proprietary one and therefore nothing has been (and probably never will be) published about it. Time for some good old packet inspection – and for that, it’s better to have a MAX! Cube and a Radiator Thermostat at my disposal, so I bought those 2 items last weekend. After that I started searching for more detailed information about the protocol – but as expected, without result.

I reread the ELV MAX! topic on the Domoticaforum and looked at some lines of MAX! communication that were logged by a member called blb. At first sight I could not tell what it all meant, although I did see some lines that had Base64 characteristics: all characters were more or less human readable and they were ending on 1 or 2 ‘=’ characters. And yes, it’s Base64 encoded; I decoded one of the logged lines and it revealed a url pointing to a portal on the elv.de domain, another decoded line revealed the location and name that forum member blb probably assigned to one of his Radiator Thermostats. Finding out how the temperature had to be set wasn’t hard either. There still are some bytes unknown though ;-)

Nevertheless, this is what I call a good start; so as soon as the ELV MAX! stuff I ordered has arrived, I’m gonna start dissecting the protocol, bit by bit – exciting!

Update: I posted some protocol information on the Domoticaforum. Enjoy!

Proliphix Plugin finished

Today I finished the Homeseer Proliphix Plugin I wrote about before. In short, the updated Plugin has been enhanced with the following features:

  • Celsius support;
  • Support for the IMT series thermostats;
  • Support for the IMT series Humidity sensor.

Although I received the code only for adding Celsius support, I’m sure the Homeseer guys won’t mind I added those other 2 items as well :-)

I was fortunate to have a IMT350 here, sent to me by a Domoticaforum member who found out that the IMT350 wasn’t supported by the current version of the Plugin and asked me to have a look at it. So I did, and in the process I added support for the IMT350 to the Plugin.

Together with another Homeseer user who volunteered as beta tester for the Plugin, we accomplished the 3rd item in the list, support for the Humidity sensor. While I was writing the code for the IMT350, I realized that the first thing that would be missing, was support for the humidity sensor and I just couldn’t leave it like that; it felt like delivering an unfinished product, so I decided to throw in some extra lines of code to make the Humidity sensor readings accessible as well. After some ‘research’ (I’m not a Homeseer user, you know) I found out how to do this, and also found a way to get Humidity readings into HSTouch (with the help of that same beta volunteer who tested my findings). Below a HSTouch screenshot, including the humidity:

Another project finished, still dozens to go!

The Proliphix IMT350c

Proliphix added a new series of Thermostats to their product line: the IMT350. Two models are available; the IMT350c with wired Ethernet and the IMT350w with WiFi. I won’t go into their details, the Proliphix site has all the information you need. I was lucky to receive a IMT350c a few days ago – a Domoticaforum member bought one, but since the Thermostat didn’t work in combination with the Homeseer Proliphix Plugin, it was rather useless to him; so I was asked to have a look at it. Yeah, I always like those kind of questions :-)

As a coincidence, some time ago I received the source code for the Homeseer Proliphix Plugin to add Celsius support to it. The Homeseer guys are too busy with all kinds of things but not with this Plugin, so they agreed on a 3rd party (eventually being me) to add the Celsius support. Adding Celsius support had already been done, and now suddenly I had this IMT350… and i knew the Plugin didn’t work with that model, so sounds like a good opportunity to fix that problem too..
First some pics of the IMT350 (click for larger image):
Proliphix IMT350c IMT350 Touchscreen
IMT Base Plate IMT350c back side
IMT350c USB connector?

Now that last one is a bit strange; do I see a USB connector there?? It sure looks like it; but since this Thermostat isn’t mine, I’ll leave the plugging in of a USB cable to the owner; I don’t want to destroy anything… I searched the manuals, but I couldn’t find any information about this USB port.

The IMT350 series Thermostats have a nice Touchscreen, which feels good and the up- and down-buttons for setting the temperatures are responsive enough. With my NT20e I sometimes had the problem that I clicked the buttons too often cause the Thermostat didn’t react fast enough; that’s gone now. The bottom row of buttons seem to react a bit slower though. Please don’t think I’m reviewing this Thermostat; I’m just telling my experiences I’ve had with it for a very short period; not long enough to be precise and conclusive. One thing surprised me was that the Thermostat takes more than 2 minutes to boot; that’s rather long, if you ask me. For the rest: this thermostat definitely looks much better compared to the NT20e, but still, I wouldn’t call this an “eye-catcher” in my house…

OK, let’s do some research on this IMT350! Connecting the Thermostat to my network was easy; the thermostat has DHCP so after connecting an Ethernet cable to the EPA-20 (Ethernet Power Adapter) and plugging the power adapter into a wall socket, I could start using the web-interface right away. I entered the factory set username and password and there it was. Time to start my own Domotica system and see if I can use this Thermostat; nope. I immediately got an exception on the first login attempt: HTTP/1.1 401 Authorization Required. Somehow I couldn’t authenticate, so I started Wireshark and looked at the conversation:

GET /get?....... HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: 192.168.10.155
Accept: text/html, */*
Accept-Encoding: identity
User-Agent: Mozilla/3.0 (compatible; Indy Library)
Authorization: Basic YCRWaS43YDRTaX4=

HTTP/1.1 401 Authorization Required
Connection: close
Date: Fri, 01 Jan 2010 01:36:20 GMT
Server: Cherokee/0.99.37 (UNIX)
WWW-Authenticate: Digest realm="proliphixrealm", nonce="0572700e162cb40274041d07e8b87252", qop="auth", algorithm="MD5"
Content-Length: 450
Content-Type: text/html
Cache-Control: no-cache
Pragma: no-cache

Aah… Digest Authentication instead of Basic… Since I’m using Borland Delphi 2005 with Indy 10, I first had to partially finish the Digest Authentication code of Indy 10, cause it didn’t work. :-(

After that, I could authenticate and communicate with the IMT350 just like I do with my NT20e. That’s it… all the information that I’m used to retrieve from my NT20e, came out the same way with this IMT350!

Wow, that was easy :-)

Next step, the Homeseer Proliphix Plugin. Adding Digest Authentication to VB.NET was even simpler:

Dim wrCache As CredentialCache = New CredentialCache
Dim netCredential As NetworkCredential = New NetworkCredential(Me.User, Me.Pass)
wrCache.Add(New Uri(URL), “Digest”, netCredential)
MyWebRequest.Credentials = wrCache

Done! Launching Homeseer and configuring a new Thermostat was all that had to be done. When the Proliphix PlugIn starts up, it recognizes a potential HTTP 401 error and if this error does occur, the Plugin will retry with Digest authentication, so that both series (NT and IMT) can be supported at the same time. Here’s the result:

Homeseer Proliphix Plugin

Homeseer Proliphix Plugin with IMT350 and NT20

Gas consumption under the microscope

I’m not really satisfied with how our Central Heating is functioning. Not that we have technical problems, but the way our house is heated isn’t satisfactory anymore. Maybe it has to do with the floor heating we installed earlier this year; I don’t know for sure – I guess it does, but to make the right conclusions, I need more information.

For example, here’s the chart for the central heating of December 24th & 25th, where you can see at what times and for how long it’s heating the house:

Why is there such a big heating interval in the afternoons? What’s the most important factor, outside temperature or the amount of sunlight? (the latter is definitely of influence cause the living room has a window on the south, measuring 2 x 3 meters…)

Looking at the right side of the chart below, we see the temperature in the living room (the red line) rising to 21.7 °C without any heating (green = thermostat setback):

Free energy from the sun; that’s very nice, but not good for keeping the rest of the house warm.. :-(

I really need to create some more insight on all of the factors that influence the behavior of the central heating system.

So that’s what I am doing right now. I’ve added some virtual devices to my Domotica system to calculate some additional values from all the sensors I have.

  1. Break down total gas usage into 2 parts: gas usage for CH (Central Heating) and for DHW (Domestic Hot Water). I can do this cause my Remeha Calenta tells me whether there is DHW demand or not. This should give me a clearer picture of the amount of gas used for heating; ‘noise’ by someone taking a bath or a shower will be filtered out.
  2. Average Outside Temperature per day. For this I compared measurements from the nearest KNMI weather station (12 km) with my own outside temperature sensor and didn’t see a need to collect the weather data from KNMI, saving me some additional work. I’m going to use my own sensor for this. This sensor is probably not located at the right height, it’s mounted to a wall of the garage etc. which will result in an offset, but it should be good enough to use.
  3. Average light intensity in the living room; I have a Lux sensor in the living room and I’m going to use this one to monitor the average amount of light there.

These values should give me a more detailed view of what is happening and how much the influence of both outside temperature and sunlight really is; I know they do, but not how much..

With this I want to be able to explain the behavior of the central heating and explain the gas usage that comes with it.

I started  a webpage to do just that. It’s not finished yet; more information will be added like the weighted average of the thermostat setback during a day, average temperatures in the ‘other’ rooms and things like that.

What I really want, is being able to control the temperature per room: the bedrooms, bathroom, my office and the living room. That’s a total of 6 rooms. Looking at how much sunlight influences the central heating, I need a way to deal with that influence; but how? I will probably need to control the amount of heat flowing through the floor heating based on the temperature in the living room, cause when another room is demanding heat, I don’t want heat pumped into the living room when it’s already warm enough!

And I probably also need to control the radiators in the other rooms to get the right temperatures over there, cause I have the feeling that too much heat is going to the living room right now, leaving too little for the other rooms. But first, that feeling has to become a conclusion before I can move forward!

Proliphix NT20e Thermostat online

Today i created the beginning of a page that will show real-time information about the Proliphix thermostat i started using yesterday. Although not finished yet, it displays some status information and will be extended with several charts to see all you ever wanted to know. But for that, I’ll have to wait a while to have some data to work with. Click on the image to go to my website.

Website Thermostat page

Website Thermostat page

Proliphix NT20e in use

This morning, when i got out of bed, i knew i had a job to do: my Home Automation system was going to be extended with the Proliphix NT20e Thermostat.

All worked well last night with the thermostat on my desk in the office, so drilling a few holes and placing the NT20e in the living room wouldn’t take more then a couple of hours.

However, one little detail took me a couple of hours more then i expected.
This detail was the fact that a Remeha Calenta with an outside temperature sensor doesn’t react on on/off thermostats… it took me some time to figure this out

Once i found out what was going wrong, the NT20e was mounted very easily.

NT20 back plate mounted to the wall
Proliphix NT20 mounted to the wall

Next thing to do was creating a kind of ‘demonstration’ that it all worked. I chose the touchscreen in the living room to be the first GUI to get the new feature of changing the thermostat set point. The touchscreen is 30 cm away from the thermostat, but who cares :-)

NT20 thermostat and ASUS TOP GUI

NT20e thermostat and ASUS TOP GUI

I created a screen with a “+” and “-” button like this:

Setting Thermostat set point in GUI

Setting Thermostat set point in GUI

When a button is pressed, the numeric value in the middle that represents the new desired thermostat setpoint, gets a different color:

Setting Thermostat set point in GUI

Setting Thermostat set point in GUI

When neither the “+” or “-” are pressed for a period of 3 seconds, the numeric value returns to its previous color and the current value is sent to my Domotica system, which takes care of posting the new value of the set-point to the thermostat.

Setting Thermostat set point in GUI

Setting Thermostat set point in GUI

My conclusion so far about this Proliphix thermostat: the greatest thermostat I’ve ever seen.

But this is not the end of the story, there’s still a lot to be done!

Interface with Proliphix NT20e IP Thermostat

After unpacking, connecting and testing the NT20e the time had come to start testing the software i had already made in the past days to let my HA system interface with the thermostat.

With the very good and accurate Proliphix API documentation available, it was quite easy to start coding for the API without actual hardware to test with. The object oriented architecture i use in my Home Automation system really paid off this time. I mean, a thermostat with dozens of values/settings that can be read or written, is something completely different then for example a Door/Window sensor. Or not?

No, it doesn’t have to be. Whether you’re dealing with a thermostat or whatever type of sensor, they are both Devices with 1 or more DeviceValues. So all i had to do is focus on the device-specific code and ‘rewrite’ the API information to Delphi code. For example the code to define all the types and constants is 900 lines of code, the code that does the actual low-level interfacing with the NT20e is 430 lines and the code for the NT20e itself is 400 lines. In total less then 2000 lines of code of which only 1000 executable, not bad! The less new code means less new bugs :-)

The result of these 1000 lines of code is total integration in the rest of my HA system. Complete exposure of the thermostat and its functionality: storing historical data to the database, creating events, manipulating the thermostat from the website, touchscreen or one of my other GUIs, everything instantly available.

Sometimes i am very glad i chose to create my own Home Automation system 3 years ago… this is one of those times :-) .

Testing the interface. Before the thermostat would be placed on the wall in the livingroom, i wanted to make sure the interface was working properly. Only some minor bugs were found, mainly caused by making mistakes in translating the API documentation into constants. Currently the NT20e interface is running on my PC where it will run for some time before i am confident enough to take the next step: relocating the thermostat to the livingroom and start using it :-)

Testing my Domotica system with the NT20e

Testing my Domotica system with the NT20e

Connecting the Proliphix NT20e thermostat

Ethernet and power

Needless to say that connecting this IP thermostat needs an Ethernet connection nearby. Fortunately i have a 1Gbps switch only 3 meters away from the place where the thermostat will be placed. The thermostat also needs 24V DC power to operate. POE (Power Over Ethernet) is being used to power the NT20e. An EPA-20 can be used to inject the power into the Ethernet cable that goes to the thermostat:

Proliphix EPA-20

Proliphix EPA-20

The EPA-20 is capable of powering 2 devices (not necessarily being Proliphix thermostats).

Dry testing

Before connecting the thermostat to my central heating, i decided to do some ‘dry’ tests first: connecting the Ethernet cable and power, but not the 2 wires that go to the central heating. I attached a multimeter to the connections i thought were the right ones for the combination of my central heating (Remeha Calenta) and the NT20e. My guess was i had to use the connections labeled RH and W1, so i monitored what was happening on these 2 connections when the relay switched. I tested voltage and resistance; and as i expected, no voltage is applied and resistance was either 0 or infinite; exactly the behavior i expected (and need).

Proliphix NT20e back plate

Proliphix NT20e back plate

Back side of the NT20e thermostat

Back side of the NT20e thermostat

The thermostat is ready to be used, but first: testing the interface to my Home Automation system with the thermostat still in the office! (will save me a lot of running from office to living and back again while testing) :-)

Proliphix NT20e IP Thermostat

Yesterday i received a NT20e IP Thermostat made by Proliphix:

NT20e IP Thermostat and EPA-20 Power supply

As a logical followup on the Remeha Gateway disaster where in the end i was forced to disconnect the Gateway, my attention shifted towards using a thermostat to achieve my goal: being able to change the setpoint of the central heating from my Home Automation system. I’ve looked at several products, and in my opinion the Proliphix Uniphy Network Thermostats looked the best in terms of offered functionality, connectivity and professionalism. Pieter Knuvers from Bwired and i discussed this thermostat and Pieter was just as enthusiastic about this thermostat as i was. Pieter and i do a lot of things together; testing hardware is one of those things. Last Thursday a Proliphix NT20e and a POE Power injector arrived from the USA. Pieter received the same parts and we started testing.

Features:
- Compatible with fossil (oil, gas) as well as heat pump systems
- Support for Single stage heat and Airconditioning
- Wired TCP/IP communication
- Password protected, built-in Web Browser control interface (TMI)
- Email alerts
- Support for 2 additional external sensors
- 366 day programming
- 4 temperature periods per day
- 3 year scheduling
- Scheduling of vacation and other special days
- Energy Star compliant.

The first looks after the NT20e confirmed my expectations – the Proliphix Thermostat looks and feels very sound.

- It weighs more then the average thermostat i’ve ever held in my hands;
- The buttons on the front give a good, solid ‘click’;
- The LCD is backlit which makes it very good readable;
- The internals look solid and firm, good for years & years of operation.

One minor thing i think that could use some attention is the thickness; the dimensions of the NT20e are 14.2 x 9.5 x 4.3  cm.
This is quite thick, however you have to keep in mind that this thermostat has a lot to offer – more then the usual Dutch thermostat i know of, so that will probably cause the slightly higher volume.

This thermostat is the ultimate tool to achieve what i’ve wanted for years and years, even before i knew what Domotica meant: controlling the temperature setpoint without having to stand in front of the thermostat!