Skip to content

Commit 3d345b9

Browse files
committed
Feature release 2023.10.5
1 parent fe24881 commit 3d345b9

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11

2+
## [2023.10.5] - 2023-10-22 Bugfix Release
3+
4+
- Fixed missing message retain
5+
6+
- Fixed invalid topic for missing root prefix issue
7+
8+
29
## [2023.10.3] - 2023-10-22 New Features
310

411
- Support rpc topic for changing coil states (see examples/Unipi-Neuron example)

modbus2mqtt.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ def on_message(self, client, userdata, message):
8080
subscriber.enqueue(data)
8181
return 0
8282

83-
def publish(self, topic: str, value: str):
83+
def publish(self, topic: str, value: str, retain: bool = True):
8484
if self.is_connected is not True:
8585
return False
8686
t = topic
8787
if self.topic_prefix is not None:
8888
t = self.topic_prefix + '/' + t
8989
log.debug("Publishing topic %s value %s", t, value)
90-
ret = self.client.publish(t, value)
90+
ret = self.client.publish(t, value, retain=retain)
9191
if ret[0] != 0:
9292
log.error("Failed to deliver %s", t)
9393
return False

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "modbus2mqtt"
3-
version = "2023.10.4"
3+
version = "2023.10.5"
44
description = "Gateway between Modbus TCP devices and MQTT."
55
authors = ["Marcus Zoller <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)