def subscribe_topics(self):
base = self.topic<EOL>subscribe = self.mqtt.subscribe<EOL>subscribe(b"<STR_LIT:/>".join((base, b"<STR_LIT>")))<EOL>subscribe(b"<STR_LIT:/>".join((self.settings.MQTT_BASE_TOPIC, b"<STR_LIT>")))<EOL>nodes = self.nodes<EOL>for node in nodes:<EOL><INDENT>for topic in node.subscribe:<EOL><INDENT>topic = b"<STR_LIT:/>".join((base, topic))<EOL>subscribe(topic)<EOL>self.topic_callbacks[topic] = node.callback<EOL><DEDENT><DEDENT>
subscribe to all registered device and node topics