Page 6 of 10

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Wed Jan 09, 2019 8:26 pm
by Bart
I've managed to build the gateway firmware with a small and quick modification so that it treats the #57 command in the same manner as the #25 command. This disables the functionality of changing on the wire a write request of the thermostat of the CH max temperature, for sure this shortcoming can be improved upon but since I don't see evohome sending out this command as a write data command (only a read data is done from evohome to the boiler) the hack suits my purpose quite well.
And it works.
I can now override the #57 command response using SR=57:65,00 to pretend that the maximum boiler temperature is 65,00 degrees. Evohome then scales the control setpoint between some minimum and the fake maximum temperature of 65. Log extract:

Code: Select all

22:04:35.399535	Command: SR=57:65,00
22:04:35.440532	SR: 57:65/0
22:04:37.903679	T80190000	Read-Data 	Boiler water temperature: 0.00
22:04:38.195700	BC01942CD	Read-Ack  	Boiler water temperature: 66.80
22:04:38.437733	T90014C00	Write-Data	Control setpoint: 76.00
22:04:38.706759	B50014C00	Write-Ack 	Control setpoint: 76.00
...
22:04:58.382856	T80190000	Read-Data 	Boiler water temperature: 0.00
22:04:58.718843	BC019434D	Read-Ack  	Boiler water temperature: 67.30
22:04:58.925945	T90014C00	Write-Data	Control setpoint: 76.00
22:04:59.217079	B50014C00	Write-Ack 	Control setpoint: 76.00
...
22:05:02.716139	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:03.039131	BC019434D	Read-Ack  	Boiler water temperature: 67.30
22:05:03.262193	T90014C00	Write-Data	Control setpoint: 76.00
22:05:03.545155	B50014C00	Write-Ack 	Control setpoint: 76.00
...
22:05:07.576364	T00395000	Read-Data 	Max CH water setpoint: 80.00
22:05:07.885404	BC0395000	Read-Ack  	Max CH water setpoint: 80.00
22:05:07.905126	AC0394100	Read-Ack  	Max CH water setpoint: 65.00
22:05:08.125435	T00394100	Read-Data 	Max CH water setpoint: 65.00
22:05:08.385432	BC0395000	Read-Ack  	Max CH water setpoint: 80.00
22:05:08.391833	AC0394100	Read-Ack  	Max CH water setpoint: 65.00
22:05:08.655487	T00394100	Read-Data 	Max CH water setpoint: 65.00
22:05:08.890453	BC0395000	Read-Ack  	Max CH water setpoint: 80.00
22:05:08.910505	AC0394100	Read-Ack  	Max CH water setpoint: 65.00
...
22:05:10.808619	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:11.066606	BC019434D	Read-Ack  	Boiler water temperature: 67.30
22:05:11.352594	T90013E00	Write-Data	Control setpoint: 62.00
22:05:11.562626	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:12.990673	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:13.224551	B401943CD	Read-Ack  	Boiler water temperature: 67.80
22:05:13.519715	T90013E00	Write-Data	Control setpoint: 62.00
22:05:13.719756	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:10.808619	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:11.066606	BC019434D	Read-Ack  	Boiler water temperature: 67.30
22:05:11.352594	T90013E00	Write-Data	Control setpoint: 62.00
22:05:11.562626	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:12.990673	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:13.224551	B401943CD	Read-Ack  	Boiler water temperature: 67.80
22:05:13.519715	T90013E00	Write-Data	Control setpoint: 62.00
22:05:13.719756	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:18.391972	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:18.702003	B401943CD	Read-Ack  	Boiler water temperature: 67.80
22:05:18.918069	T90013E00	Write-Data	Control setpoint: 62.00
22:05:19.206057	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:22.709280	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:23.036279	BC01942CD	Read-Ack  	Boiler water temperature: 66.80
22:05:23.253401	T90013E00	Write-Data	Control setpoint: 62.00
22:05:23.527313	B50013E00	Write-Ack 	Control setpoint: 62.00
...
22:05:28.122525	T80190000	Read-Data 	Boiler water temperature: 0.00
22:05:28.381581	B401940E6	Read-Ack  	Boiler water temperature: 64.90
...
...
22:08:09.569913	T00394100	Read-Data 	Max CH water setpoint: 65.00
22:08:09.754827	BC0395000	Read-Ack  	Max CH water setpoint: 80.00
22:08:09.770608	AC0394100	Read-Ack  	Max CH water setpoint: 65.00
Note that when the new max is introduced, evohome reads it another two times, maybe to convince itself.. But after this initial repetition all the next read requests are like before - one read data for #57 every now and then.
Note that any subsequent read data from the thermostat contains the new 65 degree value as parameter. Which I still think is strange.

