Sunsynk + Home Assistant

Good morning my battery flow seemingly is unable to distinguish between drawing power and charging. It always indicates drawing power with the little dot moving away yet the usage percentage seems to work correctly.

What am I missing? Thanks
What value does your sensor show when charging and discharging the battery?

Battery Power (W). Requires a negative number for battery charging and a positive number for battery discharging. Set the invert_power: battery attribute to yes if your sensor reports this the other way around
 
V1.8.6 is out. Please note the breaking change. Some of the entities have been renamed.

Thanks! Should ideally have been v2 since it has breaking changes :)

Release notes miss the mapping for 190:

Code:
'battery_out_190': 'battery_power_190',

Created a script if anyone wants to automate the mappings: https://gist.github.com/chickenbeef/1a98905f37da1739a8e49ab5dab8c3fa

Copy your card config to a file called "sunsynk-flow-card-entities.yaml" and it will spit out the remapped entities section in "output.yaml".
 
Sorry another question that to most on here will seem obvious but I can't work it out.

The circled values are they self populating or am I to input the sensors?

I am using solar assistant with HA and I can see the values in the SA app but can't find them as options in HA.

Lastly for us newbies it would be great if some how an image of the layout with associated code line number where assigned to each input so it was not trial and error to find the right input.

Thanks again and sorry for the obvious questions

952a9ffe869e2121a4e7f890ebd0892c.jpg
 
Thanks! Should ideally have been v2 since it has breaking changes :)

Release notes miss the mapping for 190:

Code:
'battery_out_190': 'battery_power_190',

Created a script if anyone wants to automate the mappings: https://gist.github.com/chickenbeef/1a98905f37da1739a8e49ab5dab8c3fa

Copy your card config to a file called "sunsynk-flow-card-entities.yaml" and it will spit out the remapped entities section in "output.yaml".
Thanks I've added the missing battery_power_190: entity to the release notes
 
Sorry another question that to most on here will seem obvious but I can't work it out.

The circled values are they self populating or am I to input the sensors?

I am using solar assistant with HA and I can see the values in the SA app but can't find them as options in HA.

Lastly for us newbies it would be great if some how an image of the layout with associated code line number where assigned to each input so it was not trial and error to find the right input.

Thanks again and sorry for the obvious questions

952a9ffe869e2121a4e7f890ebd0892c.jpg
You need to provide those sensors. In the WIKI there are some example card configuration that includes Solar Assistant.

The modbus registers are mapped to the card in one of the images. Have a look at the README on the GitHub.
 
Sorry another question that to most on here will seem obvious but I can't work it out.

The circled values are they self populating or am I to input the sensors?

I am using solar assistant with HA and I can see the values in the SA app but can't find them as options in HA.

Lastly for us newbies it would be great if some how an image of the layout with associated code line number where assigned to each input so it was not trial and error to find the right input.

Thanks again and sorry for the obvious questions

952a9ffe869e2121a4e7f890ebd0892c.jpg
I think what you are asking for is at the bottom of the git readme
 
@Slip

I thought I did something wrong when I did the card from scratch (still on 1.8.5)

