modify: internal_mqtt 测试
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
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())
|
||||||
Reference in New Issue
Block a user