From b52c7d3c0d4e97a604b5b962582c82e9d83ca211 Mon Sep 17 00:00:00 2001 From: niemijoe Date: Mon, 22 Aug 2022 15:31:44 +0300 Subject: [PATCH] dimValue key has now topic address, topic name and topic port --- mqtt_data_collector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mqtt_data_collector.py b/mqtt_data_collector.py index 9339a7e..7938344 100644 --- a/mqtt_data_collector.py +++ b/mqtt_data_collector.py @@ -123,7 +123,8 @@ def main(): if time.time() > time_end: topic_data_map = {} for topic in topic_list: - topic_data_map[topic.topic_name] = topic.msg_count + topic_data_map_key = f"{topic.topic_address}:{topic.topic_name}:{topic.topic_port}" + topic_data_map[topic_data_map_key] = topic.msg_count topic.msg_count = 0 if IS_DEBUG: