diy solar

diy solar

Solar assistant: do you use it?

Do you use solar assistant with your solar system

  • Yes

  • I used to, not anymore

  • No but I plan to use it one day

  • No and I don't see a reason to purchase it


Results are only viewable after voting.
Multiple brands, yes.
I have 4 JBD and 4 Seplos, can connect either/or and they work great.
But I cannot get either of them to work directly into HA.
Batmon seems like it should work, I can see the JBD data coming into HA but don't know what to do next....the instructions stop and I am not a coder.
MQTT and YAML make my head spin. Give me a hammer and duct tape.
 
I love and hate home assistant so much.
Now to my problem, because of the inadequacy of solar assistant to support multiple bms's I just want a real simple voltage times current equals Watts in a home assistant gauge. I have both parameters coming in from my inverter but solar assistant will only take battery metrics or inverter metrics to do that calculation.
I made a helper to get the Delta between min and Max cell and I thought I could do the same to multiply two numbers but apparently not.
I just use a Smart Shunt connected to SA for charge/discharge. One of the few blue things I use.

Cell delta I can read on the Batrium but if cells are well balanced you really don't need to look at cell delta very often.
 
I have a Junctek KH160F that outputs simple txt, has some code/integrations on git and I could never get that to work either.
I am as dumb as fuck when it comes to this shit. :mad:
 
I made a helper to get the Delta between min and Max cell and I thought I could do the same to multiply two numbers but apparently not.
That'll require adding a template sensor to the config file using yaml.

There are no general "maths" helpers, at least not at the moment. They do add new helpers from time to time and performing maths functions would be very helpful indeed.

e.g. if I wanted a new sensor which was the result of multiplying two other sensors, I'd add this to the config file:

Code:
template:
  - sensor:
      - name: new_power_sensor_name
        device_class: power
        unit_of_measurement: W
        state: >-
          {{ states('sensor.your_amps_sensor')|float(0) * states('sensor.your_voltage_sensor')|float(0) }}

Where you replace the fictitious sensor names I used above with whatever you are using.

You can also use "+", "-", "/" as well as "*" for the regular maths operators in case you want to add, subtract or divide.

You can also use numbers, e.g. if you want to turn a number from positive to negative:

Code:
template:
  - sensor:
      - name: flipped_sign_power
        device_class: power
        unit_of_measurement: W
        state: >-
          {{ states('sensor.your_power_sensor')|float(0) * -1 }}

Note yaml is very picky about spacing, and also copy and paste of "-" symbols from forums sometimes doesn't result in the right character for the code, sometimes need to type that in.

You'll need a file editor to make changes to the config file. There is the basic File Editor Add-on which is often one of the first Add-ons people install, although I prefer Studio Code Server as it quickly shows when yaml code is not following the correct format.

IMPORTANT:
After making any changes to yaml config files and before restarting Home Assistant, ALWAYS ALWAYS use the Developer Tool (the hammer icon bottom left) and click on Check Configuration. That will tell you if HA can safely restart. Else if you attempt a restart with a bad config file you may be in for a world of pain. If you see an error, then go back to work out why.

If it does not throw up an error, then click on Restart and choose Quick Reload option. The system needs to restart all the yaml code before the sensor is recognised by the system.

Before doing anything major it's always good practice to do a backup first so you can roll back to a previous working state in case it all goes haywire.
 
I just use a Smart Shunt connected to SA for charge/discharge. One of the few blue things I use.

Cell delta I can read on the Batrium but if cells are well balanced you really don't need to look at cell delta very often.
I don't have Batrium, but otherwise I do EXACTLY this^^^^^^^ -ie rely on the smart shunt for day to day, check the individual cells and delta maybe once a week on a sunny day when all the cells are approaching full charge. If anything is amiss, deal with it, otherwise let the sun shine and the loads run!
 
I don't have Batrium, but otherwise I do EXACTLY this^^^^^^^ -ie rely on the smart shunt for day to day, check the individual cells and delta maybe once a week on a sunny day when all the cells are approaching full charge. If anything is amiss, deal with it, otherwise let the sun shine and the loads run!
I'll be doing the same after my next expansion.
I already have enough frustrations with SOC accuracy with 3 BMS in parallel, it will drive me mad with a half dozen.
 
Exactly why I am writing my own software in C#. Main program with plugins. I have a plugins for SRNE inverter, EG4 LifePower4 batteries, SGP/SOK batteries and Victron Shunts. Just need to develop a GUI and glue it al together. All the data collection gets pushed to an Sql server. I will have text and email notifications for alerts/alarms/failures as well as visual and audible alarms. In addition the software will replace the BMS to Inverter closed loop and will be the middle man with better control of battery charging. All will run on a small windows 10/11 computer the size of a couple of decks or playing cards. The problem is complete documentation of all the various communication protocols so I can be certain when I ask a device for info I get it and know how to accurately process the response. A work in progress....
As software architect I will say: why to bother with all of that?

I have Home Assitant, data feeds directly from most of my sensors to time based database (influxDB), alerting in Grafana (including mobile notificatoins) automatons in NodeRed, and HomeAssistant for my family so they can switch stuff on or off....
 
I wrote this into the configuration.yaml and tested, it said OK -
template:
- sensor:
- name: Inverter_power_total
device_class: power
unit_of_measurement: W
state: >-
{{ states('sensor.luxpower_hybrid_battery_current')|float(0) * states('sensor.luxpower_hybrid_battery_voltage')|float(0) }}

However when I try to add a gauge for it, I get this -
Invalid entity
type: gauge
entity: Inverter_power_total
name: Total Power
unit: W
max: 20000
needle: true
 
