Fixed messages not arriving
This commit is contained in:
		@@ -11,6 +11,8 @@ from db import db
 | 
				
			|||||||
from marshm import ma
 | 
					from marshm import ma
 | 
				
			||||||
from mqtt_flask_instance import mqtt
 | 
					from mqtt_flask_instance import mqtt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import mqtt_methods  # This file contains a decorator
 | 
				
			||||||
 | 
					
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
Main Flask RESTful API
 | 
					Main Flask RESTful API
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ sensorschema = SensorSchema(many=False)
 | 
				
			|||||||
LOGGER = logging.getLogger(__name__)
 | 
					LOGGER = logging.getLogger(__name__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@mqtt.on_message()
 | 
					@mqtt.on_topic(f"{config.MQTT_STATUS_TOPIC}/#")
 | 
				
			||||||
def handle_status_message(client, userdata, message):
 | 
					def handle_status_message(client, userdata, message):
 | 
				
			||||||
    data = dict(
 | 
					    data = dict(
 | 
				
			||||||
        topic=message.topic,
 | 
					        topic=message.topic,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user