mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-03 08:28:20 +02:00
Initial plugin to directly send the values from the inverter to the volkszaehler middleware
This commit is contained in:
parent
e3b9abc5ff
commit
82f1562129
3 changed files with 112 additions and 0 deletions
|
@ -100,6 +100,9 @@ def poll_inverter(inverter, retries=4):
|
|||
if influx_client:
|
||||
influx_client.store_status(result)
|
||||
|
||||
if volkszaehler_client:
|
||||
volkszaehler_client.store_status(result)
|
||||
|
||||
def mqtt_send_status(broker, inverter_ser, data, topic=None):
|
||||
"""
|
||||
Publish StatusResponse object
|
||||
|
@ -247,6 +250,13 @@ if __name__ == '__main__':
|
|||
bucket=influx_config.get('bucket', None),
|
||||
measurement=influx_config.get('measurement', 'hoymiles'))
|
||||
|
||||
volkszaehler_client = None
|
||||
volkszaehler_config = ahoy_config.get('volkszaehler', {})
|
||||
if volkszaehler_config and not volkszaehler_config.get('disabled', False):
|
||||
from .outputs import VolkszaehlerOutputPlugin
|
||||
volkszaehler_client = VolkszaehlerOutputPlugin(
|
||||
volkszaehler_config)
|
||||
|
||||
g_inverters = [g_inverter.get('serial') for g_inverter in ahoy_config.get('inverters', [])]
|
||||
for g_inverter in ahoy_config.get('inverters', []):
|
||||
g_inverter_ser = g_inverter.get('serial')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue