Skip to content

Commit

Permalink
Merge pull request #9 from alpsarica/main
Browse files Browse the repository at this point in the history
twin topic error fix
  • Loading branch information
nacidai authored Mar 13, 2024
2 parents c9b901f + 07da0cf commit de23621
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions agent/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def __init__(self):
self.gateway_to_agent_topic = self.get_parameter("gateway_to_agent_topic").value

self.thing_messages_topic = self.get_parameter("thing_messages_topic").value

self.twin_topic = f"{self.prefix}/{self.namespace}:{self.name}"

# MQTT Client
self.mqtt = Client(
Expand Down Expand Up @@ -94,9 +96,6 @@ def __init__(self):

self.pub_thing = self.create_publisher(Thing, self.thing_messages_topic, 10)

# Other
self.twin_topic = f"{self.prefix}/{self.namespace}:{self.name}"

def __del__(self):
self.mqtt.loop_stop()
self.mqtt.disconnect()
Expand Down

0 comments on commit de23621

Please sign in to comment.