diy solar

diy solar

Off-grid Solar / Battery monitoring and control freeware

Just to make sure you have the right code base, run:

Code:
cd /tmp
git clone https://github.com/venkor/SolarShed.git venkor

Then cd into venkor and run the script from there.
 
It looks like it is looking for that driver to call for the data.
1685904648380.png
I don't understand how to install that driver. Git clone was new to me, the advance rm to get rid of the files was new as well. Make appears to work, I seem to me missing that driver so that it can talk.

I did do pip install from the SolarShed directory on each of those lines. That did not help.
 
You're on the wrong branch, sorry I did not mention that. In /tmp/venkor execute:

Code:
git checkout remotes/origin/1-update-gettracerdatapy-from-python2-to-python3

You should also see that requirements.txt file there.

Edit: also, next step would be to check if your usb connection shows up. Commands to use: 'dmesg' and 'lsusb'.
 
You're on the wrong branch, sorry I did not mention that. In /tmp/venkor execute:

Code:
git checkout remotes/origin/1-update-gettracerdatapy-from-python2-to-python3

You should also see that requirements.txt file there.

Edit: also, next step would be to check if your usb connection shows up. Commands to use: 'dmesg' and 'lsusb'.
Alright. I moved back to the original SolarShed directory as I had shut the system down and it got removed from /tmp. I did the Git command and it appears I have thee .txt file. I executed the script for it and also did the lsusb command.
1685911518091.png

Note, I did have the com ports extended to the virtual box on startup thinking that they would need to be there for actual communication. Do I need to post a dmesg file as well? That one was long.
 
