I’ve been thinking about building a custom off-grid solar diversion load controller for controlling a hot water pre-heater tank and a tankless supplemental water heater.
The goal is to only power the pre-heater from solar while still ending the day with a full battery. I really want to avoid discharging the battery to pre-heat water. I’m willing to use the battery to heat time-of-use water with the tankless heater, but I’m hoping that the system will be sized so that this is a rare event.
I don’t have a direct way to estimate how much “excess” solar is available. Both the inverters and batteries are going to be AC coupled. I will have to sneak up on the amount of excess by tracking the output of the solar inverters, the consumption of the house and the battery charge/discharge rates. I can then adjust the PWM frequency of the two pre-heater elements to regulate how much power is used heating water.
For this to work I would need lowish latency real time power consumption measurements. Rather then including current transformers in my design, I was planning on getting the data from an iotawatt.
So, I was wondering what is the lowest compute cost way to get continuous real time current consumption data out of the iotawatt, without relying on another piece of equipment to proxy the data. I only care about the most recent live measurements with as little latency as practical over wifi.
Instead of doing a constant stream of http requests, I was thinking it might be useful for the iotawatt to just periodically send the power measurements via UDP multicast. A single 1500 byte UDP packet should be able to contain the all the real time power measurements, even if encoded verbosely as json. One packet, a few times a second would provide enough data for my diversion controller to roughly track the generation/consumption/charge/discharge rates and adjust the duty cycle of the pre-heater so the battery doesn’t discharge.
For the iotawatt, you can’t get any lower cost then UDP and you don’t have to do anything special to transmit multicast data (that is handled by the network and the receiving side). Using UDP, I don’t have to worry about stale data and it would be fairly tolerant to packet loss, because only the most recent measurement matters.
Another option would be SNMP, but just sending simple text messages over multicast is much less work for the iotawatt and my controller.
Would anyone else find this feature useful?