Next step would be to make this setting survive reset, save it in eeprom, or maybe just hard-code a convenient default temperature in to the firmware.

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Wed Jan 09, 2019 9:23 pm
by Stulin
Bart,

This is excellent work.

When I get my bridge up and running would you be willing to share your modified firmware?

Just so I understand what you have achieved, can you confirm the following?

1. You send a write command to the evo controller with a preferred CHW temp.
2. Evo controller uses this value for its calculations.
3. Boiler sends read request of CHW temp to evo controller.
4. Evo controller responds with value.

As far as making the setting persistent for resets, I was planing to use my Home Assistant instance (localised home automation system) to automate the functions on the gateway, one of which was the CHW temp.

The opentherm gateway is a supported component within home assistant. I know this is complicating things but thought it could be of interest.

https://www.home-assistant.io/components/opentherm_gw/

Stu

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Wed Jan 09, 2019 10:03 pm
by Bart
Stulin wrote: 1. You send a write command to the evo controller with a preferred CHW temp.
2. Evo controller uses this value for its calculations.
3. Boiler sends read request of CHW temp to evo controller.
4. Evo controller responds with value.

Stu
No, after I send the command for the override to the gateway, the flow on the opentherm bus is like
1. Evohome controller does a read data CH temp to the boiler. It does this at a regular interval actually. In the log, messages that start with a T origin at the thermostat.
2. The boiler responds with read ack and value 80 but the gateway does not forward this to the thermostat. In the log boiler messages start with a B.
3. The gateway instead sends a read ack with 65 to the thermostat. This is the message marked in the log with an A

From this point on the the thermostat is tricked to believe that the boiler Max is 65 and scales CHW desired control setpoint up to this value. It is a kind of man in the middle attack :)
The boiler is not aware at all of this trick. The boiler max remains 80, but the thermostat will never ask for anything above 65.

I suppose you can any home automation to set the value in the gateway, it needs to be persistent somewhere but not necessarily on the gateway as you correctly pointed out.

I can give you a copy of the firmware but I think that I need to contact the original author first. He might request for a specific version signature.

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 8:49 am
by Richard
Bart wrote:
The EVOHOME Shop wrote:I have a gateway I use here... Nice little device! 8-)
Do you happen to have a log with a non-viessmann that you can share? Especially regarding the #57 commands.
I probably could Bart BUT coding is not my thing and I'm not sure exactly what you are referencing... :?

Nice work BTW... 8-)

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 10:38 am
by Bart
I was referring to a log file - in the opentherm monitor you can select an option that saves the flow of opentherm command to a file:
Image

At the time that I asked for this I was just wondering how a command flow would look like with evohome and a boiler that supports setting of the CH water temperature. But since I managed to get my Viessmann - Evohome setup to work the way I want it is not longer of any importance to me.

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 10:57 am
by Stulin
Bart wrote: From this point on the the thermostat is tricked to believe that the boiler Max is 65 and scales CHW desired control setpoint up to this value. It is a kind of man in the middle attack :)
The boiler is not aware at all of this trick. The boiler max remains 80, but the thermostat will never ask for anything above 65.
Bart, thanks for confirming.

How is the corresponding CHW temp set on the boiler to match the evo controller?

Is the manual CHW temp control on the boiler no longer locked out?

Appologies for my ignorance :oops:

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 11:27 am
by Bart
Stulin wrote: How is the corresponding CHW temp set on the boiler to match the evo controller?
It is not and it is not needed. The way evohome seems to work is that is requests for the maximum CHW temperature allowed through opentherm and then when it sends out the temperature it wants, it respects this maximum setting. Like I said, the boiler is unaware of the override. The boiler is a slave and just delivers the water temperature requested by the master - which is the thermostat.
Stulin wrote: Is the manual CHW temp control on the boiler no longer locked out?
No, I don't know if that would be possible, but I assume not.

