Applications
Use the Paho MQTT python library
TX54 User Guide
722
client.publish(PREFIX "/system", json.dumps(msg))
runt.start()
serial = runt.get("system.serial")
PREFIX = "router/" + serial
PREFIX_EVENT = "event/" + PREFIX
PREFIX_CMD = "cmd/" + PREFIX
PREFIX_RSP = "rsp/" + PREFIX
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
try:
client.connect("192.168.1.100", 1883, 60)
client.loop_start()
except:
print("Failed to connect to MQTT server")
sys.exit(1)
while True:
publish_dhcp_leases()
publish_system()
time.sleep(POLL_TIME)
Summary of Contents for TX54
Page 1: ...TX54 User Guide Firmware version 22 2 ...
Page 190: ...Interfaces Bridging TX54 User Guide 190 ...
Page 293: ...Hotspot Hotspot configuration TX54 User Guide 293 ...
Page 332: ...Hotspot Show hotspot status and statistics TX54 User Guide 332 ...
Page 584: ...Services Simple Network Management Protocol SNMP TX54 User Guide 584 4 Click Download ...