diy solar

diy solar

Solar Assistant - data logger

I dunno how large the DEV team is at SA, but I would think exposing all values that SA collects through MQTT should be something SA would want to put towards the top of their roadmap. Have you thought about bringing this to them for consideration?
Yes - no success. They think it is a sufficient amount of data being provided - me not. Beside of the fact that the are >100 unnecessary data points in the MQTT-tree.

That's the reason why I search a way to do it on my own. ;-)

The problem is, that the program code is compiled as binaries - only the html related files (image, js, css) are open.

The files seem to be here:
Code:
/dev/shm/grafana-sync/3fda4290e21a88047afa23b2b6b93ccfc438973177df8c2c23dfc3dcac09af66/lib/solar_assistant-1.9.15
 
I would also like to change some Grafana Stuff, like Captions and so on, I managed to get to get to the user login:
http://orangepi3-lts/grafana/d/sa-charts/charts?orgId=1&refresh=1m (removed &kiosk=tv)
Then you have on the left side the login ability, but I didn't find any user to log in. admin/admin is not working.
Also searched on the system for credentials, no luck till now... Anyone an Idea where to find it?
 
I looked into this and think I concluded they might be using a secrets file. I seem also to recall that the Grafana version that SA is using is multiple releases behind the current release. I also asked about generating my own reports through Technical Support and was told they won't open it up to write your own reports.

Basically what I've discovered with Solar Assistant is, that if you don't like what it does or you want it to do more, then either live with it or move on cause they only move the product in the direction they want and at their pace. They do not seem to be open to the idea of user customization or any open-source participation. :(
 
Given SA can be used as both a data conduit and for inverter control via MQTT then you can use Node Red / Home Assistant / Influx DB / Grafana etc to work on whatever customisations you like. I rarely look at the SA interface, and I don't use the in-built inverter control functions. I do it all with my own automations. SA is just the conduit.
 
Basically what I've discovered with Solar Assistant is, that if you don't like what it does or you want it to do more, then either live with it or move on cause they only move the product in the direction they want and at their pace. They do not seem to be open to the idea of user customization or any open-source participation. :(

I only just started with SA myself the other day. I discovered that SA won't correctly talk to my Shoto SDA10-48100 batteries. I sent mail into their 'Contact us' address but after getting root access, I note that the box is pretty unhappy. The circuits_uart library seems to be leaking and there are 991 processes... Using 'strace' I found they're all stuck waiting for a mutex of some sort. If this was open-source, I could debug this and maybe even get my batteries recognized and send them a merge request. I hate when companies shoot themselves in the foot like this.

.... snip ....
root 27319 10426 0 17:09 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27331 10426 0 17:09 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27351 10426 0 17:09 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27363 10426 0 17:09 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27383 10426 0 17:10 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27400 10426 0 17:10 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
root 27417 10426 0 17:10 ? 00:00:00 /dev/shm/grafana-sync/1bcf402a0eb4720b03afa8ab48913322411018c79b214c1947a98384675fcfca/lib/circuits_uart-1.4.2/priv/circuits_uart
hpeyerl@solar-assistant:~$ ps -ef | grep circuits_uart | wc -l
991
 
Ok, get it done by myself, opened the sd-card in an other linux system:

First removed the password check in /etc/passwd from
INI:
root:x:0:0:root:/root:/bin/bash
to
INI:
root::0:0:root:/root:/bin/bash

then in /etc/ssh/sshd_config (only the changed lines)
INI:
Port 22
PermitRootLogin yes
#PubkeyAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords yes
UsePAM no
#AllowUsers solar-assistant

after that just boot and login with ssh as root, no password check, then you can change password for root to something else:
Bash:
root@machine# passwd
New password: [desired password]
Retype new password: [desired password]
Now you have a password for root that you know. No change in etc/shadow needed, but you don't even need that, just put back the "x" in /etc/passwd and everything is as before. (y)
This did not work for me, and the instructions at https://diysolarforum.com/threads/solar-assistant-data-logger.21099/page-23#post-893185 for modifying /etc/shadow didn't help either. I keep getting "Permission denied (publickey,password)."

Device board: Raspberry Pi 4 Model B Rev 1.4
Software version: 2024-02-21

Am I doing something wrong?

Thanks!
 
Hello,

unfortunately I have to agree with wpns. Version here: 2024/03
SSH is (theoretically) activated. Local login with the user root and solar-assistant are possible (without password). Unfortunately the error occurs via SSH:
"No supported authentication methods available (server sent: )"

I have changed the SSH port to 222 because port 22 is busy. Unfortunately unsuccessful.
In addition, I installed webmin as root to gain access via the browser. The webmin service is also running, but unfortunately access from outside is not possible.
My final attempt was a file share via Samba. Samba service is running. Sharing active, but again: no access to the Pi.

It seems that some kind of firewall is activated, which only releases port 80.

Anyone else have any ideas?

Translated with DeepL.com (free version)
 
Hello,

unfortunately I have to agree with wpns. Version here: 2024/03
SSH is (theoretically) activated. Local login with the user root and solar-assistant are possible (without password). Unfortunately the error occurs via SSH:
"No supported authentication methods available (server sent: )"
I had to do some monkeying around with pam and /etc/ssh/sshd_config when I did mine. I don't remember exactly what I did to make it work though.

Fortunately, the latest version of Solar Assistant (64bit) has a menu option to enable ssh access:

1) Go to: https://<site>.us.solar-assistant.io/configuration/system

2) Set a local password (bottom):
Screen Shot 2024-03-08 at 8.33.35 AM.png

3) Enable ssh with "Key and password authentication"

Screen Shot 2024-03-08 at 8.33.40 AM.png

4) ssh solar-assistant@<site>.us.solar-assistant.io
Password is the password you setup in step (2).

Screen Shot 2024-03-08 at 8.36.16 AM.png
 

Attachments

  • Screen Shot 2024-03-08 at 8.19.05 AM.png
    Screen Shot 2024-03-08 at 8.19.05 AM.png
    23.9 KB · Views: 8
Last edited:
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
Hello,

I tried to edit the latest
2024-03-06-solar-assistant.rpi64.zip
using the same method. Unfortunately I get a PW request!
Am I doing something wrong or is the solution blocked for 64Bit images?
 
Hello,

I tried to edit the latest
2024-03-06-solar-assistant.rpi64.zip
using the same method. Unfortunately I get a PW request!
Am I doing something wrong or is the solution blocked for 64Bit images?
The post immediately above yours (#468) says you don't have to do that anymore with the latest images.
 
Back
Top