Skip to content

Instantly share code, notes, and snippets.

@mvillarejo
mvillarejo / gist:588bb4f3eec94e9e09cf48f7e82e145a
Created September 21, 2017 14:20
smartthings_to_sensor.py
"""
Smartthings to sensor MQTT listener
Subscribe for specific smartthings topic and dinamically create all the sensors
from SmartThings hub following a naming convention (case insensitive):
* BUTTON: Button xxxxx
* Door Sensors: DS xxxxx
* Motion Sensor: MS xxxxx
* Temperature and Humidity Sensor: THS