Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6bfce5a652 | |||
cb7c2c63fb |
@@ -11,3 +11,6 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## [1.0.0] - 2022-10-28
|
## [1.0.0] - 2022-10-28
|
||||||
First working version.
|
First working version.
|
||||||
|
|
||||||
|
## [1.0.1] - 2022-11-10
|
||||||
|
Program used 100% cpu due to inefficient while-loop. Fixed.
|
||||||
|
@@ -39,7 +39,7 @@ Subscribes to one or more MQTT topics, and lets you configure prometheus metrics
|
|||||||
- Create a folder to hold the config (default: `conf/`)
|
- Create a folder to hold the config (default: `conf/`)
|
||||||
- Add metric config(s) in YAML format to the folder. Files are combined and read as a single config. (See `exampleconf/metric_example.yaml` for details)
|
- Add metric config(s) in YAML format to the folder. Files are combined and read as a single config. (See `exampleconf/metric_example.yaml` for details)
|
||||||
- Install dependencies with `pip3 install -r requirements-frozen.txt`
|
- Install dependencies with `pip3 install -r requirements-frozen.txt`
|
||||||
- Run `./mqtt_exporter.py`
|
- Run `./victron_mqtt_exporter.py`
|
||||||
|
|
||||||
|
|
||||||
## Python dependencies
|
## Python dependencies
|
||||||
|
@@ -633,15 +633,16 @@ def main():
|
|||||||
victron_mqtt_keep_alive(mqtt_client)
|
victron_mqtt_keep_alive(mqtt_client)
|
||||||
|
|
||||||
# Get system time for keepalive delay loop
|
# Get system time for keepalive delay loop
|
||||||
starttime = time.time()
|
#starttime = time.time()
|
||||||
|
|
||||||
while 1 == 1:
|
while 1 == 1:
|
||||||
|
|
||||||
# Should be called every 30 seconds to keep Victron Energy Cebo GX awake (keepalive)
|
# Should be called every 30 seconds to keep Victron Energy Cebo GX awake (keepalive)
|
||||||
if time.time() - starttime > 30:
|
time.sleep(30)
|
||||||
|
#if time.time() - starttime > 30:
|
||||||
#logging.info(f"Keepalive")
|
#logging.info(f"Keepalive")
|
||||||
victron_mqtt_keep_alive(mqtt_client)
|
victron_mqtt_keep_alive(mqtt_client)
|
||||||
starttime = time.time()
|
#starttime = time.time()
|
||||||
|
|
||||||
loop_stop()
|
loop_stop()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user