volkszaehler / mbmd

ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters
BSD 3-Clause "New" or "Revised" License
229 stars 81 forks source link

SolarEdge Inverter: sunspec: subdevice 1 not found #285

Closed cnovak closed 1 year ago

cnovak commented 1 year ago

When starting evcc, I get the following error:

[main ] FATAL 2022/10/06 21:54:49 cannot create meter 'grid1': cannot create meter 'template': cannot create meter 'custom': power: sunspec: subdevice 1 not found

I configured my system to use my SolarEdge inverter. I can see it, and the evcc detect brings it up:

+---------------+----------+---------+---------------------------------------------------------------------------------------------------------+
|      IP       | HOSTNAME |  TASK   |                                                 DETAILS                                                 |
+---------------+----------+---------+---------------------------------------------------------------------------------------------------------+
| 192.168.86.84 |          | sunspec | {"IP":"192.168.86.84","Port":1502,"ModbusResult":{"SlaveID":1,"Model":1,"Point":"Mn","Value":"SolarEdge |
|               |          |         | "}}                                                                                                     |
+---------------+----------+---------+---------------------------------------------------------------------------------------------------------+

The configuration I have for it in evcc.yaml is:

meters:
- type: template
  template: solaredge-inverter 
  id: 1
  host: 192.168.86.84  
  port: 1502  
  usage: grid  
  modbus: tcpip  
  name: grid1
- type: template
  template: solaredge-inverter 
  id: 102  
  host: 192.168.86.84  
  port: 1502  
  usage: pv  
  modbus: tcpip  
  name: pv2

It looks like the issue is coming from the https://github.com/volkszaehler/mbmd, file: sunspec.go#L76

d.subdevice is: 1 devices has 1 item in the array

Is there a missing config attribute I need to add?

premultiply commented 1 year ago

Have you connected a grid meter to your inverter at all?

cnovak commented 1 year ago

I do not have a grid meter, I enabled MODBUS over TCP Support on the inverter following the instructions PDF.

cnovak commented 1 year ago

NOTE Made a copy of this issue at EVCC project: https://github.com/evcc-io/evcc/issues/4749, maybe this is more applicable there versus here?