Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python-MQTT Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WZL-IQS-Public
Internet of Things
Python-MQTT Library
Commits
82ef4d2b
Commit
82ef4d2b
authored
2 years ago
by
Matthias Stefan Bodenbenner
Browse files
Options
Downloads
Patches
Plain Diff
8.2.3
parent
b8b535f6
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#249828
passed
2 years ago
Stage: deploy
Stage: build
Stage: push
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
PyPI-README.md
+5
-1
5 additions, 1 deletion
PyPI-README.md
README.md
+5
-1
5 additions, 1 deletion
README.md
doc/source/usage.rst
+2
-7
2 additions, 7 deletions
doc/source/usage.rst
setup.py
+1
-1
1 addition, 1 deletion
setup.py
src/mqtt/client.py
+2
-2
2 additions, 2 deletions
src/mqtt/client.py
with
15 additions
and
12 deletions
PyPI-README.md
+
5
−
1
View file @
82ef4d2b
# WZL-MQTT
# WZL-MQTT
Current stable version: 2.5.
1
Current stable version: 2.5.
2
## Documentation
## Documentation
...
@@ -78,6 +78,10 @@ while True:
...
@@ -78,6 +78,10 @@ while True:
```
```
## Changelog
## Changelog
**2.5.2**
- 2023-03-29
-
client handles slash in at the end of prefix and the beginning of topic to avoid multiple consecutive slashes correctly now
2.
5.1
2.
5.1
-
increased verbosity in case of errors by including the full stack trace
-
increased verbosity in case of errors by including the full stack trace
...
...
This diff is collapsed.
Click to expand it.
README.md
+
5
−
1
View file @
82ef4d2b
# WZL-MQTT
# WZL-MQTT
Current stable version: 2.5.
1
Current stable version: 2.5.
2
## Documentation
## Documentation
...
@@ -89,6 +89,10 @@ European Metrology Programme for Innovation and Research EMPIR). The EMPIR initi
...
@@ -89,6 +89,10 @@ European Metrology Programme for Innovation and Research EMPIR). The EMPIR initi
the European Union’s Horizon 2020 research and innovation programme and the EMPIR Participating States.
the European Union’s Horizon 2020 research and innovation programme and the EMPIR Participating States.
## Changelog
## Changelog
**2.5.2**
- 2023-03-29
-
client handles slash in at the end of prefix and the beginning of topic to avoid multiple consecutive slashes correctly now
2.
5.1
2.
5.1
-
increased verbosity in case of errors by including the full stack trace
-
increased verbosity in case of errors by including the full stack trace
...
...
This diff is collapsed.
Click to expand it.
doc/source/usage.rst
+
2
−
7
View file @
82ef4d2b
...
@@ -30,20 +30,15 @@ Receiving MQTT Messages
...
@@ -30,20 +30,15 @@ Receiving MQTT Messages
logger = mqtt.root_logger.get('Receiver')
logger = mqtt.root_logger.get('Receiver')
# username and password required to connect to the broker
MQTT_USER = ""
MQTT_USER = ""
MQTT_PASSWORD = ""
MQTT_PASSWORD = ""
# address, port and virtual host of the broker to connect to
MQTT_BROKER = "127.0.0.1"
MQTT_BROKER = "127.0.0.1"
MQTT_PORT = 1883
MQTT_PORT = 1883
MQTT_VHOST = "/"
MQTT_VHOST = "/"
## To connect to the central MQTT-Broker of MQ-MS use the settings below.
## Ask Mark Sanders (sdr) or Matthias Bodenbenner (bdn) for personal credentials.
## Set the "ssl" flag of the connect function to "True".
# MQTT_BROKER = "mqtt.wzl-mq.rwth-aachen.de"
# MQTT_PORT = 8883
# MQTT_VHOST = "metrology"
topic = "#" # set topic to subscribe according to MQTT syntax!
topic = "#" # set topic to subscribe according to MQTT syntax!
qos = 0 # set QoS according to MQTT specifications!
qos = 0 # set QoS according to MQTT specifications!
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
82ef4d2b
...
@@ -4,7 +4,7 @@ with open("PyPI-README.md", "r", encoding="utf-8") as fh:
...
@@ -4,7 +4,7 @@ with open("PyPI-README.md", "r", encoding="utf-8") as fh:
long_description
=
fh
.
read
()
long_description
=
fh
.
read
()
setup
(
name
=
'
wzl-mqtt
'
,
setup
(
name
=
'
wzl-mqtt
'
,
version
=
'
2.5.
1
'
,
version
=
'
2.5.
2
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/
'
,
url
=
'
https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/
'
,
project_urls
=
{
project_urls
=
{
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/-/issues
"
,
"
Bug Tracker
"
:
"
https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/-/issues
"
,
...
...
This diff is collapsed.
Click to expand it.
src/mqtt/client.py
+
2
−
2
View file @
82ef4d2b
...
@@ -210,7 +210,7 @@ class MQTTPublisher(MQTTClient):
...
@@ -210,7 +210,7 @@ class MQTTPublisher(MQTTClient):
"""
"""
try
:
try
:
if
self
.
prefix
is
not
None
and
self
.
prefix
!=
""
:
if
self
.
prefix
is
not
None
and
self
.
prefix
!=
""
:
self
.
_client
.
publish
(
self
.
prefix
+
"
/
"
+
topic
.
strip
(
"
/
"
),
self
.
_client
.
publish
(
self
.
prefix
.
strip
(
"
/
"
)
+
"
/
"
+
topic
.
strip
(
"
/
"
),
message
,
qos
,
retain
)
message
,
qos
,
retain
)
else
:
else
:
self
.
_client
.
publish
(
topic
.
strip
(
"
/
"
),
message
,
qos
,
retain
)
self
.
_client
.
publish
(
topic
.
strip
(
"
/
"
),
message
,
qos
,
retain
)
...
@@ -272,7 +272,7 @@ class MQTTSubscriber(MQTTClient):
...
@@ -272,7 +272,7 @@ class MQTTSubscriber(MQTTClient):
SubscriptionError: If topic could not be subscribed successfully.
SubscriptionError: If topic could not be subscribed successfully.
"""
"""
try
:
try
:
topic
=
f
'
{
self
.
prefix
}
/
{
topic
}
'
if
self
.
prefix
is
not
None
and
self
.
prefix
!=
""
else
topic
topic
=
f
'
{
self
.
prefix
.
strip
(
"
/
"
)
}
/
{
topic
.
strip
(
"
/
"
)
}
'
if
self
.
prefix
is
not
None
and
self
.
prefix
!=
""
else
topic
for
s
in
self
.
_subscriptions
:
for
s
in
self
.
_subscriptions
:
if
s
[
"
topic
"
]
==
topic
:
if
s
[
"
topic
"
]
==
topic
:
raise
RuntimeError
(
raise
RuntimeError
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment