Skip to content

Instantly share code, notes, and snippets.

View vinceskahan's full-sized avatar

vinceskahan

  • Federal Way WA, USA
View GitHub Profile
@tomconte
tomconte / send_iot-hub_paho_mqtt.py
Created May 12, 2016 09:32
This is a simple example showing how to use the [Paho MQTT Python client](https://eclipse.org/paho/clients/python/) to send data to Azure IoT Hub. You need to assemble the rights credentials and configure TLS and the MQTT protocol version appropriately.
#!/usr/bin/python
import paho.mqtt.publish as publish
import paho.mqtt.client as mqtt
import ssl
auth = {
'username':"ciscohackhub.azure-devices.net/lora1",
'password':"SharedAccessSignature sr=ciscohackhub.azure-devices.net%2Fdevices%2Flora1&sig=xxxx&se=1463048772"
}