Skip to content

Commit d67fbb3

Browse files
committed
Updated systemd service-file to handle RSSI and added additional logic to the restart function.
1 parent 13e78e2 commit d67fbb3

5 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ MQTT_PORT=1883
119119
MQTT_USER=_user_
120120
MQTT_PASSWORD=_password_
121121
LOGGING_LEVEL=INFO
122+
RSSI=--rssi
122123
```
123124

124125
```bash

evseMQTT.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ After=network.target dbus.service
44

55
[Service]
66
EnvironmentFile=/etc/default/evseMQTT
7-
ExecStart=/usr/local/bin/evseMQTT --address ${BLE_ADDRESS} --password ${BLE_PASSWORD} --unit ${UNIT} --mqtt --mqtt_broker ${MQTT_BROKER} --mqtt_port ${MQTT_PORT} --mqtt_user ${MQTT_USER} --mqtt_password ${MQTT_PASSWORD} --logging_level ${LOGGING_LEVEL} --rssi
7+
ExecStart=/usr/local/bin/evseMQTT --address ${BLE_ADDRESS} --password ${BLE_PASSWORD} --unit ${UNIT} --mqtt --mqtt_broker ${MQTT_BROKER} --mqtt_port ${MQTT_PORT} --mqtt_user ${MQTT_USER} --mqtt_password ${MQTT_PASSWORD} --logging_level ${LOGGING_LEVEL} ${RSSI}
88
Restart=always
99
RestartSec=10
1010

src/evseMQTT/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Constants:
2-
VERSION = "0.6.1"
2+
VERSION = "0.6.3"
33
PACKET_HEADER = "0601"
44

55
# BLE UUIDs

src/evseMQTT/event_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def handle_notification(self, sender, message):
156156

157157
# Device charge status -- not sure what we need these for
158158
if cmd in [5, 6]:
159-
self.logger.info(f"Device sent a charge status")
159+
self.logger.info(f"Device sent charging status")
160160

161161
# Device responded to charge_start
162162
if cmd == 7:

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def restart_run(self, address=None):
137137
# Reset initialization_state and software_version
138138
self.device.initialization_state = False
139139
self.device.logged_in = False
140-
self.device.info = {'software_version': None}
140+
self.device.info = {'software_version': None, 'serial': None}
141141

142142
await self.run(address)
143143

0 commit comments

Comments
 (0)