fix: Narrow MQTT subscription topic
This commit is contained in:
2
main.py
2
main.py
@@ -38,7 +38,7 @@ async def fetch_mqtt():
|
|||||||
hostname='10.55.0.106',
|
hostname='10.55.0.106',
|
||||||
port=1883,
|
port=1883,
|
||||||
) as client:
|
) as client:
|
||||||
await client.subscribe('#')
|
await client.subscribe('iot/12ser/#')
|
||||||
async for message in client.messages:
|
async for message in client.messages:
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.create_task(process_mqtt(message))
|
loop.create_task(process_mqtt(message))
|
||||||
|
|||||||
Reference in New Issue
Block a user