Skip to content

Commit

Permalink
Update hugs feature to use standard 'out' topic
Browse files Browse the repository at this point in the history
  • Loading branch information
techman83 committed Jan 24, 2021
1 parent 0d35be2 commit 82a1466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/aiko/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
topic_in = None
topic_log = None
topic_out = None
topic_hugs = None
topic_path = None
topic_service = None
topic_state = None
Expand Down Expand Up @@ -84,7 +83,7 @@ def on_services_message(topic, payload_in):

def initialise(settings=configuration.services.settings):
global protocol, username, topic_in, topic_log
global topic_path, topic_out, topic_service, topic_state, topic_hugs
global topic_path, topic_out, topic_service, topic_state

hostname, pid, protocol, username = get_configuration(settings)
mqtt_host, mqtt_port, namespace = bootstrap()
Expand All @@ -94,7 +93,6 @@ def initialise(settings=configuration.services.settings):
topic_out = topic_path + "/out"
topic_service = namespace + "/manager/service"
topic_state = topic_path + "/state"
topic_hugs = topic_path + "/hugs"

settings = configuration.mqtt.settings
settings["host"] = mqtt_host
Expand Down
2 changes: 1 addition & 1 deletion lib/aiko/system_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def hugs_feature():
oled.oleds_system_use(True)
oled.oleds_show_log(hugs_message)
# TODO: Make recipient configurable?
mqtt.client.publish(services.topic_hugs, "Leon")
mqtt.client.publish(services.topic_out + "/hugs" , "Leon")
oled.oleds_system_use(False)

features = [
Expand Down

0 comments on commit 82a1466

Please sign in to comment.