On/Off thermostat state

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

Moderator: hvxl

Post Reply
vamp
Starting Member
Starting Member
Posts: 9
Joined: Tue Dec 08, 2020 10:03 am

On/Off thermostat state

Post by vamp »

Hello there,

We connect a on/off dry contact relay thermostat to the gateway. It possible to somehow read the relay state? Any message ID that show the relay open or close state?

I read this, but not so clear, how to read this value:

As indicated, the gateway by default will instruct the boiler not to do any heating when the thermostat terminals are left open. However, when the terminals are tied together, the gateway sends its internal maximum central heating setpoint value to the boiler and sets the CHenable bit in MsgID 0.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

The CH enable bit is bit 0 of the high byte. So you can look for R80000100 (CH enable on, relay closed) reports versus R00000000 (CH enable off, relay open). It can also be R00000300 versus R80000200, depending on the DHW setting. If the 6th digit is odd, CH enable is on.

Alternatively, you can periodically issue the PS=1 command. The response starts with two sets of 8 zeroes or ones, like this: 00000000/00000000. The digit marked in red is the CH enable bit.
Schelte
vamp
Starting Member
Starting Member
Posts: 9
Joined: Tue Dec 08, 2020 10:03 am

Re: On/Off thermostat state

Post by vamp »

i See.

Now my problem is that i would like to use a on/off thermostat with weather following mode.

My idea is:

The termostat send a simple ON/OFF signal. it set the setpint from min (10) and max (90) water temperature, and set a on/off state of the central heating. I periodically send a max CH setpoint value to the boiler (about 10 minutes) it is a calculated value, that use a simple linear relationship between the outside temperature and the CH water temperature (i use the boiler own spreadsheet to calculate it)

My problem is: The thermostat relay is close, the boiler start heating (it set the setpoint to the max CH value) i send the max CH every 10 minutes. Working well, no prob... But! The termostat reach
the setted temperature so the relay is open. It send a CH setpoint value (10 celsius) and OFF the boiler. but after, the boiler got the first max CH setpoint value in this state and it set not only the max CH Setpoint , but also the CH setpoint to a value (like 48) that induces to start the heating...

So the thermostat basicly not can do anything...

i do something wrong? Possible to solve the problem somehow?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

This is not a scenario I have tested before. What you describe sounds perfectly reasonable. I will investigate.
Schelte
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

Which firmware version are you using? It sounds like 4.X to me (firmware 5.0 would send a control setpoint of 0 instead of 10). Can you try again with 5.0? I have simulated this with 5.0 and can't reproduce the problem you describe. But looking at the 4.X sources, I also don't see how it could happen with that firmware.

Just to confirm: You are using the SH command to periodically update the max CH setpoint, right?

If you still experience the problem with firmware 5.0, can you provide a log?
Schelte
vamp
Starting Member
Starting Member
Posts: 9
Joined: Tue Dec 08, 2020 10:03 am

Re: On/Off thermostat state

Post by vamp »

Yes, it is 4.2 version. I try to update it, it is a remote place, not so easy to access it...

Yes i use the "SH=" command to set the max CH setpoint.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

If you have remote access to the OTGW, you should also be able to upgrade the firmware remotely. Make sure to use OTMonitor 5.0 for doing the upgrade.
Schelte
vamp
Starting Member
Starting Member
Posts: 9
Joined: Tue Dec 08, 2020 10:03 am

Re: On/Off thermostat state

Post by vamp »

try this, but the connection is broken in update process... now the OTGW is not working. I hope it possible to re-flash the firmware via COM port...:)
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

:shock: I hope so too.

I did my best to make the process as brick-proof as possible. But there are a few moments when the device is in an unrecoverable state (at least without a PIC programmer). However, that should only cause problems if it is powered down at exactly those times. Communication errors should never leave it in such a state.
Schelte
vamp
Starting Member
Starting Member
Posts: 9
Joined: Tue Dec 08, 2020 10:03 am

Re: On/Off thermostat state

Post by vamp »

i hope it not bricked...:)

I started the update the remote site (with nodeMCU), but the network connection is broken, so i need to force close the OT monitor. After that, if i try to flash the firmware, every time it said "please reset the device manually..." message. (seems to not put to bootloader mode automatically)

the CP2102 serial converter device is on the way, i hope that i connect to TX/RX and restart the device if it ask it, it able to go to bootloader mode. If i read correctly, the boodloader only able to damage if i do Self-programming code upgrade, right?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: On/Off thermostat state

Post by hvxl »

When OTMonitor asks to reset the device manually, you can do that by briefly connecting the two RST pins next to the PIC together. Then you should be able to restart the firmware upgrade via the NodeMCU. But first make sure you have a stable network connection, otherwise the same thing may happen again.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”