Merge branch 'main' of github.com:KevinMidboe/schleppeUPSConsumption

This commit is contained in:
2022-11-28 12:56:20 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -5,8 +5,8 @@ Pulls UPS power draw over ModBus and logs to ElasticSearch.
## Install ## Install
Download repo: Download repo:
``` ```bash
bash git clone https://github.com/kevinmidboe/schleppeUPSConsumption git clone https://github.com/kevinmidboe/schleppeUPSConsumption
cd schleppeUPSConsumption cd schleppeUPSConsumption
``` ```

View File

@@ -8,7 +8,7 @@ from logger import logger
config = getConfig() config = getConfig()
host = config['modbus']['host'] host = config['modbus']['host']
port = config['modbus']['port'] port = config['modbus']['port']
c = ModbusClient(host=host port=port, unit_id=1, auto_open=True) c = ModbusClient(host=host, port=port, unit_id=1, auto_open=True)
def getAmps(): def getAmps():
amps = c.read_holding_registers(140, 1) amps = c.read_holding_registers(140, 1)