Skip to content

Commit 777f035

Browse files
committed
summary.py and dailystats.py now also sends data to Domoticz and/or MQTT Broker
1 parent 227bba9 commit 777f035

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

README.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
- [debug.py](#debugpy)
1717
- [check\_monitor.py](#check_monitorpy)
1818
- [monitor\_utils.py](#monitor_utilspy)
19+
- [domoticz\_utils.py](#domoticz_utilspy)
20+
- [mqtt\_utils.py](#mqtt_utilspy)
1921
- [logging\_config.ini](#logging_configini)
2022
- [Raspberry pi configuration](#raspberry-pi-configuration)
2123
- [Running monitor.py infinitely and only running summary.py and dailystats.py when there is new cached server data received](#running-monitorpy-infinitely-and-only-running-summarypy-and-dailystatspy-when-there-is-new-cached-server-data-received)
@@ -131,10 +133,17 @@ I have installed the following packages (e.g. use python -m pip install "package
131133
pytz==2022.2.1
132134
requests==2.28.1
133135

134-
In hyundai_kia_connect_monitor summary.py and dailystats.py also the following packages are used:
136+
In monitor.py the following package is used:
137+
138+
paho_mqtt>=1.6.1,<2.0
139+
140+
*Note that paho_mqtt version 2.x is not (yet) supported*
141+
142+
In summary.py and dailystats.py also the following package is used:
135143

136144
gspread==5.6.2
137145

146+
138147
If everything works, it's a matter of regularly collecting the information, for example by running the "python monitor.py" command once an hour or infinite.
139148
A server is of course best, I use a Raspberry Pi, but it can also regularly be done on a Windows 10 or Mac computer, provided the computer is on.
140149

@@ -530,7 +539,7 @@ mqtt_broker_password =
530539
mqtt_main_topic = hyundai_kia_connect_monitor
531540
```
532541

533-
- set send_to_mqtt to True if you want to send updates to *.csv also to MQTT
542+
- set send_to_mqtt to True if you want to send information also to MQTT
534543
- mqtt_broker_hostname is the URL where to send the updates to
535544
- mqtt_broker_port is the port where to send the updates to
536545
- mqtt_broker_username is an optional username
@@ -1029,7 +1038,7 @@ You also can consider only to monitor between e.g. 6:00 and 22:00 (saves 1/3 of
10291038

10301039
---
10311040
# summary.py
1032-
make summary per TRIP, DAY, WEEK, MONTH, YEAR or a combination with monitor.csv as input or monitor.VIN.csv (latter if vin=VIN is given as parameter)
1041+
make summary per TRIP, DAY, WEEK, MONTH, YEAR or a combination with monitor.csv as input or monitor.VIN.csv (latter if vin=VIN is given as parameter). Support for Domoticz and/or MQTT Broker (e.g. HomeAssistant, ioBroker).
10331042

10341043
Usage:
10351044
```
@@ -1150,7 +1159,7 @@ And thereafter the last 122 lines of the summary in reverse order, so you do not
11501159

11511160
---
11521161
# dailystats.py
1153-
Read the daily stats, trip info and charge files and represent these in a nice formatted text, including computed totals.
1162+
Read the daily stats, trip info and charge files and represent these in a nice formatted text, including computed totals. Support for Domoticz and/or MQTT Broker (e.g. HomeAssistant, ioBroker).
11541163

11551164
*Note dailystats and tripinfo from hyundai_kia_connect_api is currently only available for Europe*
11561165

@@ -1246,6 +1255,14 @@ Python script for testing: print when the odometer between two monitor.csv entri
12461255
# monitor_utils.py
12471256
Generic utility methods, used by the other python scripts.
12481257

1258+
---
1259+
# domoticz_utils.py
1260+
Domoticz utility methods, used by the other python scripts.
1261+
1262+
---
1263+
# mqtt_utils.py
1264+
MQTT utility methods, used by the other python scripts.
1265+
12491266
---
12501267
# logging_config.ini
12511268
Configuration of default logging and formatting of logging.

0 commit comments

Comments
 (0)