Previously with my Solar Assistant I had to choose between monitoring my entire hybrid battery (Sealed Lead Acid + LiFePO4) with the Victron Smart shunt or just monitoring the server rack units. I have for a long time just monitored the Victron shunt. However...

https%3A%2F%2Fprod.static9.net.au%2Ffs%2Fcd0a8684-9099-41c5-8b7a-5a03f9e01566


I've now finally tried out adding a second instance of Solar Assistant on a spare Raspberry Pi I had. This one is dedicated to monitoring the server rack batteries. I will be adding another all in one inverter/charge controller to it for managing use of my car's vehicle to load for emergency backup charging but that's another story (I actually need it in a few days due to some grid maintenance shut down).

All is working on the second unit:

Screen Shot 2024-04-12 at 10.51.03 am.png

My batteries are server rack units with PACE BMS. Two from Tycorun and one from Jakiper. I already had the Jakiper comms cable, so that made life easier. It connected with and manages the data from the other batteries just fine.

Then I set about getting that data into Home Assistant. That presented a few hurdles I managed to clear and the data is now there as well. Sample:

Screen Shot 2024-04-13 at 2.47.27 pm.png

And I have started to create a few charts for tracking a few things, e.g. tracking min, max and cell voltage differentials for each battery:

Screen Shot 2024-04-13 at 1.26.52 pm.png

And also tracking the state of charge (SOC) readings from each battery's BMS. This will help me identify when the BMS SOC readings drift and need resetting like they did today.

All it takes is a little voltage pressure at the right time and they reset, like they did today while I performed a supervised rise in charge voltage.

Screen Shot 2024-04-13 at 3.19.47 pm.png

Eventually I will learn how the drift in BMS reported state of charge drift behaves and be able to automate having it reset.

All the other data also comes through to Home Assistant, such as internal temperature sensors and cycle counts and is now captured for posterity:

Screen Shot 2024-04-12 at 12.44.36 pm.png
Screen Shot 2024-04-12 at 12.45.29 pm.png

And since I can now track the whole hybrid battery and the LiFePO4 independently, I will be looking deeper into the behaviour of the batteries as they operate in parallel. That's for a different thread on the operation of hybrid batteries. Things like how is power/current shared, and how/when does the lead acid contribute, charging behaviour, etc.

For instance, right at the instant I took this screen shot:

Screen Shot 2024-04-13 at 4.07.37 pm.png

The hybrid battery was discharging at 2,236 W while the LiFePO4 is discharging at 2,294 W. How can that be, where is the 58 W going?

While most of the power is going to service loads, a little of the LiFePO4 discharge power is going into the lead acid battery - keeping a little float charge going. 58 W at 52.8 V is 1.1 A. That's not a lot of float charge into 400 Ah of lead acid.

Similarly, when the LiFePO4 state of charge gets low, then the situation reverses and the lead acid begins to contribute.

So I'm going to be able to document this and post some results.
 
Previously with my Solar Assistant I had to choose between monitoring my entire hybrid battery (Sealed Lead Acid + LiFePO4) with the Victron Smart shunt or just monitoring the server rack units. I have for a long time just monitored the Victron shunt. However...

https%3A%2F%2Fprod.static9.net.au%2Ffs%2Fcd0a8684-9099-41c5-8b7a-5a03f9e01566


I've now finally tried out adding a second instance of Solar Assistant on a spare Raspberry Pi I had. This one is dedicated to monitoring the server rack batteries. I will be adding another all in one inverter/charge controller to it for managing use of my car's vehicle to load for emergency backup charging but that's another story (I actually need it in a few days due to some grid maintenance shut down).

All is working on the second unit:

View attachment 209083

My batteries are server rack units with PACE BMS. Two from Tycorun and one from Jakiper. I already had the Jakiper comms cable, so that made life easier. It connected with and manages the data from the other batteries just fine.

Then I set about getting that data into Home Assistant. That presented a few hurdles I managed to clear and the data is now there as well. Sample:

View attachment 209084

And I have started to create a few charts for tracking a few things, e.g. tracking min, max and cell voltage differentials for each battery:

View attachment 209085

And also tracking the state of charge (SOC) readings from each battery's BMS. This will help me identify when the BMS SOC readings drift and need resetting like they did today.

All it takes is a little voltage pressure at the right time and they reset, like they did today while I performed a supervised rise in charge voltage.

View attachment 209086

Eventually I will learn how the drift in BMS reported state of charge drift behaves and be able to automate having it reset.

All the other data also comes through to Home Assistant, such as internal temperature sensors and cycle counts and is now captured for posterity:

View attachment 209090
View attachment 209091

And since I can now track the whole hybrid battery and the LiFePO4 independently, I will be looking deeper into the behaviour of the batteries as they operate in parallel. That's for a different thread on the operation of hybrid batteries. Things like how is power/current shared, and how/when does the lead acid contribute, charging behaviour, etc.

For instance, right at the instant I took this screen shot:

View attachment 209092

The hybrid battery was discharging at 2,236 W while the LiFePO4 is discharging at 2,294 W. How can that be, where is the 58 W going?

While most of the power is going to service loads, a little of the LiFePO4 discharge power is going into the lead acid battery - keeping a little float charge going. 58 W at 52.8 V is 1.1 A. That's not a lot of float charge into 400 Ah of lead acid.

Similarly, when the LiFePO4 state of charge gets low, then the situation reverses and the lead acid begins to contribute.

So I'm going to be able to document this and post some results.
Nice. I wish I could see all the metrics per battery.. The Ruixu packs use LIB protocol for my setup and the Solar Assistant driver for that protocol is bare bones.. One value for voltage and current for the entire stack, no temps either.
 
Back
Top