Back to electronics, here are some news of the JeeTherm, as, since the cold season is about to start, it is time to do some tweaking.
It has been working fine since I last touched it, back in January, just before a big cold spell around here! but there were a few little issues, namely:
1: The reported values were the last values read from the boiler, however, if for example the hot water was used briefly, I would see an increase in temperatures, but no indication that the burner had been used. This was easily solved by reporting the maximum value of the status that occurred between radio messages.
2: (and this one was trickier) sometimes the daemon running on the server would stop reporting serial messages from the JeeLink. After spending a lot of time improving the serial and socket handling (written in C) and not getting better results, I gave up for a while. The system still worked, as the calculated temperature was still sent via serial and subsequently via radio to the JeeTherm, only I would get no reporting back. Eventually, the solution I found was to automatically restart the serial port if no message would be received, via serial, for more that 2 minutes. The strange thing was that the serial to the JeeLink and radio was still working, so I thought it could be some sort of air waves conflict. However, since there is a sequence number on my radio message, which is increased even if the communication fails, I would have expected to have larger numbers when communication failed, due to the retrials. But this was not the case, all numbers could be accounted for in the minutes that were missing. So the radio message was coming across, being received at the JeeLink, only not making its way into the serial port.
Just as I was re-flashing the JeeTherm, I googled a bit on the subject and found some reports which led me to think that radio noise on the line, from the FHZ1000PC on another USB port could be disrupting something. Changed the JeeLink to a different USB port, and it appears to have improved...time will tell.
3: The JeeTherm reported every 60 seconds, but, since I have no synchronization, a aliasing phenomenon was occurring. I explain. The setpoint calculation is made once a minute, on the minute, on the server, and sent to the JeeLink, where it waits for a message from the JeeTherm, to reply with the new setpoint. Due to the aliasing, sometimes the radio message came in just before the new setpoint calculation, so I wold be running the boiler with a 1 minute delay from the calculation. Not very serious, but not how things are meant to be :)
So, the solution was to report, in the reply from the JeeLink to the JeeTherm, via the radio,, the age of the data, in seconds. So I measure the seconds since a new setpoint was received at the JeeLink and send this back to the JeeTherm. The JeeTherm then uses this age to adjust its reporting interval in order to always have the freshest data. True enough, after the first radio message, which happens whenever I first turn on the JeeTherm, all other messages come in 5 or 6 seconds after the minute (the 5 seconds delay is on purpose, to allow some leeway, it could be anything)! now I have a basic synchronization implemented!
The code for all this will soon be on Github
Soon, more on the self powered OpenTherm interface, and other Jee's!
LEGO Traffic Light
2 months ago