1. mqtt 单独服务更新到gzth中
This commit is contained in:
@@ -9,13 +9,12 @@ password = gzsthtz@126.com
|
||||
|
||||
[mqtt]
|
||||
# MQTT Broker connection details
|
||||
host = 1.12.37.24
|
||||
host = 43.143.225.150
|
||||
port = 1883
|
||||
username = odoo
|
||||
password = odoo123
|
||||
client_id = OdooMqttConnector
|
||||
|
||||
# A comma-separated list of topics to subscribe to for replies.
|
||||
# You can list multiple topics here.
|
||||
reply_topics =
|
||||
|
||||
[app]
|
||||
# How often to poll Odoo for new messages, in seconds.
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ async def main():
|
||||
# 2. Connect to MQTT and run tasks
|
||||
async with aiomqtt.Client(
|
||||
hostname=mqtt_cfg['host'],
|
||||
port=int(mqtt_cfg['port'])
|
||||
port=int(mqtt_cfg['port']),
|
||||
username=mqtt_cfg['username'],
|
||||
password=mqtt_cfg['password']
|
||||
) as client:
|
||||
logger.info(f"Connected to MQTT broker at {mqtt_cfg['host']}:{mqtt_cfg['port']}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user