If you desire a variable CHW you may do that through some home automation solution. You may even e.g. simulate weather compensation by controlling the max CHW based on outside temperature. I wonder if that would make sense actually.
I know that evohome should not need it, but on the other hand I consider that evohome is not perfect as it is not capable of preventing temperature overshoot when my 35kW boiler delivers CH water at 80 degrees even though evohome knows exactly what is going on as far as temperatures are concerned.
Stulin wrote: Appologies for my ignorance :oops:
Don't worry, I'm not an expert either. I'll be asking you questions once you get a home automation running with the gateway. By the way, I have a wireless module for the gateway. Do you have any idea of how to set these up?

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 2:10 pm
by Stulin
Bart wrote:
Stulin wrote: How is the corresponding CHW temp set on the boiler to match the evo controller?
It is not and it is not needed. The way evohome seems to work is that is requests for the maximum CHW temperature allowed through opentherm and then when it sends out the temperature it wants, it respects this maximum setting. Like I said, the boiler is unaware of the override. The boiler is a slave and just delivers the water temperature requested by the master - which is the thermostat.
Ah, got it. I thought the problem was evohome not sending the CHW setting to the boiler, not the other way round. Makes sense now.
Bart wrote: If you desire a variable CHW you may do that through some home automation solution. You may even e.g. simulate weather compensation by controlling the max CHW based on outside temperature. I wonder if that would make sense actually.
This was my plan all along, to use the external temperature (local weather data) averaged over a range of weeks, fed into a Home Assistant automation to set the CHW temp dynamically.

Will be able to do a lot of other cool stuff which I haven't got around to dreaming up. First step is getting the OTGW up and running.
Bart wrote: Don't worry, I'm not an expert either. I'll be asking you questions once you get a home automation running with the gateway. By the way, I have a wireless module for the gateway. Do you have any idea of how to set these up?
Happy to help.

My final solution will eventually include wall mounted tablets for the front end of my home automation system so I can monitor and control systems, such as evohome & the boiler. Also integrating with Apple HomeKit so I can say "goodnight Siri" and the heating system is automatically set into a night mode, the house lights turn off, sockets powered off, alarm set, etc. The options are endless.
Bart wrote:By the way, I have a wireless module for the gateway. Do you have any idea of how to set these up?
Sorry I have no experience of setting up the wireless lan on the gateway. I ordered my gateway with the rj45 module as I fortunately have CAT6 cabling at the boiler. Boiler is in the loft and didn't trust the signal to be good enough.

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 3:09 pm
by Bart
Stulin wrote: This was my plan all along, to use the external temperature (local weather data) averaged over a range of weeks, fed into a Home Assistant automation to set the CHW temp dynamically.
There might be another interesting option. I used to use TPI with weather compensation on the Viessmann before switching to OT and I still have the external temperature sensor connected to the boiler. And notice what appears in the OpenTherm communication log:

Code: Select all

21:40:33.560131  T001B0000  Read-Data   Outside temperature: 0.00
21:40:33.784066  BC01BFAE7  Read-Ack    Outside temperature: -5.10
It seems that the boiler actually is capable of providing the outside temperature through opentherm. And evohome reads it out periodically. The funny thing is that the outside temperature shown on the evohome connected thermostat seems to be fetched from internet. It does not correspond to what I saw transmitted over opentherm, the opentherm value actually was closer to reality.

So my gateway now has:
- the possibility to control the CHW max temperature
- real time information about the locally measured outside temperature
And as we've seen from the logs, the evohome connected thermostat can handle run-time changes in CHW max temperature.

Re: Evohome + Opentherm + Viessmann Vitodens 100

Posted: Thu Jan 10, 2019 3:21 pm
by Bart
Stulin wrote: Ah, got it. I thought the problem was evohome not sending the CHW setting to the boiler, not the other way round. Makes sense now.
As I understand, a thermostat may but is not obliged to control the CHW setting. Honeywell does not do it, I don't know if other brands do. The evohome reads this setting from the boiler but does not set it.
And Viessmann disables the boiler CHW control when opentherm is used. This is an issue at least in combination with evohome since evohome never sets it - it only reads. In the log you can see that the boiler always responds with '80' to the thermostats' read data for the max CHW. And on my boiler I did rotate that button, but it has no effect on the boiler reply. It's always 80, no matter what position I tried. Adding the gateway offers a solution.