stjohnjohnson / smartthings-mqtt-bridge

Bridge between SmartThings and MQTT
https://hub.docker.com/r/stjohnjohnson/smartthings-mqtt-bridge/
MIT License
363 stars 242 forks source link

Added Temperature, Humidity & Contact Sensor Post/Call Back to SmartThings #207

Open JZ-SmartThings opened 4 years ago

JZ-SmartThings commented 4 years ago

I added Temperature, Humidity & Contact Sensor Post Back to SmartThings. Otherwise I had to use lame workarounds (like syncing with a switch). Modifying the SmartApp was so much simpler than any other solution. 10 lines of code but world of difference with these 3 capabilities and their read-only limitations in SmartThings.

Ultimately, being able to post these back to ST were big missing pieces for me. @stjohnjohnson I'd appreciate my enhancement pull becoming part of your release and respect your work very much! As an FYI, most of my code is a subset of pull #194 + a few more lines. However, the pull is just more narrow is scope and thus less code to verify. @gandazgul thanks for that pull.

davidcreager commented 3 years ago

Thanks for this, I needed it!!! I had to make a small change, not sure if it is a bug or not, but the code assumes the temperature is an int and at line 775 in the smartapp you have 'device.setTemperature(value as int), I simply replaced this with 'device.setTemperature(value)'

Thanks again