I have a chinese (aliexpress) grid tied inverter hooked to my diy home battery, these inverters have to be connected in the most awkward way ever (in my opinion). They have to feed in to a connection on the main line before the ct clamp it uses to meter the energy being imported. Fitting that into your panel as a hobbyist is a bit too tricky for my liking (i would be messing with the electrics between the grid and the in house safeties, the part of the installation that will not trigger a fuse if your hair starts smoking).
The inverter uses a canbus or modbus signal coming from the energy meter with the ct clamp around the main power connection to figure out how much power to inject into your system to bring it to 0 consumption.
I’ve read of people that are so software savvy that they use this modbus or canbus connection to take control of the inverter directly from home assistant, i am not one of those programming wizzards that creates this cross platform com protocol magic.
i am very determined to finish this home battery on a budget project and have it work as smooth as i dreamed of.
So i figured this out: the ct clamp measures a magnetic field running through it, the stronger the field, the higher the voltage the sensor creates, this is translated into a value and sent to the inverter via modbus/canbus.
So I took a dimmer that can be controlled through home assistant and connected the live to a lightbulb, than looped the neutral wire of that lightbulb through the ct clamp as many times as i could fit it in before connecting it to the main neutral.
Because the wire is coiled through the clamp it amplifies the magnetic field by every loop. so if a 50 watt bulb is set to 100 percent with the wire looped through the clamp 10x, the ct clamp will tell the inverter there is a 500watt draw. (more loops is of course better for efficiency). The inverter will then deliver about 500 watts to the home grid.
Tuya local works very well with cheap tuya based dimmers.
I use below logic for adjusting the current through the coil (via the dimmer to the bulb), this is the fine tuning logic getting the inverter to work towards 0.
alias: "stapjes van 1% maken "
if:
- condition: numeric_state
entity_id: sensor.p1_meter_vermogen
below: -3
- condition: device
type: is_on
device_id: 8cdeaf172110858f5ee5522d28fae9d0
entity_id: 09d94b846b2fe5d5b06d6f4f22ad7d92
domain: switch
then:
- alias: aftoeren in stapjes van 1%
action: light.turn_on
metadata: {}
data:
brightness_step_pct: -1
target:
entity_id: light.dimmer_omvormer
else:
- alias: optoeren
if:
- condition: numeric_state
entity_id: sensor.p1_meter_vermogen
above: 3
- condition: numeric_state
entity_id: sensor.zonne_boiler_hws_vermogen
below: 10
- condition: device
type: is_on
device_id: 8cdeaf172110858f5ee5522d28fae9d0
entity_id: 09d94b846b2fe5d5b06d6f4f22ad7d92
domain: switch
then:
- alias: optoeren in stapjes van 1%
action: light.turn_on
metadata: {}
data:
brightness_step_pct: 1
target:
entity_id:
- light.dimmer_omvormer
For big deviations or quick responses I use bigger adjustments in brightness step (50% for big swings, 20 for medium deviations and 5% when close to 0, the 1% steps are used when the inverter is very very close to 0 on the mains power meter)
This logic is structured in an if then else logic ladder that goes from large deviation to no deviation. So essentially it works its way down to finer and finer adjustments. this automation is triggered every 10 seconds.
The output of the battery is very finely tuned to power consumption of the house during the night in this way.
The second advantage I find is that while the chargers on this battery are triggered by solar, are not adjustable in power and have a hysterisis of 10 to 30 minutes, the battery as a whole can still dynamically adjust to the available solar overproduction by exporting part of the power draw back if needed.
Example:
When a 600 watt charger is triggered in my system it stays on for a minimum of 20 minutes (as not to break it from constant on/off switching), if a cloud than drifts over, the grid tied inverter feeds the power required to maintain zero electricity import back to the grid. (preventing partial import)
I hope this helps someone who is like me not a cross platform cross comm protocol homeassistant magician but still wants to get his inverter under home assistant control.