meshcore_py/examples/tcp_mchome_infos.py

18 lines
249 B
Python
Raw Normal View History

2025-03-29 12:32:10 +01:00
#!/usr/bin/python
import asyncio
2025-03-30 08:36:39 +02:00
from meshcore import MeshCore
2025-03-29 12:32:10 +01:00
HOSTNAME = "mchome"
PORT = 5000
2025-04-08 22:56:16 -07:00
async def main():
mc = await MeshCore.create_tcp(HOSTNAME, PORT)
2025-03-29 12:32:10 +01:00
print(mc.self_info)
2025-04-08 22:56:16 -07:00
await mc.disconnect()
2025-03-29 12:32:10 +01:00
asyncio.run(main())