Example #1
0
def on_message(client, userdata, msg):
    print(msg.topic + " " + str(msg.payload))
    message = str(msg.payload)

    if msg.topic == "backendIn/led":
        publish_new("arduinoIn/led", message, "192.168.43.252")

    if msg.topic == "backendIn/motr":
        publish_new("arduinoIn/motor", message, "192.168.43.252")
Example #2
0
def on_message(client, userdata, msg):
	print(msg.topic + " " + str(msg.payload))
	message = str(msg.payload)

	if msg.topic == "arduinoOut/led"
		publish_new("backendOut/led",str(msg.payload),BACK_END_MQTT_SERVER)

	if msg.topic == "arduinoOut/motor"
		publish_new("backendOut/led",str(msg.payload),BACK_END_MQTT_SERVER)
Example #3
0
def on_message(client, userdata, msg):
	print(msg.topic + " " + str(msg.payload))
	message = str(msg.payload)

	if msg.topic == "backendIn/led":
		publish_new("arduinoIn/led",message,"192.168.43.252")

	if msg.topic == "backendIn/motr":
		publish_new("arduinoIn/motor",message,"192.168.43.252")