Page 1 of 1

Modification of firmware

Posted: Mon Sep 18, 2017 3:20 pm
by antst
Hello,

This is question mostly to hxvl,

I am working toward solution where I manually calculate and control CS, seems to be most reasonable, after all in my setup (15 heaters with controlled valves and bunch of thermostats in the rooms). But, in case of connectivity loss, it would be nice to have option to revert to thermostat control (which I keep exactly for this reason) as a fallback option. I.e. to have expiration timer on custom controls : for example, when I set CS override, it remains active for some period of time, let say 20 min, and if there is no new value set over this period of time, then it reverts back to CS=0.
Practically, I would modify command with simple extension, something like
CS=0:TM=20 and then OTGW knows that this setting is valid for 20 min only.
How difficult to implement this?

Re: Modification of firmware

Posted: Mon Sep 18, 2017 5:25 pm
by hvxl
It shouldn't be too difficult. But of course that depends on your skill level. I would probably go for a fixed timeout, or otherwise simplify the command to something like CS=50*20. That is easier to parse.
You may have to remove some other feature that you don't use to free up enough space for your addition.

Re: Modification of firmware

Posted: Fri Oct 13, 2017 4:24 pm
by antst
Huh.
Looked at ASM code. Last time I used assembler was like 10 years ago, and even then it was optimisation of single function, not complete code. Complete asm code was something like 20 years ago last time :)
And while assembler itself isn't a problem, trying to get complete picture of the code looking at ASM files is :)

I'd say I am clearly impressed. Nowadays most of people would just throw more memory (PIC with more memory) and write in C :)

According to what I see, assuming that I want to add fixed timer to CS value ONLY, then I need to create additional timer with fixed value, and reset it when I receive CS value. Sounds quite easy... :)

Re: Modification of firmware

Posted: Wed May 20, 2020 6:58 pm
by WimW
Hello guys,

I searched the forum for results on this, but could not find any. Could one of you report?

antst is asking about exactly the kind of thing I'm working towards: an external device (probably a Pi) instructing the OGTW to modify the boiler water setpoint (CS) with an automatic fallback to normal thermostat operation if no further instructions are received from the external device.

My ultimate goal is to have temperature control in several rooms
- without running new cables (requiring opening up walls / floors)
- with an open, customisable system
- while having fun and learning something
- without buying an expensive but closed commercial solution

Re: Modification of firmware

Posted: Wed May 20, 2020 10:38 pm
by marcelr
If I understand correctly, what you need is the interface firmware on your OTGW and a piece of code on your raspi that drives your boiler, such that the raspi controls the boiler through the OTGW?

Re: Modification of firmware

Posted: Fri May 22, 2020 11:20 pm
by WimW
marcelr, in the interest of reliability I would much rather have the OTGW handle everything. I don't trust the setup enough to send every single message through the Pi. The Pi would only have to request some values and send a CS command. In case the Pi stops updating the OTGW, the gateway should cancel the CS command and revert to thermostat operation.

So my question is: is there any update on what antst proposed and hxvl replied to? Did it work?

By the way, another issue is that my skills are limited. I think I can handle the non-realtime Pi functionality that I described, but probably not the code to handle every single message including timeouts, failsafes and whatnot.

The good News is that I just tested that my boiler-thermostat combination does indeed work with the OTGW (Elco Euron with QAA73 thermostat), and that I can indeed override the control setpoint with a CS command. It seems to behave as expected. Great work by Schelte!