Almost every Bosch/Buderus/Nefit heat pump with an EMS bus has 4 external inputs. These can be used to block the operation of the pump etc, but also for Smart Grid (SG) and Photo Voltaic (PV) features. You can virtually switch these inputs with all EMS Gateways to have the heat pump operate in a specific way.
Currently it’s a bit of a read and some trial and error but once set it will work automatically.
https://emsesp.org/tips-and-tricks/#automating-the-onoff-of-the-heat-pump-in-home-assistant
Every Bosch heat pump has 4 of these inputs, it depends on the country and your specific system but usually input 3 and/or 4 can be used for SG and PV.
You need to check the system menu or the installation manual of the heat pump to check which features are supported on which input. In the installation manual you can see which action the heat pump can do when one of these inputs is enabled. If you cannot find the information in the installation manual, you need to look up the manual for the controller/display of your unit (Likely the UI800 or HPC410).
The section you need to look up is called “Menu: External connections” and will look something like below.
If you ook into the following example of the installation manual of the Compress 6800i, then PV and SG are both on the input 4.
This menu will list all configurations that are possible to set for each input.
The Smart Grid and PV System menu are the most interesting.
In the web interface of the Gateway you can see the input state of each input, and also the configuration of each input. In the example below the options for input 4.
If you change the configuration the the menu to the SG and/or PV feature you want to activate, you can see the corresponding input values.
You can send these same values from Home Assistant to the Gateway to enable these features.
However, the heat pump expects the actual input to be enabled. But there is nothing physically attached to the inputs. But there is a workaround. The first bit of the configuration will tell the heat pump if the signal is active high, or active low.
So it should enable the function if the physical state of the input is ‘Normally Open’ and thus enabled when closed, or ‘Normally Closed’, and thus enabled when open. What we need is the second one. As the manual describes: “Open contact is interpreted as ‘ON’“.
If we invert the logic here, and attach and detach the configuration to the input every time we need it, you can turn on or off the PV and SG feature of your heat pump with your EMS Gateway.
You can use the same logic to activate the ‘EVU Sperre’ feature etc.