Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Reading data from Axpert, Voltronic, Mecer etc over USB with Python

Featured Replies

Hi all,

I am trying to read all the data I can get over USB from my Mecer 3kVA (24V - 1500W PV) off grid inverter using Python on a Raspberry.
I'm using some modified code that Nikitto wrote a few months back and have a few questions. 
I seem to get the real-time values using the QPIGS command, but I also wanted to know what the other commands were for, QID, QFLAG, QPI, QMOD? In case I'm missing out on any other data that might be useful.
I also notice that if I haven't run the QPIGS command for a while it will time out on the first run, but then if I cancel and rerun it again it works fine. Anyone else notice this? Is there another command I should be calling first in order to set up the communication?

Nikitto's code returns an array for QPIGS, I've managed to figure out some of those values:
[0]: 0 = Inverter off, 1 = Inverter on
[1]: ?
[2]: Inverter voltage
[3]: Inverter frequency
[4]: ? I think inverter watts or VA
[5]: ? I think inverter watts or VA
[6]: ? Most of the time 000 for me
[7]: ? Usually between 300 - 500
[8]: Battery Voltage
[9]: Battery charging amps
[10]: State of charge in percent
[11]: Temperature of inverter/charger (divide by 10)
[12]: ? Usually between 0000 - 0022
[13]: Solar panel volts
[14]: ? Seems similar to battery voltage, usually around 0.1V difference
[15]: Battery load amps
[16]: ? Some bit string, representing state, have seen 10010110, 10110110, 10010000
[17]: ? Always seems to be 00 for me
[18]: ? Always seems to be 04 for me
[19]: Solar Watts
[20]: ? Seem 000 and 101 here

Do any of you know the ones I am confused about (marked ?) or whether I have any wrong and what do those other commands do, QID, QFLAG, QPI, QMOD etc

Thanks in advance!

55 minutes ago, Lindsay said:

I seem to get the real-time values using the QPIGS command, but I also wanted to know what the other commands were for, QID, QFLAG, QPI, QMOD? In case I'm missing out on any other data that might be useful.

Most of this is in the protocols manuals, e.g. this one. There are three protocol manuals listed at the start of the PIP-4048MS and PIP-5048MS inverters AEVA topic (it's an index into the extensive posts on these inverters). Your 3 kVA model runs more or less the same set of commands.

Quote

 

I also notice that if I haven't run the QPIGS command for a while it will time out on the first run, but then if I cancel and rerun it again it works fine. Anyone else notice this? Is there another command I should be calling first in order to set up the communication?

 

I don't understand what you mean by "time out on the first run". There isn't a required order or set of commands. The only hassle is that they can take a variable amount of time to respond, which often isn't convenient.

See also my post on the undocumented Q1 command. It has more detailed temperature information, for example.

  • Author

Thanks, I was able to find some other commands that worked to get the default inverter settings as well as the current settings. When I run QMOD I get FH, which according to the communications document you linked to means Fault and Power saving. I don't have any fault showing on the inverters screen and no fault LED flashing under it either, so maybe that mapping is different for my model.

I didn't get any response when trying to get that detailed temperature information. 

When I mentioned "time out on the first run" I meant that after issuing the command I never get anything back. The Python code sits waiting for a response and after a minute I just stop it manually. If I run QPIGS again straight after, then it runs quick and returns the results in a couple of seconds. I probably just need to set something to retry in my code.

Thanks again for the manual, I was able to work out all of the QPIGS values that I am getting back which seem the same for my inverter.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.