-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using 2 inverters with 1 logger #26
Comments
Did you solve this? self.logger.info('RAW Packet (len={0}): '.format(len(data))+':'.join(x.encode('hex') for x in data)) This will log a hex dump of the returned data. |
Thx XtheOne for responding. No, not yet solved. I tried your suggestion, this is what it shows when running livestats.py: hmm, I see some text is changed to an icon. to prevent this I added a space twice, so remove the space from ': de' (twice) |
This is data from 1 inverter. My guess would be to change this line: If the (new) Android app shows you data from both inverters you can use a packet sniffer to see how the app queries both inverters. |
Sorry, that doesn't work. Following your suggestion it just waits a long time and then comes with a time out error: What I understand from the code it sends a magic packet that triggers the logger to send the data from the PV converters. The data received is then parsed like a string with the various bits in fixed positions. Since I have 1 logger for 2 PV converters the logger probably just sends a longer 'string' with the data of both in it, Or, that is my guess. |
The data dump contains values from 1 inverter and some version information. |
So you're sure it's not the python script that 'chops' the end off the dump, making it look like it's data from only one inverter? |
I am sure because the receive buffer is >1000 chars long and the dumped data contains the end byte (16) Maybe if you sent the magic packet a 2nd time in the same session it returns the 2nd inverter data. |
I have just looked in the decoded source of the Android app and found: |
Really appreciate your time for this issue :-) I tried the new app, that works fine, just like the website. Isn't the app using data from their website, not the raw data from the loggerbox I mean? The pi that the loggerbox is now configured to send data to, also runs iptables (because of pivpn). Is there an iptables command that you know of that I could use to show the data that it sends to the pi? I tried some commands but that either gives an error or just nothing at all (that I can find). Or if you give me an ip address of your own that I can point the logger to? |
BTW this is what I get with tcpdump, no idea how to interpret this :-) sudo tcpdump -v port 8899 tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes |
With the app you can connect locally, select manual mode (no login) at the login screen. |
Hope your holiday was fine :-) I've been busy while you were away, with no real results unfortunately. I tried both apps, Omnik's and Solarman's and the converters shwo up nicely but they give no clue on what is received (or sent). The Solarman app finds the logger first, then shows the converter serials and I have to select either one to retreive any data. This does look like it is possible to retreive data by providing a serial number but ofcourse I have no clue how to do that. I sent a message to both Omnik and Solarman support for more technical documentation, but no response as of yet. With tcpdump (sudo tcpdump -vv -x -X -U -s 65535 -i wlan0 port 8899 -w solarman.pcap) I can capture packets and its contents in a pcap file and open those with wireshark. It seems fine but I have little clue what I am looking at, to be honest. There is an incoming packet and an ack returned. I could send the file to you, maybe you can see more? An acquaintance of mine has some Python skills, I could ask him if he can dissect wouterrr's script and find a way to get more data by sending the magic packet. |
I am back, had a nice vacation! :-) |
I'd be happy to send an email! I found two here I'll be trying the one that seems like the private email. If no answer in a few days we'll have to try something else :-) |
I got this working! |
Hi Wouterrr,
Installed your logger scripts and it worked out-of-the-box, kudos for you! :-) However...
I have a separate Wifi box (1 device with SN 504XXXXXX) that uses RS485 (in a daisy chain) to connect to my 2 inverters. So no individual Wifi-kits on the inverters themselves. Livestats.py produces a neat message as expected, but shows only values of the first inverter, the second one is not shown.
Assuming that the received string holds data of both inverters, is there a way to extract the second one as wel? I know both ID's of the inverters and this could be added to config.cfg so the script could look up the string and parse from there?
I'm no programmer but pretty handy and willing to help/test whatever. TIA
Edit:
I saw this: InverterMsg.py on line 8 says:
def init(self, msg, offset=0):
Could this offset be used to parse several parts of the response message? I tried offsetting here but no visible effect.
Edit2: Can anyone point to the part of the code where I need to iterate parsing the message for more inverters?
The text was updated successfully, but these errors were encountered: