Solarman Integration by Stephan Joubert

Hi Chris, what does passive mode means in this context?

Itā€™s the setting that you must change in the SoFar inverter menu system to allow RS485 controlling of the inverter. See energy storage mode below.

1 Like

Hi Chris,
is there a reason you choose/prefered the cmcgerty/Sofar2mqqt approach over GitHub - wills106/homeassistant-solax-modbus: SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar & Qcells Q.Volt Hyb) ? or are they having very different goals?

if I understand it correctly you can change the settings like charge / discharge of battery from HA. So this way for example you can build logic in HA to trigger when battery should charge?

Hi Joost,

As you know with home assistant, there are always many ways of doing the same thing. I just went the way I did, invested money and time in building the module add setting everything up. It all works for me and I can control charging and discharging of the SoFar and Pylontech batteries in HAā€¦so Iā€™m happy.

Did you find a way to see what the inverter returns locally? I am also trying to catch the Sofar variables locally.

Thanks

I donā€™t know if anyone can give me a clue here, I am trying to build an estimate for how much power I have avialable based on the load on the system

So something like:
So Inverter Load - (Solar Production + Battery Storage)

The one thing I am struggling to figure out is which metric is the current battery capacity in watts, I see percentage but no watts. Am I missing something.

If anyone has solved for this, please share.

I donā€™t use Solarman (I opted for Solar Assistant, but in the end the fundamentals are the same), but you are confusing some terminology. Capacity relates to energy (kWh or then kJ). Power is a rate (kW or then kJ/s). Capacity would be like the distance you can cover. Power would then be your speed in this analogy.

If you donā€™t have energy sensors, you need to integrate the power sensorā€™s and then sum them, or calculate the net power and integrate that.

Use method left: Integration - Riemann sum integral - Home Assistant.

Otherwise, if what youā€™re trying to calculate is whether you can switch on the kettle or washing machine now, given your solar potential and battery (all of this in W or kW), then itā€™s probably more complicated if you want to include the battery. Itā€™s fairly easy just to calculate the difference between your solar forecast and current solar PV power (this is what I do), but your battery will have a max rating (W) and total capacity (kWh), so technically you can hit it as hard as your battery can deliver in combination with your inverterā€™s rating. Thus, it becomes a question of need over ability.

The reason I only look at the PV, is because thatā€™s the free energy. The battery really is just a big buffer on will either be topped up by solar for free or the grid. Since the grid costs money, I leave it out of the calculation. Itā€™s also much simpler.

You can have a look at all my sensors and stuff. I just recently completed it, but it covers some of the things above.

I can add a screenshot of my dashboard later when Iā€™m at my computer.

Thank Pieter, makes sense and exactly what I needed. Solarman is kak, I donā€™t know what shenegans they are pulling with the ESP chip in the damn thing, but itā€™s wifi connectivity is so bad, irrespective of what you do. I have tons of other ESP devices that have no issues. I should probably migrate to Solar Assistant or a Solarman unit with RJ45

I came up with a couple of sensors. I am a complete amateur, but thought I would share in case someone finds use.

Convert battery % to Watts, I just got this from the capacity I have - 20% which is the cut-off

  - platform: template
    sensors:
      solarman_battestwatts:
        friendly_name: "Available Battery SOC Watts Est"
        value_template: "{{ <YOUR AVAILABLE CAPACITY> | float * states('sensor.solarman_battery_soc') | float(0) / 100 }}"
        unit_of_measurement: 'W'

Estimated Battery Hours Left

  - platform: template
    sensors:
      solarman_battesthoursleft:
        friendly_name: "Battery Est Hours Left"
        value_template: "{{ (states('sensor.solarman_battestwatts') | float / states('sensor.solarman_total_load_power') | float)|round(2) }}"
        unit_of_measurement: 'Hrs'

Estimated battery flat time

  - platform: template
    sensors:
      solarman_battestflattime:
        friendly_name: "Battery Est Flat Time"
        value_template: "{{ (as_timestamp(now()) + 60 * 60 * states ('sensor.solarman_battesthoursleft') | float) | timestamp_custom('%I:%M %p') }}"

My use case for these is pretty particular. We have unreliable power and can lose grid for days, so I need to manage consumption during the evening to ensure we make it through to morning. I have been using these sensors in combination with Forecast.Solar and an enervue system to do this.

2 Likes

