20 lines
553 B
Python
20 lines
553 B
Python
from chongming_mqtt import InternalMQTTClient
|
|
import asyncio
|
|
|
|
client = InternalMQTTClient(uri="mqtt://admin:Mixc%402021@dg.datagoo.cn:48081")
|
|
|
|
async def main():
|
|
await client.start()
|
|
|
|
resp = await client.request(
|
|
request_topic="/edge_app_controller",
|
|
response_topic="/edge_app_controller_reply",
|
|
payload={"Event":"/alg_media_fetch","BoardId":"RJ-BMOX-0DCB100E3F0F4C8DEE2D189DC4DB2DAE"},
|
|
timeout=5
|
|
)
|
|
print(f"Response: {resp}")
|
|
await client.stop()
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|
|
|