mpepping / solarman-mqtt

Send Solarman Smart PV inverter metrics to MQTT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send data of two inverters in one config

nicks-technik opened this issue · comments

Hi,
I have 2 micro-inverters which report in solarman.
For both I made a config.json which are working, but is it possible, to integrate both inverters into one config.json.
Something like the following?

{
 {
  "name": "TrannergyOne",
  "url": "api.solarmanpv.com",
  "appid": "app",
  "secret": "sec",
  "username": "1@test.com",
  "passhash": "345",
  "stationId": 111,
  "inverterId": 333,
  "loggerId": 555,
  "debug" : false,
  "mqtt":{
    "broker": "1.1.1.1",
    "port": 1883,
    "topic": "solarmanpv",
    "username": "",
    "password": ""
  }
 },
 {
  "name": "TrannergyTwo",
  "url": "api.solarmanpv.com",
  "appid": "app",
  "secret": "sec",
  "username": "1@test.com",
  "passhash": "345",
  "stationId": 222,
  "inverterId": 444,
  "loggerId": 666,
  "debug" : false,
  "mqtt":{
    "broker": "1.1.1.1",
    "port": 1883,
    "topic": "solarmanpv",
    "username": "",
    "password": ""
 }
} 

Is there a way to let such an example working?
Or how should I run the two configs?

Thank you

I still have no solultion to track my MICRO_INVERTERS with one config.json
Also this config.json is not working
[
{
"name": "TrannergyOne",
"url": "api.solarmanpv.com",
"appid": "app",
"secret": "sec",
"username": "1@test.com",
"passhash": "345",
"stationId": 111,
"inverterId": 333,
"loggerId": 555,
"debug" : false,
"mqtt":{
"broker": "1.1.1.1",
"port": 1883,
"topic": "solarmanpv",
"username": "",
"password": ""
}
},
{
"name": "TrannergyTwo",
"url": "api.solarmanpv.com",
"appid": "app",
"secret": "sec",
"username": "1@test.com",
"passhash": "345",
"stationId": 222,
"inverterId": 444,
"loggerId": 666,
"debug" : false,
"mqtt":{
"broker": "1.1.1.1",
"port": 1883,
"topic": "solarmanpv",
"username": "",
"password": ""
}
}
]
Output:
Creating network "solarman-mqtt_default" with the default driver
Creating solarman-mqtt ... done
Attaching to solarman-mqtt
solarman-mqtt | INFO:root:Starting daemonized with a 300 seconds run interval
solarman-mqtt | ERROR:root:Error on start: list indices must be integers or slices, not str

Help is very welcome.
Thank you

Hmm, good one. I'd suggest running two separate instances for now.