Having struggled with this ever since I had my Sofar inverters installed, I think I have finally cracked it so will post my findings in case they help someone else.

I have 2 inverters - one HYD6000-EP hybrid with batteries that connects to the grid, and a second small. one (I forget the model) to bring in power from another bank of panels.

I was originally using the Solarman API interface with sofar2mqtt, but it recently stopped working and I wanted to try to run everything locally without using the API.

Using the Solarman integration, I couldnā€™t work out how to get data to appear, until I realised that the modbus protocols for the HYD-6000-EP are different from the 6000-ES. Using the sofar_g3hyd.yaml definitions seems to work, rather than the 3-6k-es ones.

In the energy dashboard, I followed the instructions on the integration github page:

  • Total energy bought
  • Total energy sold
  • PV generation total (I added both inverters here to total them)
  • Total battery discharge
  • Total battery charge

Will see how it goes over the next few days - but at least I can see my battery charge again!

Hello all
So Iā€™ve been using this integration happily for some time.
I have Deye Hybrid 8KW inverter and have deye_hybrid.yaml selected in the config

One piece of info that has been bothering me though is there are 2 sensors that do not show the proper valuesā€¦

SmartLoad Status and Time of use.
These just show ā€œLOOKUPā€ and not the actual value.

If I change the yaml files and remove the lookup table on these 2 sensors i can see values of 16 and 255 respectively

now this by no means correlates with the original 0/1 (off/on) values in the lookup table.

Is there a way I can get all the possible lookups for these values?

btwā€¦ If I turn on smart load the 16 actually changes to 17 :face_with_raised_eyebrow:

try this for hybrid 3000

so you create the custom_parameters.yaml on inverter_definitions folder. then configure the new device with ip, serial number and select custom_parameters.yaml file.

work fine with serial number 27xxx

1 Like

I recently acquired a Deye Inverter and am exploring possibilities to integrate it with Home Assistant.

In my pursuit of the same, I got a Solarman Stick with it. I am hopeful that the collective wisdom of this community could shed some light on a few inquiries I have.

Firstly, I am perfectly comfortable investing a bit more if it guarantees superior control over my inverter. Is it feasible to remotely control the inverter using the Solarman Stick?

Secondly, Iā€™m interested in understanding the latency involved in updates via the Solarman Stick. Could anyone provide an estimate of the delay that I might expect?

Lastly, would it be more beneficial to consider a custom solution instead of using Solarman? Iā€™m open to any suggestions that would enhance the functionality of my setup.

Thank you in advance for your time and any assistance you can provide. I greatly appreciate it!

Is there a problem regarding the actual release of Solarman?
I updated today via HACS, after the update the connection to my Deye 600w micro inverter is gone.
It always shows ā€œDisconnectedā€. Screenshot attached.


After a rollback to 1.4.3 (previous version) everything works again.

The same here.
It stop working.

Update to the actual version. Was fixed on monday.

Hi,

Iā€™m using the integration of @StephanJoubert . After endless testing, Iā€™ve sent the CURL with the API request to solarman. It seems that the URL used to access my api, should change to globalapi.solarman.com. After that, I can get results from my curl request with success. The question now is how to adapt the Integration so it by default uses the globalapi instead of the standard api call ?

Iā€™m using the SOFAR 3000 inverter and would like to see the results pop up from the entities in my integration

Thanks in advance !

Kr,

Bart

Has anyone managed to get control of the inverter (particularly with batteries) working over the air, rather the RS485? Iā€™m reasonably sure it should be possible because I can update the setting of my ME3000SP (e.g. to switch between auto and TOU mode) via the (well hidden) Remote Control facility in the Solarman app. Has anyone investigated doing this directly from HA, rather than the usual sofar2mqtt approach?

1 Like

I have a Sofar HYD3600-ES Inverter with LSW-3.
I have had no success trying the ā€˜recommendedā€™ setup and talking through the logger.
I have fitted a isolated USB-485 adapter connected into the 485 port of the inverter and succeeded in talking directly to the inverter. (So the hardware works)
Is it possible to configure Solarman to talk to the inverter via the 485 adapter ?
I am running HA on a Raspberry Pi so I assume the adapter is on ā€˜/dev/ttyUSB0ā€™
Adapter will need to be set to 9600 baud, 8bits, 1 stop bit, no parity.

The language of the forum is English.