diy solar

diy solar

Solar Assistant - data logger

You can automate various inverter setting (output priority, solar priority, charge priority, charge current, etc..) seen in image attached. They can be set based on up to two conditions listed on other image attached (Time, Battery voltage, SOC, etc…).
Which images? :unsure:
 
Percentage being Used is just a snapshot of load at that moment. Trying to calculate out time remaining is a whole different ball game if the goal is for even a reasonable level of accuracy and not just constantly changing numbers. It’s not easy.
I suspect that SA would just use rudimentary math based on the instantaneous load and SOC. This is going to fluctuate constantly!
I know that one of the big delays with Sol-Arks smart panel is perfecting the software into a basic AI system that over time can determine your load pattern and then use that to drop non prioritized loads so that it can stretch your battery time to get through the time period you set or until the time when it has calculated that the PV will be producing power.
This sounds great on paper but I am a bit skeptical about it shedding loads automatically. In some cases it Sounds great, in others I would probably prefer to make those decisions myself.
 
SA replied to the email I sent in about wanting the time remaining till empty aka runtime and they said its in the wish list already. So hopefully they will have it added eventually.

Being the impatient type I'm adding it to mine now :)
 
SA replied to the email I sent in about wanting the time remaining till empty aka runtime and they said its in the wish list already. So hopefully they will have it added eventually.

Being the impatient type I'm adding it to mine now :)


I wrote my own python code to get estimated runtime and charge time. But I found this recently and it looks like a nice method if you’re interested in validating your method with what looks like a lot of feedback over multiple years of tinkering.

 
Calculating time to end of charge seems to me to be like driving while only looking in the rear view mirror. It might OK if your loads are steady/predictable but otherwise it would not seem to be all that insightful of a measure.
 
Calculating time to end of charge seems to me to be like driving while only looking in the rear view mirror. It might OK if your loads are steady/predictable but otherwise it would not seem to be all that insightful of a measure.
Knowing how long the battery will last at current discharge rate is a god send to me.

Especially since my system is a pretty steady load. Also you can turn everything on at once and get an idea if you have enough charge left to get by or to know if you need to purchase more batteries.
 
I wrote my own python code to get estimated runtime and charge time. But I found this recently and it looks like a nice method if you’re interested in validating your method with what looks like a lot of feedback over multiple years of tinkering.

SA already has the code to show x percent per hour charge or discharge. With that information plus remaining battery power which is has too there isn't much math to do :)
 
Also you can turn everything on at once and get an idea if you have enough charge left to get by or to know if you need to purchase more batteries.
Presumably running out of charge more often than is desired is enough to know if your storage capacity isn't sufficient, especially if your production/charging capacity is not the limiter (IOW the system has no trouble getting back to fully charged), or how the system is charged when SOC gets low (e.g. grid, or a generator or something else you would prefer to avoid to charge batteries).

But yes, the system does already say X%/hour charge or discharge and so that's not a hard one to calculate if the load (or charge) is pretty constant. Of course this also depends on how reliable the SOC indicator is.

This was our battery power yesterday:

Screen Shot 2023-09-29 at 7.14.20 am.png

IOW a time to charge/discharge calculation would be bouncing all over the shop.
 
When running as a ups setup like I'm basically doing I care about how many hours I can run on battery. I don't have loads jumping around on mine and HA cuts off stuff when the powers out anyways. The point is if it can show % used per hour and % charged per hour it can show time left till empty and time left till full EFFORTLESSLY and should of been there to start with since it has the info to do it.

Seems they agree and will be adding it. But I want it now so I'm going to modify mine this weekend to have it.
 
Time remaining is already a standard feature in the Victron Remote Monitoring "VRM" console. Everyone can argue if it has value or not, regardless it's clearly something that another major manufacture has decided is important enough to include by default whether people use it or not.

1695938808516.png
 
My victron smart shunt app shows it, the chins battery shows it, home assistant has it so the odd ball is solar assistant for sure for not having it.
 
Calculating time to end of charge seems to me to be like driving while only looking in the rear view mirror. It might OK if your loads are steady/predictable but otherwise it would not seem to be all that insightful of a measure.
Exactly!
If the AC compressor is running it shows 4 hours remaining, if the compressor cycles off it shows 8 hours. Kind of pointless unless you have some kind of system that is keeping track of each breakers detailed usage pattern over 24/7/365 with outside temperature included so that it can predict an average based on historical data and then use real time data to fine tune it.
 
Last edited:
Exactly!
If the AC compressor is running it shows 4 hours remaining, if the compressor cycles off it shows 8 hours. Kind of pointless unless you have some kind of system that is keeping track of each breakers detailed usage pattern over 24/7/365 with outside temperature included so that you can predict an average based on historical data and then use real time data to fine tune it.
I think 1/2 of us know what we want it for and the other half is under the delusion its supposed to tell you exactly how long the entire run time of the battery will be.