The PV total never shows a value and the Autkey, etc show NAN (when I first did the card late at night sometime last week, it showed 0 if I recall correctly

1689578712418.png


Unsure if that's fixed in 1.8.7 but before I update and start from scratch again

Some of the relevant code here

YAML:
type: custom:sunsynk-power-flow-card
cardstyle: full
panel_mode: 'no'
large_font: 'no'
show_solar: 'yes'
inverter:
  modern: 'yes'
  colour: grey
  autarky: power
solar:
  colour: orange
  show_daily: 'yes'
  mppts: one
  animation_speed: 9
  max_power: 4360
  pv1_name: MPPT1
  pv2_name: NA
  pv3_name: East
  pv4_name: West
 
  inverter_load_grid_169: sensor.grid_power
  pv1_power_186: sensor.pv_power_1
  pv2_power_187: sensor.pv_power_2
  pv3_power_188: sensor.pv_power_3
  pv4_power_189: sensor.pv_power_4
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_state_of_charge
  battery_out_190: sensor.battery_power
  battery_current_191: sensor.battery_current
  essential_power: sensor.load_power_essential
  essential_load1: sensor.cbi_bathroom_geyser_power
  essential_load2: sensor.cbi_kitchen_geyser_power
  nonessential_power: sensor.load_power_non_essential
  non_essential_load1: sensor.load_power_non_essential
  non_essential_load2: sensor.pool_pump_energy_power
  grid_external_power_172: sensor.grid_power
 
@Slip whats the logic for the battery image percentage? is it based off shutdown? My system showed "zero" bars at 30% so not sure if its related because if its to the 20% then yes "10%" left but if 30% vs 0% then should be a bar maybe? Considered a danger mode? Or if you can tell when its in recovery so if the state is ever BELOW shutdown state the battery is outlined in red vs normal colour?
 
Really loving the Card.
  1. essential_load1 and 2 - longer names seem to be cut-off
  2. When essential_load2 becomes Unavailable - Can we show 0W instead of NaN W?

1689593827096.png
 
@Slip

I thought I did something wrong when I did the card from scratch (still on 1.8.5)

The PV total never shows a value and the Autkey, etc show NAN (when I first did the card late at night sometime last week, it showed 0 if I recall correctly

View attachment 1558033


Unsure if that's fixed in 1.8.7 but before I update and start from scratch again

Some of the relevant code here

YAML:
type: custom:sunsynk-power-flow-card
cardstyle: full
panel_mode: 'no'
large_font: 'no'
show_solar: 'yes'
inverter:
  modern: 'yes'
  colour: grey
  autarky: power
solar:
  colour: orange
  show_daily: 'yes'
  mppts: one
  animation_speed: 9
  max_power: 4360
  pv1_name: MPPT1
  pv2_name: NA
  pv3_name: East
  pv4_name: West
 
  inverter_load_grid_169: sensor.grid_power
  pv1_power_186: sensor.pv_power_1
  pv2_power_187: sensor.pv_power_2
  pv3_power_188: sensor.pv_power_3
  pv4_power_189: sensor.pv_power_4
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_state_of_charge
  battery_out_190: sensor.battery_power
  battery_current_191: sensor.battery_current
  essential_power: sensor.load_power_essential
  essential_load1: sensor.cbi_bathroom_geyser_power
  essential_load2: sensor.cbi_kitchen_geyser_power
  nonessential_power: sensor.load_power_non_essential
  non_essential_load1: sensor.load_power_non_essential
  non_essential_load2: sensor.pool_pump_energy_power
  grid_external_power_172: sensor.grid_power
That's strange. I have not noticed that problem but could be an issue with the sensor data you are providing. How do you read the data from the inverter?

Total solar is calculated as follows with each of those objects representing the states of the entities you provide

let totalsolar = (parseInt(stateObj8.state || 0) + parseInt(stateObj9.state || 0) + parseInt(stateObj31.state || 0) + parseInt(stateObj32.state || 0));

What does your developer tools show for those sensor.pv_power_* sensors?

{{ (states('sensor.sunsynk_pv1_power') | int(0) + states('sensor.sunsynk_pv2_power') | int(0)) | round(0) }}

You can test the logic by supplying any sensor that returns an integer value to those attributes and see if it sums correctly i.e.

pv1_power_186: sensor.sunsynk_pv1_power
pv2_power_187: sensor.sunsynk_pv2_power


Can you also share the output of these two sensors in developer tools
sensor.load_power_essential
sensor.load_power_non_essential
 
@Slip whats the logic for the battery image percentage? is it based off shutdown? My system showed "zero" bars at 30% so not sure if its related because if its to the 20% then yes "10%" left but if 30% vs 0% then should be a bar maybe? Considered a danger mode? Or if you can tell when its in recovery so if the state is ever BELOW shutdown state the battery is outlined in red vs normal colour?
Hi. Its based on SOC and not related to shutdown. There are 4 images.

Full (3 blocks) SOC>80%
Med (2 blocks) 50% <= SOC <=80%
Low (1 block) 30% < SOC <=49%
Empty (0 blocks) SOC <= 30%
 
Really loving the Card.
  1. essential_load1 and 2 - longer names seem to be cut-off
  2. When essential_load2 becomes Unavailable - Can we show 0W instead of NaN W?

View attachment 1558155
Thanks. Cant do much with essential load 1 due to space limitations unless we move the name on top of the block I'll fix the alignment for essential load 2 and sort out the Nan.
 
Hi. Its based on SOC and not related to shutdown. There are 4 images.

Full (3 blocks) SOC>80%
Med (2 blocks) 50% <= SOC <=80%
Low (1 block) 30% < SOC <=49%
Empty (0 blocks) SOC <= 30%
Cool thanks for that.

Any chance we can customize as options?
 
That's strange. I have not noticed that problem but could be an issue with the sensor data you are providing. How do you read the data from the inverter?

Total solar is calculated as follows with each of those objects representing the states of the entities you provide

let totalsolar = (parseInt(stateObj8.state || 0) + parseInt(stateObj9.state || 0) + parseInt(stateObj31.state || 0) + parseInt(stateObj32.state || 0));

What does your developer tools show for those sensor.pv_power_* sensors?

{{ (states('sensor.sunsynk_pv1_power') | int(0) + states('sensor.sunsynk_pv2_power') | int(0)) | round(0) }}

You can test the logic by supplying any sensor that returns an integer value to those attributes and see if it sums correctly i.e.

pv1_power_186: sensor.sunsynk_pv1_power
pv2_power_187: sensor.sunsynk_pv2_power


Can you also share the output of these two sensors in developer tools

Values here

1689601238176.png
I only have 1 MPPT - so this is expected to be 0 for MPPT2
Edit: Noticed the last changed date is about 5 days ago when I last restarted HA.

1689601268215.png

{{ (states('sensor.pv_power_1') | int(0) + states('sensor.pv_power_2') | int(0)) | round(0) }}

1689601174021.png

I'll start again tonight with the latest version since there are breaking changes and see what it shows tomorrow.
 
Oi! I hope the 3d printer is on essential :coffee::D
Absolutely! I actually have everything on essential, non-essential has NOTHING connected.

The way I see it, my house is essential and I utilize Automations to manage the power usage.
 
Thanks. Cant do much with essential load 1 due to space limitations unless we move the name on top of the block I'll fix the alignment for essential load 2 and sort out the Nan.
Perhaps another change - How about when load1_name is not configured, it then does not show anything?

It now defaults to Load 1 & Load 2

Somtheing like this:
1689604340568.png

Config:

additional_loads: two
load1_name: ' '
load1_icon: boiler
load2_name: ' '
load2_icon: mdi:printer-3d
 
v1.8.8
BREAKING CHANGE FROM v1.8.6. ENTITY NAMES HAVE CHANGED. SEE Release Notes

Updates
  • Remove default labels (load1, load2) for additional essential and nonessential loads. Label is empty unless specified.
  • Centre align the additional essential load labels on the lite card to allow for longer labels.
  • Add attributes to the battery card config to specify the battery empty and battery full percentages to customise when the battery icon changes.
AttributeRequirementDefaultDescription
full_capacity:Optional80If SOC >= this value the Fully Charged battery image will be shown. Accepts any value between 80-100
empty_capacity:Optional30If SOC <= this value the Empty battery image will be shown. Accepts any value between 1-30

Fixes
  • Return a 0 value when additional essential and nonessential loads are not a number.
 
Top
Sign up to the MyBroadband newsletter
X