Seems the Exar serial ports are detected, so you should be good to go. The 'dmesg' message should confirm that. You should be able to run the script from the venkor repository and remotes/origin/1-update-gettracerdatapy-from-python2-to-python3 branch. This is important because the original SolarShed git repo does not have the python3 modifications. That's what the error message is you're getting, the 'invalid syntax' thing. That's python 2 code which is incompatible with python 3, but python 2 is deprecated and can't be installed easily (and you shouldn't).

I moved back to the original SolarShed directory

So don't do this. Just get the venkor version (https://github.com/venkor/SolarShed.git) and checkout the remotes/origin/1-update-gettracerdatapy-from-python2-to-python3 branch. Run these in succession:

Code:
git clone https://github.com/venkor/SolarShed.git venkor
cd venkor
git checkout remotes/origin/1-update-gettracerdatapy-from-python2-to-python3
 
Seems the Exar serial ports are detected, so you should be good to go. The 'dmesg' message should confirm that. You should be able to run the script from the venkor repository and remotes/origin/1-update-gettracerdatapy-from-python2-to-python3 branch. This is important because the original SolarShed git repo does not have the python3 modifications. That's what the error message is you're getting, the 'invalid syntax' thing. That's python 2 code which is incompatible with python 3, but python 2 is deprecated and can't be installed easily (and you shouldn't).



So don't do this. Just get the venkor version (https://github.com/venkor/SolarShed.git) and checkout the remotes/origin/1-update-gettracerdatapy-from-python2-to-python3 branch. Run these in succession:

Code:
git clone https://github.com/venkor/SolarShed.git venkor
cd venkor
git checkout remotes/origin/1-update-gettracerdatapy-from-python2-to-python3
Okay. I wanted to make clear, BarkingSpider version of SolarShed was deleted from the system. I had to clear it off to get venkors python3 version of SolarShed. So the original version is not on my system. The Python 3 version is. I performed the git checkout and now I am getting an error about the driver.

1685929403038.png

I haven't loaded a driver file in Linux and I know there is a repository for it. Unfortunately there isn't a script I can run.
 
Ok, next step is: you disconnect the USB device, then reconnect it. After that, look at the last lines of the 'dmesg' command. There should be something along the lines of "new device... /dev/tty..." or something. The /dev/ttyxxxx is the one you need to put into the script on line 59 which looks like:

Code:
client = ModbusClient(  method = 'rtu',
                        port = '/dev/ttyXRUSB0',
                        baudrate = 115200,
                        stopbits = serial.STOPBITS_ONE,
                        parity=serial.PARITY_NONE,
                        bytesize = 8,
                        timeout=2)

If 'dmesg' doesn't have a /dev/tty... line we need to install the driver. I'll get back to you on that later today; I can precompile that one for you since you're using my doc anyway, so we should have the same system. Just in case, let me know what the command 'uname -a' prints out.
 
To build the driver:

Code:
apt install linux-headers-5.10.0-23-amd64
git clone https://github.com/kasbert/epsolar-tracer.git
cd epsolar-tracer/xr_usb_serial_common-1a/
make

You can then use 'insmod xr_usb_serial_common.ko' (or with sudo if you're not root) to load the driver. I've also attached the precompiled driver to this post.
 

Attachments

  • xr_usb_serial_common.ko.zip
    177.8 KB · Views: 2
Ok, next step is: you disconnect the USB device, then reconnect it. After that, look at the last lines of the 'dmesg' command. There should be something along the lines of "new device... /dev/tty..." or something. The /dev/ttyxxxx is the one you need to put into the script on line 59 which looks like:

Code:
client = ModbusClient(  method = 'rtu',
                        port = '/dev/ttyXRUSB0',
                        baudrate = 115200,
                        stopbits = serial.STOPBITS_ONE,
                        parity=serial.PARITY_NONE,
                        bytesize = 8,
                        timeout=2)

If 'dmesg' doesn't have a /dev/tty... line we need to install the driver. I'll get back to you on that later today; I can precompile that one for you since you're using my doc anyway, so we should have the same system. Just in case, let me know what the command 'uname -a' prints out.
Here is the dmesg for the two SCC cables.
1685980465785.png

and uname -a
1685980507158.png


Further note, I did the driver file make as well and it still shows it is using the ACM driver. I saw a suppress command one a web page, I will have to search for it. otherwise:
1685981221407.png
 
Last edited:
I did as requested and it was still loading the previous driver. It seems as though it was forced as the new driver wasn't fully installed. I believe I completed the install now, but it is giving the "not a modem" error. 1686034670658.png

I think there was a command I needed to issue to make it fine. I can't find it and am currently tired and barely see. Leme know what you think. Thanks again for all your help. I only hope this open dialog helps other setup their systems as well.
 
That seems fine. Those are just kernel messages; it is normal for that driver to report the 'this device cannot do calls on its own. It is not a modem.' stuff.
Check the entries in /dev - there should be a ttyXRUSB0 entry and your script should be able to use it.
 
New diy solar guy here (100w panel charging 2 SLA batteries 55ah each) I recently purchased 2 more panels and a renogy 30a wanderer. I already have several rpis, was going to try my zero w for this. Are there any pinned links to follow start to finish? 26 pages spanning several years looks daunting...
 
@BarkingSpider Very interesting work, congratulations! Unfortunately I don't own a solar system at the moment but I fantasize diying an off grid one some day (hopefully soon). Without having done a research on existing projects yet I was thinking of developing a monitoring system that would provide all these fancy stuff proprietary software offer and more. I just stumbled upon your project... I have an electrical engineering and data analytics background and have worked on projects implementing real time analysis on time series of electrical data. Although I don't have the ability to test stuff I believe I can help with developing and implementing algorithms and analysis pipelines for your system. Let me know if you need any help, I'd be more than happy to contribute!

Feel free to message me, we could arrange a meeting to discuss potential future work!

Thanks
 
New diy solar guy here (100w panel charging 2 SLA batteries 55ah each) I recently purchased 2 more panels and a renogy 30a wanderer. I already have several rpis, was going to try my zero w for this. Are there any pinned links to follow start to finish? 26 pages spanning several years looks daunting...
get the venkor version (https://github.com/venkor/SolarShed.git) and checkout the remotes/origin/1-update-gettracerdatapy-from-python2-to-python3 branch. Run these in succession:

Code:
git clone https://github.com/venkor/SolarShed.git venkor
cd venkor
git checkout remotes/origin/1-update-gettracerdatapy
 
If you're interested, you can get tons of info from the EcoFlow battery packs. Im using them to power my offgrid house, they are low cost, have 20w idle consumption, tons of output power, be connected to any big battery for expansion (Im using 32 280ah EVE cells at 52v = 28kwh) and can be managed thru a phone app. Im using the EcoFlow Delta 2 from ebay, under $600.

1702931277055.png
 
If you're interested, you can get tons of info from the EcoFlow battery packs. Im using them to power my offgrid house, they are low cost, have 20w idle consumption, tons of output power, be connected to any big battery for expansion (Im using 32 280ah EVE cells at 52v = 28kwh) and can be managed thru a phone app. Im using the EcoFlow Delta 2 from ebay, under $600.

View attachment 183762
How do you connect the Delta 2 to the Pi for the stats?
 
Back
Top