diff --git a/test_internal_mqtt_client.py b/test_internal_mqtt_client.py new file mode 100644 index 0000000..b114e7d --- /dev/null +++ b/test_internal_mqtt_client.py @@ -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()) \ No newline at end of file