jedie / inverter-connect

Get information from Deye Microinverter
https://pypi.org/project/inverter-connect/
25 stars 7 forks source link

Multiple inverter in settings #123

Open basti122303 opened 4 months ago

basti122303 commented 4 months ago

Hello, I have multiple deye_2mppt inverter. Is there a way to configure it in settings for mqtt-loop? When I try it like this:

[inverter]
# The "name" is the prefix of "inverter/definitions/*.yaml" files!
# 
# Set "ip" of the inverter if it's always the same. (Hint: Pin it in FritzBox settings ;)
# You can leave it empty, but then you must always pass "--ip" to CLI commands.
# Even if it is specified here, you can always override it in the CLI with "--ip".
name = "deye_2mppt"
ip = "inverter_1"
port = 48899

name = "deye_2mppt"
ip = "inverter2"
port = 48899

I got an exception: tomlkit.exceptions.KeyAlreadyPresent: Key "name" already exists.

SebStaeubert commented 1 month ago

You can use the "--ip" option to poll a specific inverter one after the other, e.g. ./cli.py print-values --ip <ip...1>; ./cli.py print-values --ip <ip..n>

I use kbialek/deye-inverter-mqtt to publish the data from multiple inverters to mqtt.

The "--ip" option is defined in the publish-loop function, too: https://github.com/jedie/inverter-connect?tab=readme-ov-file#publish-loop So i think, you can start a publish-loop command for each inverter. But i have no experience doing that and no idea how the mqtt-topics for each inverter look like. But you can try - good luck! :-)