diff --git a/MQTT.py b/MQTT.py index b49b19b..5c3660c 100755 --- a/MQTT.py +++ b/MQTT.py @@ -20,6 +20,7 @@ def valid(msg, client): if 'device_name' not in origin_data: client.publish('error', payload='device_name must be supplied', qos=0) return False + client.publish('error', payload=device_name, qos=0) if device_name != origin_data['device_name']: return False return True