Skip to content

Commit c34e9aa

Browse files
committed
debug: log MQTT topic and payload details
1 parent 162533e commit c34e9aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

inelsmqtt/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def __on_discover(
570570
self.__last_values[msg.topic] = msg.payload
571571
_LOGGER.info("Device of type %s found [connected].\n", device_type)
572572
else:
573-
if device_type == "gw" and action == "connected":
573+
if device_type == "gw" and action in ["connected", "status"]:
574574
if msg.topic not in self.__discovered:
575575
self.__discovered[msg.topic] = GATEWAY
576576
self.__last_values[msg.topic] = msg.payload
@@ -591,6 +591,7 @@ def __on_message(
591591
userdata (Any): Data about user
592592
msg (mqtt.MQTTMessage): Topic with payload from broker
593593
"""
594+
_LOGGER.debug("Received message - Topic: %s, Payload: %s", msg.topic, msg.payload)
594595
message_parts = msg.topic.split("/")
595596
device_type = message_parts[TOPIC_FRAGMENTS[FRAGMENT_DEVICE_TYPE]]
596597

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="elkoep-mqtt",
7-
version="0.2.33.beta.27",
7+
version="0.2.33.beta.28",
88
url="https://github.com/epdevlab/elkoep-mqtt",
99
license="MIT",
1010
author="Elko EP s.r.o.",

0 commit comments

Comments
 (0)