Last active
August 15, 2019 08:48
-
-
Save bphermansson/a201c8a40832d5f00997522146885363 to your computer and use it in GitHub Desktop.
Simple Python script that just publish a message to a MQTT-broker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import paho.mqtt.publish as publish | |
publish.single("mqttjs", "Hello from mqttjs", hostname="192.168.1.190") | |
// If using web sockets: | |
publish.single("mqttjs", "Hello from mqttjs", hostname="192.168.1.190", port=9001, transport='websockets') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment