by hvxl » Mon Mar 19, 2018 5:47 pm
The on/off control of the gateway is very simplistic. Since the gateway doesn't know the room temperature when used this way, it can not determine how much heat is needed, so it just turns the boiler on at full blast. But as I understand it, that is no worse than what your current control is doing.
I think the next step would be to tell the gateway the water temperature you want the boiler to produce. So, probably on a regular basis, you calculate that value and send a CS command to the gateway. If you only need a little bit of heating when one room is falling below the setpoint, that would be a low value, 35⁰C or so. If you want to increase the temperature by several degrees in multiple rooms, it could be 80⁰ or even more. If no heating is required, you send CS=0. That will also switch off the CH enable bit, which will usually cause the pump to stop running after a while in most systems.
For even more control, you can also use the MM command. But I have only ever seen 2 values from existing thermostats: 0% and 100%. 0% means minimal heating (but heating nonetheless). This may seem strange at first glance, but the MM command applies to the parameter called "Maximum Relative Modulation". It specifies a point between the minimum and maximum modulation a boiler can do. A relative value of 0% may translate to something like 30% absolute modulation. Generally speaking you would normally set either MM or CS to its maximum value and then control the temperature with the other parameter. You can switch between the two methods depending on the circumstances.
Using the method described above, the gateway will send OT messages to the boiler every second, as prescribed by the specs. Your program only has to send a CS command whenever a new value has been calculated. Every 30 seconds would be frequently enough. It doesn't even have to be on a regular basis.
It is possible for your Pi to be in complete control of the OT messages that are sent to the boiler. But then you need to load different firmware: interface.hex. I would not advise to do that unless you run into limitations with the CS command.
Now the difficult part is calculating the desired water temperature. With one input (thermostat) that's already complicated enough (suggested search term: PID controller). I really have no idea how to do it with 7, especially if each room can have a different setpoint. Maybe just calculate a desired water temperature for each room and let the highest one win. But the number of open valves will probably also affect the heating characteristics. I'm afraid I can't be of much help there.
Schelte