Skip to content

Instantly share code, notes, and snippets.

@anoop4real
Created May 24, 2018 03:31
Show Gist options
  • Select an option

  • Save anoop4real/cb5f10d6e089f3596305c51781541e08 to your computer and use it in GitHub Desktop.

Select an option

Save anoop4real/cb5f10d6e089f3596305c51781541e08 to your computer and use it in GitHub Desktop.
Python files for Raspberry Pi MQTT
import paho.mqtt.publish as publish
MQTT_SERVER = "localhost"
MQTT_PATH = "test_channel"
publish.single(MQTT_PATH, "This is a response from Raspberry Pi", hostname=MQTT_SERVER)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment