HB sensors finished and installed

Almost ready to start investigating hydronic balancing (HB) … ūüėČ













Everything is in place and working except for 1 sensor, which is too far away from the receiving JeeNode (which forwards all the data to my Domotica system). So I’ll have to build another RF receiver for that; the missing parts will arrive tomorrow I hope. In the meantime I started creating a webpage¬†to display all the information I want to observe, so I don’t have to switch between browser tabs and go from one page to the other. Another thing that has to be done is program the thermostat, so that the boiler will have to burn at full power for a few hours every day, so that I can see what happens. ¬†I’ve already seen some things that need to be adjusted!


It's them floats again..

I keep a close eye on a lot of things, including my own Domotica system. Not just things like empty batteries in the sensors, but also the software behind it all. Things like exceptions that occur, memory usage, cpu usage and stuff like that. It keeps me informed about the ‘health’ of it all, so I won’t end up with a system with lots of memory leaks or other nasty bugs scattered throughout the system; and which will be much harder to find once it crashes due to not enough memory

Yesterday I saw something strange happening to the memory usage:

Memory usageImmediately after I upgraded my system, memory usage started to increase to values that I had never seen before. It’s always a straight line with a variance of +/- 2 KB after 24 hours of up-time.

Strange, cause all I had done was adding a few lines of code to support the hydronic balancing sensors; nothing exciting actually. I checked if all objects were destroyed after use; nothing wrong. I did a restart; same thing happened again. The only thing the code had to do was calculate 2 temperatures out of 4 integer values; what could be wrong here?

Digging a bit deeper I saw these messages in the logs, a few per hour:

Exception:Database Server Error: SQL State: 01000, SQL Error Code: 3621

Not very self-explanatory either, but it was evident that something was wrong here. Again strange, since SQL Server has been running without any problem since I use it; that’s 5 years! I looked up the SQL command that triggered this error response and there it was… a string value of¬†‘0.689999999999998’ was written to a fixed-length field and it didn’t fit!

But where does this¬†‘0.689999999999998’ come from? Working with floats of course!

The 2 temperature values are each calculated by dividing a word (2 bytes) by 100; this results in a float with a maximum of 2 decimals (duh). But by storing these 2 temperatures in float variables and¬†subtracting¬†those 2 (to calculate the temperature difference), the result of 28.06 – 27.37 wasn’t 0.69 but the error triggering 0.689999999999998…

Of course, I know this and I should have anticipated on that РI forgot to round the result of the subtraction to 2 decimals!

Hydronic balancing

This weekend I came to the conclusion that whatever I do, I’ll never get a well performing central heating without hydronic balancing. I’ve been watching how the temperatures in all the rooms of our house react and where the energy goes to – it’s a mess!¬†No matter how well I’ll be able to control the kettle, temperature control in all the rooms will still be a mess without a hydronicly balanced system.

So this weekend I decided to stop what I was doing (building the Opentherm Gateway) and first try to do something about this balancing issue.

Hydronic balancing is not something I’m familiar with, and I certainly don’t have the tools for it ; but what i can¬†do is provide enough information with these sensors; I don’t know if I’ll succeed, but it’s worth to give it a try.

Sensor for Hydronic balancing¬†The first thing I need to know is how much energy flows through the radiators. Well, I can do that, I guess… A JeeNode with RF transmitter and 2 1-Wire DS18B20 sensors can provide me information about how much energy each radiator produces by measuring the flow- and return temperatures of each radiator.

I’ve got a bunch of JeeNode kits still waiting to be used, enough 1-Wire sensors, batteries and all other components needed, so what am I waiting for??

So this weekend I built a first sensor and a RF-to-Zigbee ‘gateway’ so I can receive all the sensors without the need of USB, RS232 or an additional Ethernet port.

The first sensor is operational now; more will follow!

Red = flow temperature, Blue = temperature drop

Sending notifications

Yesterday, late in the evening, I saw an intersting post on the Domoticaforum; airox added  (among many other things)  a way to send notifications from his Home Automation system to Android devices by using the Notify My Android (NMA) platform. Hey, that sounds interesting; I just had to check it out today!

After registering and generating the first API key, I could start sending my first notification. The API is simple to use, and the code I had to write for my (home-brew) Domotica system was too:Delphi code for using NMA


I installed the NMA App from Google Market on both my HTC Desire HD and my Asus Transformer TF101 and sent my 1st notification.¬†Cool! Now I can choose between SMS, Notifications and email, and send more messages to my phone than I currently do. For example, I send a SMS to my mobile every time the doorbell rings, cause I like to know about deliveries of new goodies ūüôā Some other, less important events, are sent by email. Now a third option is available, which looks really cool, if I may say so ūüėČ

 Notify My Android



Controlling the radiators is not enough

This is the next episode in the never ending story to get a good central heating; not just in the living-room, but in all the rooms; and totally integrated in my Domotica system. Today I received a box full of parts; diodes, resistors, capacitors, a PIC Р33 different parts in total.

A pile of parts

These parts will be used to build this Opentherm Gateway. I think most people who have ever searched for a way to control their Opentherm controlled central heating system will already know the site I referred to, cause it pops up really quick in the search results of any search engine – it’s one of the scarce good resources that are available when you want to integrate your central heating system into your Home Automation system.

But why do I want to control my central heating system? Do we¬†need it, since we’ve already got Radiator Thermostats¬†on all the radiators in our house? Yes we need it, and I’ll explain why.

The biggest “problem” we’re facing is that we have ¬†a single thermostat that’s controlling the central heating right now, and this thermostat is in the living-room. The influence of the sun on the temperature in the livingroom is huge. Today, with a reasonable amount of sunlight, the 6 m2 of glass on the south side of the livingroom result in producing enough energy to warm up the living-room to a temperature above the thermostat setback. That’s good, very good, and we want to keep it that way of course! But the result of this free energy is that our central heating system stops burning around noon, as you can see below (showing the in- and outgoing water temperature of our boiler):

Central heating behavior

The central heating hasn’t been burning from approx. 13:00, cause there was no need for it anymore. There’s no¬†need to explain what happens to the rooms on the 2nd floor; they all cool down, and there’s nothing I can do about it.

Another problem is that the temperature of the water which flows through the radiators, isn’t high enough for the radiators to radiate enough to heat up the rooms upstairs during the time that the boiler¬†does¬†burn. The result of all this: even if we’d want to, the temperatures upstairs will never reach more than 19¬į¬†Celsius. We don’t need¬†those higher temperatures, but that can change – and it will.

So how can I change when and (more important)¬†where¬†the central heating pumps energy into our house? I decided to give my Domotica system a role in this. The Opentherm Gateway is part of the solution. More about the ‘how‘ later….

MAX! Cube LAN Gateway and DHCP

Just when I thought I’d seen the worst, the ELV MAX! system manages to surprise me…again!

Last Tuesday I decided to do a factory reset of the MAX! Cube LAN Gateway; it was impossible to work with. Constantly disconnecting, internal time totally wrong and I couldn’t find any other way to resolve these issues.

Because I didn’t want to spend too much time on this factory reset, I left the MAX! Cube network settings set to DHCP, which I normally don’t do – right from the start, when the Cube was delivered, I assigned a static IP to it, cause all my network devices have a static address.

I configured my DHCP server and created a reservation for the MAX! Cube LAN Gateway, so that although the IP address is assigned by DHCP now, the Cube will always get the same IP address, no matter what.

The next day, I went through the firewall logs. Hey, what’s this… the Cube is contacting an IP address on port 123, which is the IANA assigned port for the NTP protocol! I’ve never seen the Cube doing this, from day 1! Does this mean that…?¬†yes, the Cube now synchronizes the time!

Firewall log of day 2011-11-01 with filter 'xx.xx.xx.xx'.

Nov  1 20:59:58 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  1 21:45:58 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  1 22:15:59 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  1 22:45:59 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  1 23:15:59 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  1 23:45:59 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123

IP address is where http://www.eq-3.de seems to be hosted, the manufacturer of the MAX! system.

Congratulations ELV and/or EQ-3, I found something that does work! ūüėČ I still don’t understand why the Cube LAN Gateway needs DHCP for that, but I’m past the point of asking myself¬†why¬†every time something¬†doesn’t work on the MAX! heating control system… don’t worry, be happy!

I checked the static IP settings (subnet mask, gateway, DNS) I used and compared them with the DHCP options – they were the same. Of course. I was trying to find out whether I made a mistake or the Cube – silly me!

Another thing that happened was that the sudden disconnections¬†had returned; I hadn’t seen them for a couple of days. Last night, after 00:50, the Cube stopped NTP-ing and some 20 minutes later I got the first socket error 10053 in my Domotica system logs.

Firewall log of day 2011-11-06 with filter 'xx.xx.xx.xx'.

Nov  6 00:20:43 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  6 00:50:43 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  6 12:50:45 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  6 13:20:45 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123
Nov  6 13:50:44 SRC=xx.xx.xx.xx DST= PROTO=KEY_UDP DPT=123

Later that day, I had to power cycle the Cube to get a TCP connection to it that would last longer than 10 minutes… well, nothing surprises me anymore. What’s next?

MAX!imum irritation level reached

I just don’t get it. The ELV MAX! heating control system is probably the most unfinished product I have ever seen in my life. What were they thinking @ ELV when they decided to start selling it? We’ll fix the remaining bugs with some firmware releases afterwards? Cause this product has not been tested thoroughly, I can tell you that!

I was very close to kicking these Radiator Thermostats right off the radiators; a well-placed kick against those things should be enough, since it’s all plastic.

What happened? When the clock was set back one hour last weekend (Sunday morning @ 03:00 to be precise), the Max Cube LAN Gateway suddenly started closing the TCP/IP connection every 10 minutes. Or maybe it even rebooted itself; I don’t know cause I didn’t bother to check that. I was completely done with MAX!. I can’t think of anything else than the internal time keeping of the MAX Cube being the cause of this.. well done guys, and thanks for this mature and reliable product!

ELV MAX! sucks


Nothing helped to get the Cube going again, so this evening I had to perform a factory reset and teach in all the Radiator Thermostats again. I stopped after teaching in just 2 of the 8 Radiator Thermostats ¬†I have; the fun is completely gone; I have to regain confidence before I teach in the other 6 Thermostats.¬†I don’t like MAX! anymore and for me, ELV has been demoted to a company that sells crap. I’ve just had too much problems with it.

And yes, I was very pissed when I wrote this. Working with products which have so many flaws and for which I payed almost 300 Euro makes me angry, very angry. It sucks away all the fun… I’ve never ever had this experience before, actually.¬†But hey, that’s why I’m writing these posts – ¬†the passion for Domotica and the fun I have with doing what I do, day after day. Disappointments like this seem to come with the territory…

Now it’s time¬†for some soothing soldering therapy ūüėČ