dave92082 / SolarEdge-Exporter

Prometheus exporter for SolarEdge inverters
MIT License
59 stars 25 forks source link

No metrics for SE5000H #13

Open thiagofigueiro opened 3 years ago

thiagofigueiro commented 3 years ago

Hi! thanks for sharing this project. I tried using it with my SolarEdge inverter but no meter values came back.

Here's the output with debug enabled:

12:38 $ ./SolarEdge-Exporter
12:38PM INF Starting SolarEdge-Exporter
12:38PM INF Configured Inverter Address: 192.168.1.6
12:38PM INF Configured Inverter Port: 1502
12:38PM INF Configured Listen Address:
12:38PM INF Configured Listen Port: 2112
12:38PM INF Inverter Model: SE5000H-AU000BWU4
12:38PM INF Inverter Serial: <redacted>
12:38PM INF Inverter Version: 0004.0011.0030
12:38PM INF Meter Manufacturer:
12:38PM INF Meter Model:
12:38PM INF Meter Serial:
12:38PM INF Meter Version:
12:38PM INF Meter Option:
12:38PM DBG Meter AC Current: 0.000000
12:38PM DBG Meter VoltageLN: 0.000000
12:38PM DBG Meter PF: 0
12:38PM DBG Meter Freq: 0.000000
12:38PM DBG Meter AC Power: 0.000000
12:38PM DBG Meter M_AC_VA: 0.000000
12:38PM DBG Meter M_Exported: 0.000000
12:38PM DBG Meter M_Imported: 0.000000
12:38PM DBG -------------------------------------------

Using https://github.com/nmakel/solaredge_modbus, I get these values:

[ { 'fields': { 'c_deviceaddress': 1.0,
                'c_sunspec_did': 101.0,
                'current': 20.17,
                'current_dc': 11.314,
                'energy_total': 1194932.0,
                'frequency': 50.024,
                'p1_current': 20.17,
                'p1_voltage': 248.1,
                'p1n_voltage': 0.0,
                'p2_current': 0.0,
                'p2_voltage': 0.0,
                'p2n_voltage': 0.0,
                'p3_current': 0.0,
                'p3_voltage': 0.0,
                'p3n_voltage': 0.0,
                'power_ac': 5004.0,
                'power_apparent': 5009.0,
                'power_dc': 5080.0,
                'power_factor': 99.89,
                'power_reactive': 226.48,
                'status': 5.0,
                'temperature': 57.69,
                'vendor_status': 0.0,
                'voltage_dc': 449.0},
    'measurement': 'inverter',
    'tags': { 'c_deviceaddress': 1,
              'c_manufacturer': 'SolarEdge',
              'c_model': 'SE5000H-AU000BWU4',
              'c_serialnumber': '<redacted>',
              'c_sunspec_did': 101,
              'c_version': '0004.0011.0030'},
    'time': '2021-01-09T01:40:22Z'}]

In the readme you mention this was "Tested with SE5000 w. CPU version 3.2221.0". If this is comparable to the c_version above, then I'm running 4.11.30, which is a major version above.

I'd be happy to provide some debugging data to try and get this working with the new version. Please let me know if I can go anything on my side. Thank you.

snicoll commented 3 years ago

Same problem on SE3000H. I am not experienced with Go but I am happy to debug and provide more context if that can help. @dave92082 would you be interested by that?

thiagofigueiro commented 3 years ago

@snicoll you might want to try this: https://github.com/nmakel/solaredge_modbus/. It works well with my inverter and meter module.

snicoll commented 3 years ago

Yup it does too but I like the gauge and Prometheus export this project provides.

dave92082 commented 3 years ago

@thiagofigueiro , I noticed in your output that you listed your config as port 1502. Would that happen to be a typo in your config as the default port on my SE5000 is 502 not 1502.

dave92082 commented 3 years ago

@snicoll Can you provide the initial log/cli output? I can try to add additional debug logging to assist with troubleshooting. Without having access to an SE3000 to test with, debugging over comments is going to be interesting, but I'm happy to help.

snicoll commented 3 years ago

It's 1502 for me. Using a wrong port would not allow to read the info about the inverter.

snicoll commented 3 years ago

I think the OP and I have exactly the same problem. My logs are the same as them (all values are 0.0). I am on the same firmware as they are.

I bet if you updated the firmware of yours you'd be affected too. Unfortunately you can't do that unless you have admin rights on your inverter.

The doc you mentioned in the read me had an update in December 2020 that shows the mapping has been updated. See version 2.2. Maybe related?

dave92082 commented 3 years ago

Thanks for the info @snicoll and confirming the port number, I was not aware they changed the mapping. I'll review the updated documentation and see if we can somehow accommodate both versions.

dave92082 commented 3 years ago

Looks as if they kept the same address relationship and just changed the register mappings. Should be an easy change to accommodate both. @snicoll, are you on the same version as @thiagofigueiro ?

snicoll commented 3 years ago

Yes.