The purpose is the exact same as the current x %/hr its shows just converted into hours and minutes. It's not telling anyone how long it will actually take to use every watt from the battery. Its telling us EXACTLY what it shows at current draw of X amps it will will take X amount of time to drain the battery. This allows people to TURN things ON and OFF to see the EFFECT it has on RUNTIME. Amazingly this can be very useful when working on ones system.

I have no other way of explaining it. I hope maybe this makes sense now.
 
Last edited:
I think 1/2 of us know why we want it for and the other half is under the delusion its supposed to tell you exactly how long the entire run time of the battery will be.

The purpose is the exact same as the current x %/hr its shows just converted into hours and minutes. It's not telling anyone how long it will actually take to use every watt from the battery. Its telling us EXACTLY what it shows at current draw of X amps it will will take X amount of time to drain the battery. This allows people to TURN things ON and OFF to see the EFFECT it has on RUNTIME. Amazingly this can be very useful when working on ones system.

I have no other way of explaining it. I hope maybe this makes sense now.
I get it completely. I just use the percentage draw and the divide it into (SOC-20%) reading. 20% being my shutdown point of battery usage.
Yes it's fine for seeing the effects of something being used or turned off but that has a very limited application for me because typically I am using something I need to use it and the numbers are not going to change the need to use it.

On the other hand one night about two months ago at roughly 9pm the transformer feeding my house went dead. It would have really been nice to have known if my batteries could have taken me through the night with the ACs running. I ended up switching on the generator for 3 hours to guarantee I had spare power.
 
Last edited:
@PanicMan I followed your example to change the solar assistant root password. But, after modifying /etc/passwd and /etc/ssh/sshd_config files as recommended and rebooting with the modified files, I'm still getting password challenges on login via ssh and can't log in. Am I missing something? You did not need to make changes to the /etc/shadow file, right? Running the latest (2023-08-16) SA software.
Ok, for some reason you have to also modify /etc/shadow, even you don't need to enter any password:

Code:
root:$y$j9T$ENxjb9crH9Rf43ZvEU5K//$gUc0L1WSGNRiLA5a1w5vxKONSaa2LrxThvcoyShmVh8:1

so root password will be: 1234
 
Just getting into Solar Assistant myself. They are using another PAM file to check to see if the solarassistant user is logging in via ssh, and if not, shut down the session. Edit /etc/pam.d/sshd and comment out the last line to:
#session required pam_exec.so quiet /etc/security/init.sh

Going to try running the nand-sata-install command to move the OS from the sdcard to the eMMC. now.
 
Success. Running on the eMMC now. Note: Back up your data first as it will start fresh. You will need to reconfigured the USB devices again as well. I had to activate it again but it did not say anything about using a free move to another Pi or anything like that. Just picked up my external proxy config and it was off and running.

Graphs pretty much just pop up 1-2 seconds now. Only 47% free now using the eMMC. SA said it should last me 10 years. We'll see.

Run: nand-sata-install
Choose the option: Boot from eMMC - system on eMMC
Choose ext4 as the file system and it will move the system over.
Make sure you have ssh working the way you want before moving it over to the eMMC.

Note: F3 and F4 Linux console work fine from the HDMI port. Use Ctrl+Alt+F3 or F4 to access the console directly and just log in as root or any other username you created. I set up my ssh keys and I can log in without needing a password.
 
Success. Running on the eMMC now. Note: Back up your data first as it will start fresh. You will need to reconfigured the USB devices again as well. I had to activate it again but it did not say anything about using a free move to another Pi or anything like that. Just picked up my external proxy config and it was off and running.

Graphs pretty much just pop up 1-2 seconds now. Only 47% free now using the eMMC. SA said it should last me 10 years. We'll see.

Run: nand-sata-install
Choose the option: Boot from eMMC - system on eMMC
Choose ext4 as the file system and it will move the system over.
Make sure you have ssh working the way you want before moving it over to the eMMC.

Note: F3 and F4 Linux console work fine from the HDMI port. Use Ctrl+Alt+F3 or F4 to access the console directly and just log in as root or any other username you created. I set up my ssh keys and I can log in without needing a password.
Thats why using a pi with the built in emmc is a must for me. Faster and far more reliable.

You can keep from loosing the data on the switch over by editing paths to the files but its better to just start out on the emmc to start with which is what I did so its first boot up under solar assistant was via emmc. Also it allows for popping in a sd card and booting from it for repairs if its was ever needed.
 
Thats why using a pi with the built in emmc is a must for me. Faster and far more reliable.

You can keep from loosing the data on the switch over by editing paths to the files but its better to just start out on the emmc to start with which is what I did so its first boot up under solar assistant was via emmc. Also it allows for popping in a sd card and booting from it for repairs if its was ever needed.

How did you move SA from the sdcard to the eMMC without root? I had to get root in order to run nand-sata-install first.
 
Back
Top