Skip to content
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

Having issues pulling optimizer data #23

Open
smilernet opened this issue Feb 5, 2020 · 16 comments
Open

Having issues pulling optimizer data #23

smilernet opened this issue Feb 5, 2020 · 16 comments

Comments

@smilernet
Copy link

Hi,

Using the following cmd to test the protocol buffers:

curl -s http://inverter_ip/web/v1/maintenance | ./protoc -I=/opt/solaredge-local/message_types --decode Maintenance /opt/solaredge-local/message_types/maintenance.proto

Here's an excerpt of what I get for the optimizer data; as you can see the invSn & serialNumber has additional characters - \n\013

diagnostics { inverters { primary { invSn: "\n\013<inverter_serial>" optimizerList { serialNumber: "\n\013<optimizer_serial>" lastReport { 1 { 1: 2020

Any ideas what the issue might be with the additional characters?

@sneerix
Copy link

sneerix commented Feb 6, 2020

I have the same for SE4K. I happened about a week ago, after inverter firmware was upgraded (automatically?).

image

Before that, it was working correctly.
I'll be happy to submit additional data or perform some tests if it helps to solve this issue.

@sneerix
Copy link

sneerix commented Feb 6, 2020

I've checked my maintenance file (got from http://inverter.ip/web/v1/maintenance) against https://protogen.marcgravell.com/decode and it seams to be decoded correctly. Also, when I parse maintenance file trough protoc --decode_raw it seams to be ok. But my knowledge to fix this is too small today.
I've attached parsed maintenance files.
maintenance_parsed.log
maintenance_raw.log

@sneerix
Copy link

sneerix commented Feb 22, 2020

@drobtravels, will you be able to help us?

@drobtravels
Copy link
Owner

I'm not noticing this issue on mine (CPU 4.5.41). They must have made some changes in later versions.

Very strange that it only shows in the parsed versions. Serial Number is just a string, so its odd that it would have changed. You can try reviewing the potential types, updating the .proto file and see if there is a different type that solves that issue

@sneerix
Copy link

sneerix commented Feb 26, 2020

It seems, that after last firmware upgrade I've lost access to inverter web page. It is still sending data to solaredge cloud, modbus tcp is still accessible so network connections works ok.
So, for at least now, I'm unable to use you solution anymore :-(

@ghost
Copy link

ghost commented Mar 7, 2020

As of today I'm no longer able to read the optimizer data. Seems my inverter also upgraded to 4.8.19.
I see the '\n\013' as well, as smilernet reported. However, only in the parsed output. E.g.
curl -s http://<ip>/web/v1/maintenance | protoc --decode_raw
returns (among other lines)
2 { 1 { 1: "10BBC12B-B7" } 2 { 1: 0 } }

But
curl -s http://<ip>/web/v1/maintenance | protoc --decode Maintenance message_types/maintenance.proto
returns
optimizer { serialNumber: "\n\01310BBC12B-B7" 2 { 1: 0 } }

So I suspect they added a field, resulting in a misalignment of the parser?

@merijn-weiss
Copy link

Last week my inverter also received an automatic update to 4.8.19. This broke retrieving the maintenance information as reported by others as well. I've started to look into a fix and actually don't think the issue is the serial field.

The issue seems to be that SolarEdge changed the definition of the Protocol Buffer. I'm planning to make a new message type definition, but it is my first experience with Prococol Buffers.

It would help if somebody can share a raw file Maitenance file of an invertor that is not upgraded to 4.8.19 and still works with the solaredge_local implementation.

@ghost
Copy link

ghost commented Mar 8, 2020

I've got good results after changing in the maintenance.proto file type 'string' to 'my_string', where my_string is defined as
message my_string { string value = 1; }

and similar for int32 and bool types. Of course, that also requires updating your code, e.g. where you access the property serialNumber, it is now serialNumber.value. And this new format probably won't work with older inverters.

drobtravels, how do we best proceed?

@merijn-weiss
Copy link

I took the same approach. In addition I reworked the entire proto file to align to the naming used in the SolarEdge UI. Main question to address is how to make it work for various versions in a clean manner.

@scheric
Copy link

scheric commented Mar 9, 2020

My inverter has spontaneously updated to 4.8.19 yesterday at 23:07 UTC+1 according to Home Assistant.
I also lost all optimizer data from maintenance but I also lost inverter temperature from status data.

when I am using this code

print (status.inverters)

Results:

primary {
  dspSn: "xxxxxx-xxxx"
  voltage: 385.0412
  optimizersStatus {
    total: 10
    online: 10
  }
  temperature {
    units {
    }
  }
  subSystem: 6144
}

This is how it looked before.

primary {
    dspSn: "xxxxxxx"
    voltage: 371.3249206542969
    optimizersStatus {
      total: 10
      online: 10
    }
    temperature {
      value: 38
      units {
        celsius: true
      }
    }
    subSystem: 6144
}

@stefxx
Copy link

stefxx commented Mar 13, 2020

Hi guys, great work! Anyone willing to share their updated .proto files? Thanks!

@merijn-weiss
Copy link

Hello stefxx, just created a fork where I pushed the update maintenance file. Please note that I also aligned the naming of the fields to the names used by SolarEdge in their UI implementation. So these are breaking changes. I've not done the other files yet, but I'm planning to do so in the days to come.

@drobtravels
Copy link
Owner

drobtravels commented Mar 13, 2020 via email

@stefxx
Copy link

stefxx commented Mar 13, 2020

@merijn-weiss, thanks! That was quick :)

@stefxx
Copy link

stefxx commented Mar 13, 2020

BTW, the temperature field in status.proto seems to have the same issue...

@merijn-weiss
Copy link

@stefxx , I'm aware. I will review all proto files and see how to create the update such that @drobtravels is able to accept a pull request without breaking the implementation for inverters with other firmware versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants