Water heater control with WPC3700 and a P1 meter using Home Assistant

Hey everyone,

I'm sharing my setup for using the WPC3700 as a hot water boiler battery, integrated with my existing smart home components using Home Assistant. I acquired the WPC3700 via Amazon, and the initial setup, including Wi-Fi connectivity, was straightforward.

My objective was to use surplus solar energy for hot water heating. As I don't have an Iammeter smart meter, I opted to integrate the WPC3700 with my HomeWizard P1 meter. The P1 meter provides total energy export and import data. The intended logic was to set the WPC3700's power target based on negative values from the P1 meter, indicating energy export. For example, a P1 meter reading of -500W (500W export) would correspond to a 500W target for the WPC3700.

A challenge arose with this direct integration. When the WPC3700 began consuming power (e.g., 500W), the P1 meter's net export reading would decrease, potentially to 0W, as the exported power was now being consumed internally. This would cause the WPC3700's target to drop to 0W, creating an unstable control loop.

To resolve this, it was necessary to independently measure the boiler's power consumption. For this purpose, I implemented an Ikea INSPELNING smart plug on the boiler's power supply. This plug provides real-time data on the boiler's active power draw.

With both the P1 meter's total export/import data and the boiler's individual power consumption available, a correction was required. A "helper" entity was created to calculate the true net export. This helper subtracts the boiler's current power consumption (from the Ikea smart plug) from the P1 meter's export/import reading. This corrected value provides a stable and accurate input for the WPC3700, ensuring it only consumes power when there's genuine surplus energy available for export.



Addressing Data Synchronization Issues


During implementation, I identified a potential issue related to the update frequency of the P1 meter and the Ikea INSPELNING smart plug. If the P1 meter updated its value (reflecting the boiler's power consumption) before the INSPELNING plug had updated its reading, the calculated "true net export" helper could become temporarily inaccurate. This asynchronous updating could lead to unreliable control of the WPC3700.

I addressed this in two ways:

  1. P1 Meter as Master Update Trigger: Since the P1 meter is the primary source for overall grid interaction, I configured the "true net export" helper to only update its value when the P1 meter updates. In Home Assistant, for example, a template sensor deriving its value from two entities (like P1_meter_export - Boiler_consumption) will typically update whenever either of the source entities updates. By specifically tying the helper's update trigger to the P1 meter, I ensure the calculation is always based on the most recent P1 data. Prior to implementing this, the graph of the "true net export" was very erratic due to unsynchronized entity updates. Since this change, the corrected power graph is perfectly stable.

  2. Forced INSPELNING Updates during Operation: Additionally, through an automation, I've implemented a mechanism to force the Ikea INSPELNING smart plug to update its value every 1 second when the conditions are met for the WPC3700 to be actively regulating power. This ensures that when the boiler is expected to be consuming power, its consumption data is as fresh as possible, minimizing the window for desynchronization and maintaining the accuracy of the corrected export value.



Refining WPC3700 Setpoint Accuracy


While the initial setup with the corrected export and synchronization measures worked well, a second challenge emerged: the WPC3700's actual power consumption often didn't precisely match the setpoint it received, especially at higher wattages (from 1200W and above). This discrepancy could lead to the boiler drawing slightly more or less power than intended, affecting the precise utilization of surplus energy.

To tackle this, I implemented an offset helper. This helper is also configured to update only when the P1 meter updates, ensuring all relevant calculations remain synchronized. The offset is calculated by taking the boiler's actual power consumption (from the INSPELNING plug) and subtracting the WPC3700's last sent setpoint. This difference represents the current deviation between the commanded power and the actual power drawn.

This calculated offset is then applied to the next WPC3700 setpoint. By continuously adjusting the setpoint based on the observed difference, the system achieves a nearly perfect match between the WPC3700's target and the boiler's actual power consumption. This dynamic adjustment significantly improves the accuracy of energy diversion, ensuring optimal use of available surplus power.


I hope this detailed breakdown of my WPC3700 integration, including the solutions for data synchronization and setpoint accuracy, is helpful for others in the community. My goal was to create a robust system that efficiently uses my surplus solar energy to heat my hot water, and I'm very pleased with the results so far.

Feel free to ask any questions or share your own experiences and improvements. I'm keen to hear your thoughts and continue refining this setup!

Thread Status
4
33
2
0
0

Sort replies by:

Hi,

Thank you so much for your valuable feedback and detailed description!

I guess you are using these APIs https://www.iammeter.com/newsshow/api-wpc3700 and control the WPC3700 in home assistant ,yes?

In fact, when running in auto mode (which currently supports only IAMMETER's meters), the control logic of the WPC3700 is based on grid power, not the load power.

There are two key parameters that need to be set: threshold and hysteresis.

Here is a basic explanation of how WPC3700 works:

For example, if you set:

  • Threshold = 10W (drawing 10W from the grid)

  • Hysteresis = 30W

Then:

  • When the grid power reaches 10W + 30W = 40W, the WPC3700 will reduce its output power by 30W (i.e., grid power – threshold).

  • When the grid power drops to 10W – 30W = –20W (exporting 20W to the grid), the WPC3700 will increase its output by 30W, again adjusting by the absolute value of (grid power – threshold).

Under this logic, the WPC3700 aims to maintain the grid power between –20W and 40W.

We’re currently gathering user feedback and real-world usage results of the WPC3700. If you’re interested, we’d be happy to offer you a WEM3080 (single-phase meter) free of charge. You can install it on the grid side and share how the feed-in energy changes after enabling the WPC3700. These results can be easily viewed through the IAMMETER-Cloud monitoring interface.

Hi,

I am sending commands to the WPC through MQTT and I'm using it in manual mode. A better explanation of how I implemented the WPC3700 is in this HA community forum post:

I appreciate your offer of the WEM3080. However, I have a 3-phase electrical system at home, so I don't think a single-phase meter would be suitable for my setup. Additionally, I'm not comfortable making any modifications to my electrical system myself, as I don't have enough experience with that kind of work.

Hi,Thank you so much for your valuable feedback and detailed description!I guess you are using these APIs https://www.iammeter.com/newsshow/api-wpc3700 and control the WPC3700 in home assistant ,yes?In fact, when running in auto mode (which currently supports only IAMMETER's meters), the control logic of the WPC3700 is based on grid power, not the load power.There are two key parameters that need to be set: threshold and hysteresis.Here is a basic explanation of how WPC3700 works:For e

The link didn't paste in my previous reply so here it is: Making a dumb boiler smart: Home assistant community

Hi,I am sending commands to the WPC through MQTT and I'm using it in manual mode. A better explanation of how I implemented the WPC3700 is in this HA community forum post: https://community.home-assistant.io/t/turning-a-dumb-water-heater-into-a-smart-hot-water-battery-using-excess-solar-power-with-off-the-shelf-components/909586I appreciate your offer of the WEM3080. However, I have a 3-phase electrical system at home, so I don't think a single-phase meter would be suitable for my setup. Additi

Thanks, Glenn — we really appreciate your sharing!

We’d also like to offer you a WEM3050T, which is currently our most popular model among residential users:

👉 https://www.iammeter.com/blog/wem3050t-home-energy-management-meter

Please feel free to email us at [email protected].
Our colleague will follow up with you there and arrange the shipment of the WEM3050T.


Looks like you are new here. Register for free, learn and contribute.