|
|
|
|
|
|
|
|
datefmt="%d-%m-%Y %H:%M:%S") |
|
|
datefmt="%d-%m-%Y %H:%M:%S") |
|
|
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout)) |
|
|
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout)) |
|
|
|
|
|
|
|
|
client = mqtt.Client(RASPI_CLIENT_ID) |
|
|
|
|
|
# client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker |
|
|
|
|
|
|
|
|
# client = mqtt.Client(RASPI_CLIENT_ID) |
|
|
|
|
|
client = mqtt.Client(RASPI_CLIENT_ID, transport="websockets") # Local Broker |
|
|
client.on_connect = on_connect |
|
|
client.on_connect = on_connect |
|
|
client.connect(MQTT_BROKER_GLOBAL) |
|
|
|
|
|
# client.connect("192.168.137.197") # Local Broker |
|
|
|
|
|
|
|
|
# client.connect(MQTT_BROKER_GLOBAL) |
|
|
|
|
|
client.connect("192.168.137.197") # Local Broker |
|
|
|
|
|
|
|
|
logging.info("Robot initialised") |
|
|
logging.info("Robot initialised") |
|
|
|
|
|
|