Closed blacksocket closed 1 year ago
Hi. Not sure about Raspbian, but on Armbian I just use gcc from repos.
To build inverter-tools, you first need to install dependencies, something like:
apt-get install cmake make build-essential libhidapi-hidraw0 libhidapi-libusb0 libhidapi-dev libserialport0 libserialport-dev
Then clone the repo and change to its directory. Then:
mkdir build
cd build
cmake ..
make
if you have enough RAM, you can parallel the build using make -j4 where 4 is the number of CPU cores. It will speed up the compilation but you can run out of memory on low end devices
Optionally:
sudo make install
Hi, it works now but when performing make install I am getting now the error "No such file or directory" below.
pi@raspberrypi:/inverter-tools/build $ sudo make install Scanning dependencies of target inverterd [ 2%] Building CXX object CMakeFiles/inverterd.dir/src/inverterd.cc.o In file included from /home/pi/inverter-tools/src/common.h:6, from /home/pi/inverter-tools/src/inverterd.cc:11: /home/pi/inverter-tools/src/formatter/formatter.h:12:10: fatal error: nlohmann/json.hpp: No such file or directory
^~~~~~~~~~~~~~~~~~~
compilation terminated. make[2]: [CMakeFiles/inverterd.dir/build.make:63: CMakeFiles/inverterd.dir/src/inverterd.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:80: CMakeFiles/inverterd.dir/all] Error 2 make: *** [Makefile:130: all] Error 2
Thank you!
Ah, right.
git submodule update --init
Now it has been complied properly ;-) I am trying to launch the program as below and getting "error: invalid device". Not sure if this is the proper use. Do you have maybe the example configuration file ?
./inverterctl --device usb: --usb-vendor-id 0665: --usb-device-id 5161:
usage: ./inverterctl OPTIONS [COMMAND]
Options:
-h: Show short help
--help: Show this help
--raw : Execute arbitrary command and print response (example: ^P005PI)
--device
Device types: usb USB device serial Serial device pseudo Pseudo device (only useful for development/debugging purposes)
USB device options:
--usb-vendor-id
My inverter has been discovered as below:
pi@raspberrypi:~/inverter-tools/build $ lsusb Bus 001 Device 004: ID 0665:5161 Cypress Semiconductor USB to Serial
./inverterctl --device usb: --usb-vendor-id 0665: --usb-device-id 5161:
Here I see some unneeded colons, use --device usb
, not --device usb:
Try for example inverterctl --device usb get-status
.
To view full list of commands: inverterctl --help
.
P.S. Most likely you need root permissions to interact with USB device
Still having some issues. The device (InfiniSolar 10kW Solar Hybrid Inverter) is connected to RPI via USB.
pi@raspberrypi:~/inverter-tools/build $ sudo ./inverterctl --device usb get-status error: response is invalid: validate() failed
pi@raspberrypi:~/inverter-tools/build $ ll /dev/usb total 0 drwxr-xr-x 2 root root 60 Jun 6 23:15 . drwxr-xr-x 16 root root 3580 Jun 6 23:15 .. crw------- 1 root root 180, 96 Jun 6 23:15 hiddev0
Many thanks for your help!
Hm, this device isn't tested, maybe it uses different protocol.
Please share the output of:
sudo ./inverterctl --device usb --verbose get-status
or
sudo ./inverterctl --device usb --verbose get-protocol-id
Below is the output:
pi@raspberrypi:~/inverter-tools/build $ sudo ./inverterctl --device usb --verbose get-status voltronic::Device::send(): writing 10 bytes 0x0000: 5e 50 30 30 35 47 53 58 14 0d ^P005GSX.. voltronic::USBDevice::write(): dataSize=10, writeSize=8 0x0000: 5e 50 30 30 35 47 53 58 14 0d ^P005GSX.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=2, writeSize=2 0x0000: 14 0d .. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 5 bytes 0x0000: 5e 30 1b e3 0d ^0... error: response is invalid: validate() failed
It seems that your inverter uses P17 protocol which is not currently supported. But let's confirm this.
I've just uploaded a new branch called p17-test
, fetch and checkout to it (or manually patch inverterctl.cc
, it's one line https://github.com/gch1p/inverter-tools/commit/bac33ab8991df1dbb6dac851efad8f0ec9fbc870), rebuild inverterctl and launch this:
sudo ./inverterctl --device usb --verbose --raw "^P003PI"
I expect it to show something like ^D00517
in response.
Other commands won't work at the moment. But you can try invoking some of them manually, like --raw "^P003GS"
. Should return general status.
If we confirm that your inverter is indeed using P17 protocol, then I'll support it in a week or so, fortunately the protocol datasheet is available.
Owsome! ;-) Below the output after recompiled code:
pi@raspberrypi:~/inverter-tools/build $ sudo ./inverterctl --device usb --verbose --raw "^P003PI" voltronic::Device::send(): writing 8 bytes 0x0000: 5e 50 30 30 33 50 49 0d ^P003PI. voltronic::USBDevice::write(): dataSize=8, writeSize=8 0x0000: 5e 50 30 30 33 50 49 0d ^P003PI. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 10 bytes 0x0000: 5e 44 30 30 35 31 37 ca ec 0d ^D00517... 0x0000: 5e 44 30 30 35 31 37 ^D00517 ^D00517
pi@raspberrypi:~/inverter-tools/build $ sudo ./inverterctl --device usb --verbose --raw "^P003GS" voltronic::Device::send(): writing 8 bytes 0x0000: 5e 50 30 30 33 47 53 0d ^P003GS. voltronic::USBDevice::write(): dataSize=8, writeSize=8 0x0000: 5e 50 30 30 33 47 53 0d ^P003GS. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=0 error: timeout: data reading already took 1001 ms
Nice, it's really P17.
About that timeout, try --timeout 3000
or something like that, maybe it's just too slow. Mine is returning status in about 500ms so I set 1000ms as the default.
So I'll implement P17 and notify you, I hope for your help in testing.
Below is the output with --timeout set to 3000 . Of course I will help with anything needed just let me know! ;-)
pi@raspberrypi:/inverter-tools/build $ sudo ./inverterctl --device usb --timeout 3000 --verbose --raw "^P003PI" voltronic::Device::send(): writing 8 bytes 0x0000: 5e 50 30 30 33 50 49 0d ^P003PI. voltronic::USBDevice::write(): dataSize=8, writeSize=8 0x0000: 5e 50 30 30 33 50 49 0d ^P003PI. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 10 bytes 0x0000: 5e 44 30 30 35 31 37 ca ec 0d ^D00517... 0x0000: 5e 44 30 30 35 31 37 ^D00517 ^D00517
pi@raspberrypi:~/inverter-tools/build $ sudo ./inverterctl --device usb --timeout 3000 --verbose --raw "^P003GS" voltronic::Device::send(): writing 8 bytes 0x0000: 5e 50 30 30 33 47 53 0d ^P003GS. voltronic::USBDevice::write(): dataSize=8, writeSize=8 0x0000: 5e 50 30 30 33 47 53 0d ^P003GS. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 115 bytes 0x0000: 5e 44 31 31 30 30 30 30 30 2c 30 30 30 30 2c 30 ^D1100000,0000,0 0x0010: 30 30 30 2c 30 30 30 30 2c 30 35 34 30 2c 30 39 000,0000,0540,09 0x0020: 39 2c 2b 30 30 30 32 31 2c 32 33 32 34 2c 32 33 9,+00021,2324,23 0x0030: 34 38 2c 32 32 39 36 2c 34 39 39 38 2c 30 30 30 48,2296,4998,000 0x0040: 30 2c 30 30 30 30 2c 30 30 30 30 2c 32 33 32 34 0,0000,0000,2324 0x0050: 2c 32 33 34 36 2c 32 32 39 36 2c 34 39 39 39 2c ,2346,2296,4999, 0x0060: 2c 2c 2c 30 32 39 2c 30 33 31 2c 30 30 30 2c 30 ,,,029,031,000,0 0x0070: a0 42 0d .B. 0x0000: 5e 44 31 31 30 30 30 30 30 2c 30 30 30 30 2c 30 ^D1100000,0000,0 0x0010: 30 30 30 2c 30 30 30 30 2c 30 35 34 30 2c 30 39 000,0000,0540,09 0x0020: 39 2c 2b 30 30 30 32 31 2c 32 33 32 34 2c 32 33 9,+00021,2324,23 0x0030: 34 38 2c 32 32 39 36 2c 34 39 39 38 2c 30 30 30 48,2296,4998,000 0x0040: 30 2c 30 30 30 30 2c 30 30 30 30 2c 32 33 32 34 0,0000,0000,2324 0x0050: 2c 32 33 34 36 2c 32 32 39 36 2c 34 39 39 39 2c ,2346,2296,4999, 0x0060: 2c 2c 2c 30 32 39 2c 30 33 31 2c 30 30 30 2c 30 ,,,029,031,000,0 ^D1100000,0000,0000,0000,0540,099,+00021,2324,2348,2296,4998,0000,0000,0000,2324,2346,2296,4999,,,,029,031,000,0
Nice. It works. ^D1100000,0000,0000,0000,0540,099,+00021,2324,2348,2296,4998,0000,0000,0000,2324,2346,2296,4999,,,,029,031,000,0
is your raw status data.
It means my inverter respond with the general status using the P17 protocol in this test ? You mentioned that the protocol P17 datasheet is available. Can you send me the link, so I will also learn something about that.. ;-)
Yes.
PI17_InfiniSolar-5KW-protocol-20160309.pdf
Here is it. I started working on supporting P17 in inverter-tools btw.
Great, many thanks! ;-)
Hello Evgeny, how are you ? How did you play on the European Football Championship in St. Petersburg ? ;-) Were you able to code something during this time ;-)
You can close this issue while it is running on my raspberry 3b. My ea sun power inverter hybrid uses P18. Thank you for your implementation.
KristianHeider,
We are talking here about supporting P17 protocol.
Attached P17 events XML from the java based software. Events_P17.xml.txt .
https://www.ostrovni-elektrarny.cz/support/Voltronic/SolarPower_1.14SP7_Windows.rar https://www.ostrovni-elektrarny.cz/support/Voltronic/SolarPowerCS_1.14SP7_Linux_64bit.bin https://www.ostrovni-elektrarny.cz/support/Voltronic/
I found also some solution regarding P17 protocol here: https://github.com/wolfgangr/infinitalk/blob/master/P17_def.pl
Another implementation of P17 protocol I found on github which seems to be also interesting:
Hi, I am trying to query my inverter, have successfully built the code on my pi and have the inverter connected on USB. Response i get back is no good. I also tried the P17 protocol from the test branch but still the same issue. Here is the output i receive:
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --verbose --raw "^P003ET" voltronic::Device::send(): writing 8 bytes 0x0000: 5e 50 30 30 33 45 54 0d ^P003ET. voltronic::USBDevice::write(): dataSize=8, writeSize=8 0x0000: 5e 50 30 30 33 45 54 0d ^P003ET. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 5 bytes 0x0000: 5e 30 1b e3 0d ^0... 0x0000: 5e 30 ^0 ^0
To add - The Java software i am using is 'Solar Power V1.16SP5'
@mdm183 what inverter is that?
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --verbose --raw "^P003ET"
voltronic::Device::send(): writing 8 bytes
0x0000: 5e 50 30 30 33 45 54 0d ^P003ET.
this is definitely an output from utility compiled from p17 test branch (with disabled crc) and you probably shouldn't use it. Did you try sending ^P005ET
using master branch?
@gch1p its a 6KW version of the hybrid inverter, running 2 in parallel. I will test the command with the master branch and report back
@gch1p Interesting, This time i get 16 bytes back:
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --verbose --raw "^P005ET" voltronic::Device::send(): writing 10 bytes 0x0000: 5e 50 30 30 35 45 54 4e 91 0d ^P005ETN.. voltronic::USBDevice::write(): dataSize=10, writeSize=8 0x0000: 5e 50 30 30 35 45 54 4e 91 0d ^P005ETN.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=2, writeSize=2 0x0000: 91 0d .. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 16 bytes 0x0000: 5e 44 30 31 31 30 30 34 38 30 33 30 32 a1 5e 0d ^D01100480302.^. 0x0000: 5e 44 30 31 31 30 30 34 38 30 33 30 32 ^D01100480302 ^D01100480302
Just to add - I have 2 inverters running in parallel with 1 usb cable connected. I have another solo inverter connected to another USB port. As i can't reference the actual port to connect to (/dev/hidraw0), the outputs may be showing the 2 connected usb ports. I am just interested in getting the parallel ones to talk. Actually i can turn off the other inverter so it doesn't make things complicated!
@gch1p ok I have powered off the inverter, new results below, ignore the time-out as that would be the powered off inverter
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --verbose --raw "^P005ET" voltronic::Device::send(): writing 10 bytes 0x0000: 5e 50 30 30 35 45 54 4e 91 0d ^P005ETN.. voltronic::USBDevice::write(): dataSize=10, writeSize=8 0x0000: 5e 50 30 30 35 45 54 4e 91 0d ^P005ETN.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=2, writeSize=2 0x0000: 91 0d .. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=0 error: timeout: data reading already took 1002 ms
Interesting, This time i get 16 bytes back
This time it works. Now try something like inverterctl --device usb get-status
.
For querying inverters connected in parallel try get-p-status 0
or get-p-status 1
or get-p-status 2
... Actually I have just one inverter so I didn't test parallel stuff, I just implemented it according to documentation. Launch inverterctl --help
and look for commands that accept id
as an argument and try using them.
@gch1p OMG - You are a legend. This is now working :) Thank you so much for your help on this. I tried so many different systems but failed with this inverter, your tool has done the trick
Do see an issue with the p-status
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb get-p-status 1 error: response is invalid: while parsing p18::response_type::ParallelGeneralStatus: list is expected to be 29 items long, got only 28 items root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb get-p-status 1 --verbose voltronic::Device::send(): writing 12 bytes 0x0000: 5e 50 30 30 37 50 47 53 31 39 97 0d ^P007PGS19.. voltronic::USBDevice::write(): dataSize=12, writeSize=8 0x0000: 5e 50 30 30 37 50 47 53 31 39 97 0d ^P007PGS19.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=4, writeSize=4 0x0000: 31 39 97 0d 19.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 114 bytes 0x0000: 5e 44 31 30 39 31 2c 33 2c 30 30 2c 30 30 30 30 ^D1091,3,00,0000 0x0010: 2c 30 30 30 2c 32 33 30 33 2c 35 30 30 2c 30 36 ,000,2303,500,06 0x0020: 34 34 2c 30 36 30 31 2c 30 31 32 38 38 2c 30 31 44,0601,01288,01 0x0030: 32 30 30 2c 30 31 30 2c 30 31 30 2c 34 39 35 2c 200,010,010,495, 0x0040: 30 31 33 2c 30 30 30 2c 30 30 30 2c 30 36 33 2c 013,000,000,063, 0x0050: 30 30 30 30 2c 30 30 30 30 2c 30 37 36 30 2c 30 0000,0000,0760,0 0x0060: 30 30 30 2c 30 2c 30 2c 31 2c 32 2c 32 2c 30 a1 000,0,0,1,2,2,0. 0x0070: 85 0d .. error: response is invalid: while parsing p18::response_type::ParallelGeneralStatus: list is expected to be 29 items long, got only 28 items
Tried get-p-status 1 / 0 and 2 but still the same.
hm, ok give me 5 minutes, i'll try to fix it
I pushed the fix 46c308bc1406ccf7415698ca24e69865022edaee
If you intend to use it for monitoring, I strongly advise using inverterd
instead of inverterctl
. inverterd
was created exactly for that purpose, it's faster (because you don't spawn a new process everytime you read data) and it puts incoming commands in queue and executes them in order, to avoid race conditions in case there's more than 1 connected client, and this is just a must-have feature. Otherwise, if you launch two inverterctl
instances simultaneously and both will try to do something, you'll get usb device lockups, garbage in responses and all kinds of other errors, because the inverter can handle only 1 client at a time and preferably not too fast, at least the one that i have at home (inverterd adds a delay between queries that you can adjust, i use something like 150ms).
I personally use it (among other things) to read the inverter status once a second and build dashboards like this in grafana, works perfecly:
@gch1p Hi - yes completely agree. Intension is to use it as a service and get MQTT parsing through to integrate with Grafana and other stuff. Will report back after I pull the new fix.. Thank you once again
Thank you - the new build is working perfectly can now query the parallel inverters. Finally I can now continue with my project. Big big thanks!
You're welcome.
As for the original subject of this ticket, the P17 support, I'm sorry for such enormous delay with it, I've been really busy with my work and other life stuff. I've implemented about 30% of it and then stopped, but I think I'll get back to it soon.
Just to add, not a show stopper, but something I guess as I am testing out parallel, found another similar issue,
exec get-p-rated 0 err {"result":"error","message":"response is invalid: while parsing p18::response_type::ParallelRatedInformation: item 5 is expected to be 2 characters long, got 3 characters"}
exec get-p-rated 1 err {"result":"error","message":"response is invalid: while parsing p18::response_type::ParallelRatedInformation: item 5 is expected to be 2 characters long, got 3 characters"}
Can you get the verbose output, with the actual response of your inverter?
here you go
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb get-p-rated 1 --verbose voltronic::Device::send(): writing 12 bytes 0x0000: 5e 50 30 30 37 50 52 49 31 7d bc 0d ^P007PRI1}.. voltronic::USBDevice::write(): dataSize=12, writeSize=8 0x0000: 5e 50 30 30 37 50 52 49 31 7d bc 0d ^P007PRI1}.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=4, writeSize=4 0x0000: 31 7d bc 0d 1}.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 45 bytes 0x0000: 5e 44 30 34 30 31 2c 31 34 2c 39 36 31 34 32 31 ^D0401,14,961421 0x0010: 30 37 31 30 30 34 32 31 30 30 30 30 30 30 2c 30 07100421000000,0 0x0020: 2c 30 33 30 2c 30 33 30 2c 31 8d dc 0d ,030,030,1... error: response is invalid: while parsing p18::response_type::ParallelRatedInformation: item 5 is expected to be 2 characters long, got 3 characters
fixed
nice one dude - will check. Another bug found - missing inverter temperature from parallel command, do see a max temp which is 0, when i run the normal get-status i can see the temperature. Here is the verbose:
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --format table get-p-status 1 --verbose voltronic::Device::send(): writing 12 bytes 0x0000: 5e 50 30 30 37 50 47 53 31 39 97 0d ^P007PGS19.. voltronic::USBDevice::write(): dataSize=12, writeSize=8 0x0000: 5e 50 30 30 37 50 47 53 31 39 97 0d ^P007PGS19.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=4, writeSize=4 0x0000: 31 39 97 0d 19.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 114 bytes 0x0000: 5e 44 31 30 39 31 2c 33 2c 30 30 2c 30 30 30 30 ^D1091,3,00,0000 0x0010: 2c 30 30 30 2c 32 33 30 33 2c 34 39 39 2c 30 36 ,000,2303,499,06 0x0020: 36 37 2c 30 36 31 31 2c 30 31 32 38 38 2c 30 31 67,0611,01288,01 0x0030: 32 30 30 2c 30 31 31 2c 30 31 30 2c 34 37 38 2c 200,011,010,478, 0x0040: 30 31 33 2c 30 30 30 2c 30 30 30 2c 30 34 36 2c 013,000,000,046, 0x0050: 30 30 30 30 2c 30 30 30 30 2c 30 37 31 38 2c 30 0000,0000,0718,0 0x0060: 30 30 30 2c 30 2c 30 2c 31 2c 32 2c 32 2c 30 f0 000,0,0,1,2,2,0. 0x0070: 16 0d .. Parallel ID connection status: Existent Working mode: Battery mode Fault code: 0 Grid voltage: 0 V Grid frequency: 0 Hz AC output voltage: 230.3 V AC output frequency: 49.9 Hz AC output apparent power: 667 VA AC output active power: 611 Wh Total AC output apparent power: 1288 VA Total AC output active power: 1200 Wh Output load percent: 11 % Total output load percent: 10 % Battery voltage: 47.8 V Battery discharge current: 13 A Battery charging current: 0 A PV1 Input power: 0 Wh PV2 Input power: 0 Wh PV1 Input voltage: 71.8 V PV2 Input voltage: 0 V MPPT1 charger status: Abnormal MPPT2 charger status: Abnormal Load connection: Connected Battery power direction: Discharge DC/AC power direction: DC/AC Line power direction: Do nothing Max. temperature: 0
And this is the output from the get-status, you can see the inverter temperature is there:
root@pk-pi-02:/data/git/inverter-tools/build# ./inverterctl --device usb --format table get-status --verbose voltronic::Device::send(): writing 10 bytes 0x0000: 5e 50 30 30 35 47 53 58 14 0d ^P005GSX.. voltronic::USBDevice::write(): dataSize=10, writeSize=8 0x0000: 5e 50 30 30 35 47 53 58 14 0d ^P005GSX.. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::USBDevice::write(): dataSize=2, writeSize=2 0x0000: 14 0d .. voltronic::Device::writeLoop(): bytesWritten=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::readLoop(): bytesRead=8 voltronic::Device::recv(): got 111 bytes 0x0000: 5e 44 31 30 36 30 30 30 30 2c 30 30 30 2c 32 33 ^D1060000,000,23 0x0010: 30 33 2c 35 30 30 2c 30 36 34 34 2c 30 35 39 31 03,500,0644,0591 0x0020: 2c 30 31 30 2c 34 37 37 2c 30 30 30 2c 30 30 30 ,010,477,000,000 0x0030: 2c 30 31 34 2c 30 30 30 2c 30 34 35 2c 30 33 33 ,014,000,045,033 0x0040: 2c 30 30 30 2c 30 30 30 2c 30 30 30 30 2c 30 30 ,000,000,0000,00 0x0050: 30 30 2c 30 30 30 30 2c 30 30 30 30 2c 30 2c 30 00,0000,0000,0,0 0x0060: 2c 30 2c 31 2c 32 2c 32 2c 30 2c 30 0b 5c 0d ,0,1,2,2,0,0.. Grid voltage: 0 V Grid frequency: 0 Hz AC output voltage: 230.3 V AC output frequency: 50 Hz AC output apparent power: 644 VA AC output active power: 591 Wh Output load percent: 10 % Battery voltage: 47.7 V Battery voltage from SCC: 0 V Battery voltage from SCC2: 0 V Battery discharging current: 14 A Battery charging current: 0 A Battery capacity: 45 % Inverter heat sink temperature: 33 °C MPPT1 charger temperature: 0 °C MPPT2 charger temperature: 0 °C PV1 input power: 0 Wh PV2 input power: 0 Wh PV1 input voltage: 0 V PV2 input voltage: 0 V Configuration state: Default MPPT1 charger status: Abnormal MPPT2 charger status: Abnormal Load connection: Connected Battery power direction: Discharge DC/AC power direction: DC/AC Line power direction: Do nothing Local parallel ID: 0
Another bug found - missing inverter temperature from parallel command, do see a max temp which is 0, when i run the normal get-status i can see the temperature. Here is the verbose:
This is actually what I "fixed" earlier, when inverterctl said it was expecting 29 items but found only 28. Your inverter doesn't report that temperature so the value stays zero. You should just ignore it I guess.
The temperature should be the last field, but in the protocol documentation it's marked in red (see that red bbb?)
I don't know what exactly red means, the docs doesn't say, but now I think it means that this field is optional and may be missing on some inverters.
@gch1p ok thanks, yeah must be some optional thing. I will re-compile the changes shortly...cheers
@mdm183 can you please tell me how exactly your inverter is called? Its full name. I'll add it to the list of tested devices
Sure, its known as Crown 6KW Axpert VMII Hybrid Inverter (knock off of the same MPP-solar inverter), was purchased for my dads house in Pakistan https://coollineenergy.com/product/crown-micro-elego-6kw-solar-hybrid-inverter/
Hello,
Do I need first Install GCC on Raspberry Pi and build C++17 programs ? I used this guide below but not sure how to compile the inverter tools. Could you please provide the exact commands to build this software on RPI ?
https://gist.github.com/sol-prog/95e4e7e3674ac819179acf33172de8a9
Commands used in the video https://youtu.be/-bCG87jBDqA :
sudo apt update && sudo apt upgrade -y
git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git cd raspberry-pi-gcc-binary tar -xjvf gcc-9.1.0-armhf-raspbian.tar.bz2 sudo mv gcc-9.1.0 /opt cd .. rm -rf raspberry-pi-gcc-binary
cd ~ echo 'export PATH=/opt/gcc-9.1.0/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/opt/gcc-9.1.0/lib:$LD_LIBRARY_PATH' >> ~/.bashrc . ~/.bashrc sudo ln -s /usr/include/arm-linux-gnueabihf/sys /usr/include/sys sudo ln -s /usr/include/arm-linux-gnueabihf/bits /usr/include/bits sudo ln -s /usr/include/arm-linux-gnueabihf/gnu /usr/include/gnu sudo ln -s /usr/include/arm-linux-gnueabihf/asm /usr/include/asm sudo ln -s /usr/lib/arm-linux-gnueabihf/crti.o /usr/lib/crti.o sudo ln -s /usr/lib/arm-linux-gnueabihf/crt1.o /usr/lib/crt1.o sudo ln -s /usr/lib/arm-linux-gnueabihf/crtn.o /usr/lib/crtn.o
g++-9.1 -std=c++17 -Wall -pedantic test_fs.cpp -o test_fs ./test_fs
Thank You!