mqtt-sensord/mqtt_sensord/mqttlib/base.py

21 lines
493 B
Python
Raw Normal View History

2019-07-09 22:01:39 +02:00
class MQTTClientBase:
def __init__(self, host, user, password, client_id):
self.host = host
self.user = user
self.password = password
self.client_id = client_id
self._connect()
def send_data(self, topic, data):
raise NotImplementedError("Send not implemented")
def _connect(self):
raise NotImplementedError("Connect not implemented")
2019-07-31 22:31:50 +02:00
def is_async(self):
return False
2021-01-10 23:32:09 +01:00
def process_mqtt(self):
pass