Modification of firmware

This Forum is about the Opentherm gateway (OTG) from Schelte

Moderator: hvxl

Modification of firmware

Postby antst » Mon Sep 18, 2017 2:20 pm

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?
antst
Starting Member
Starting Member
 
Posts: 16
Joined: December 2016

Re: Modification of firmware

Postby hvxl » Mon Sep 18, 2017 4:25 pm

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.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1297
Joined: June 2010

Re: Modification of firmware

Postby antst » Fri Oct 13, 2017 3:24 pm

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... :)
antst
Starting Member
Starting Member
 
Posts: 16
Joined: December 2016

Re: Modification of firmware

Postby WimW » Wed May 20, 2020 5:58 pm

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
WimW
Starting Member
Starting Member
 
Posts: 2
Joined: May 2020

Re: Modification of firmware

Postby marcelr » Wed May 20, 2020 9:38 pm

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?
marcelr
Global Moderator
Global Moderator
 
Posts: 1138
Joined: May 2012
Location: Ehv

Re: Modification of firmware

Postby WimW » Fri May 22, 2020 10:20 pm

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!
WimW
Starting Member
Starting Member
 
Posts: 2
Joined: May 2020


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest