From 8c62d078cc52c1961040b7755cc6c44e96de71b5 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Sat, 2 Dec 2023 10:34:03 +0800 Subject: [PATCH] test --- MQTT.py | 6 +- __pycache__/api.cpython-310.pyc | Bin 929 -> 1169 bytes __pycache__/tool.cpython-310.pyc | Bin 857 -> 858 bytes ceshi.py | 107 +++++++++++++++---------------- update.sh | 1 + 5 files changed, 54 insertions(+), 60 deletions(-) diff --git a/MQTT.py b/MQTT.py index e5b9a40..501de0f 100644 --- a/MQTT.py +++ b/MQTT.py @@ -8,7 +8,7 @@ from tool import push_stream, close_stream, update, exec_sh class MQTT: def on_connect(self, client, userdata, flags, rc): if rc == 0: - client.subscribe('lot_stream') + client.subscribe('lot_mqtt') # Message receiving callback def on_message(self, client, userdata, msg): @@ -34,12 +34,12 @@ class MQTT: def __init__(self): self.client = mqtt.Client() - self.client.username_pw_set("ceshi", "123456") + self.client.username_pw_set("demo", "123456") # Specify callback function self.client.on_connect = self.on_connect self.client.on_message = self.on_message # Establish a connection - self.client.connect('60.204.152.17', 1883) + self.client.connect('ceshi-mqtt.lihaink.cn', 1883) # Publish a message self.client.loop_forever(retry_first_connection=True) diff --git a/__pycache__/api.cpython-310.pyc b/__pycache__/api.cpython-310.pyc index 61c07879042cf82cea2f9de7fdfda0f6d51f1bc7..de2f028115c3a80e0a2188cbabaa543be2f1a2f3 100644 GIT binary patch delta 636 zcmZ8dO=}cE5UuK&%=FC8Og5`g(Of(RA>dU+2yQNtkHZFnEx4@PoiMtcS$bMxmW>e- zym=Vbv*2-mgBSf9bMo%hyH<~h5gYo|>+0%PuljRXMOl%iG0^(){-s*;s%!-()xG=M zIus#-1nG~sjzpwm5$l#{=|m(=eqogAOk~6Z73?z^N`CH(MH$KX97J2TWI}OCVh>i+ z>eJ0Ttmd0LyZ!F^?s}bFvi{aicVn~q`t8Bo+s=O?z?{|ou#l?uba}AqnFaD@7(pFv zycw#o&5Of1GtP63Y7V9|`-0C;uhV(x$}X2j#1%cJU3Lj3k%cKt@r)r@JcB*xfe)4) z-$gi~+$6Cmampn7!1f@3r!@Tud&_zk@d%H=v`C0daSDwov)ClWlen}4WBWGON^o^3 z8)lYVUFR=cBUT4ejg(c+aG4P>jFDr8w~)VMzs&ONHhcBVInO`RcbJ42bqpw6bu?{v z{7;x4DBG6Kg@;2-c$sBa^PdzhU!%zHDX^K1v1@4E!w+e0EFS_bPdEjPCX5J5zHVyBF=)ZtF* zayRYrZliZ5Ug~onxh1VJ6}DjWHV=d&+&SS(0?tU-{WMpPL#VyISj$tX^K7am&g}3c z8to6GVfpa_Vf6%S8*Q{IicmWTw^uSRl5D!5$}tMa1yQ}~9WJ0>ebJk9qb84l8>V>J zQXTx7ZRHyl80h`MGP0Uo%VH$rB3{Kw8wUjoJP2R_?4EwB6_mnW_1ZcrxGyfZl*}`o z6q&kHO}Qq+LX)x)xIK<_5$B0wM(P_d7yiXI1%9)4(oD=Iau+KTZM=*yVAR9>0eCcM GdF%)CZBRA< diff --git a/__pycache__/tool.cpython-310.pyc b/__pycache__/tool.cpython-310.pyc index f7a1fa9d9c9bb5e4f73f951b2d061b97b2104a2e..f549089987e014fd70635e81013dc57c6197b975 100644 GIT binary patch delta 94 zcmcb~c8iTSpO=@50SE-zvr=6)^2#%@vZN%IBu+M9vSGc&oSd67xsXYXQG9X~qw3_n lOsicc