-
Notifications
You must be signed in to change notification settings - Fork 1
4. Configuration and Operation
Set the MQTT topics according to the ESPHome code, which you intend to flash to the ESP8266.
MAX_PERCENTAGE: you can set the maximum power percentage you want to allow to the water heater.
MQTT_TOPIC_DIMMER_STATUS: in DEBUG mode, the Energy Router sends internal values as payload for this MQTT topic.
The given values should be a good starting point. These are the coefficients for the proportional-integral closed regulation loop. If you want to modify these parameters, do so carefully and in small steps. Pay attention to the stability of the regulation, i.e. absence of oscillations when important quick changes of grid power measurements occur.
regul_o_l_gain_raw: these 9 numbers represent the raw open loop gain for dimmer percentages of 10% to 90% in 10% steps. These points have been measured with the ac_dimmer parameters in the given ESPHome code, and are used to obtain a linear open loop gain.
If you change the ac_dimmer parameters in the ESPHome code, you will have to measure these values yourself:
- Connect the water heater via a power meter.
- Set the
modeMQTT topic for the Energy Router to -10, -20 ... -90 (yes, negative values!) - For each value, get the power meter reading and convert the value to the percentage of full power.
To check if the new values makes sense, check the power meter reading when setting the mode topic to 10, 20, ... 90 (positive values this time!). You should get readings close to 10%, 20%, ... 90% of full power.
The Energy Router is controlled by the payload of the mode topic (defined in the RouterMode parameter), typically a retained topic.
A value of -1 means automatic mode. When the grid power value is negative, the router will try send as much power as possible to the water heater, while keeping power injection to the public grid as small as possible. More precisely: keeping it close the the gridpower_bias value given in the parameters.
A value of 1...100 means manual mode, meaning that the router will send this percentage of power to the water heater, regardless of the measurements of the energy meter. This should be handy when energy production is low over a longer period of time.
A value of 0 will switch power flow through the dimmer device off.
The mode topic is supposed to be set via your home automation user interface, in the form of a retained MQTT topic payload. Please see below for a way to do this inside Home Assistant. However, you can also use a tool such as MQTT-Explorer to publish such a topic.