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

Requesting additional data in mqtt payload #195

Open thisisbenwoo opened 5 years ago

thisisbenwoo commented 5 years ago

Hi,

First, thanks for the code, and second, thanks to all the contributors for posing and answering questions. I am using an OSRAM Sylvania Lightify Dimming Switch 73743 with SmartThings. The switch has two buttons, and has the capability of providing dimming through holding.

In integrating this with SmartThings, it only recognizes it as a Zigbee Button. However, the button gives more than a pushed or not pushed state. In the details of the device, it gives 3 different states:

I'm very much hoping that you could update your code to parse all these states, as I want to use the button number to determine whether someone is turning the lights on or off, so button 1 would be ON, and button 2 would be OFF.

Is this possible?

For further information, there are two guides:

  1. https://community.smartthings.com/t/faq-sylvania-battery-power-dimming-switch-model-73743-why-there-are-three-different-dths-to-choose-from/107714
  2. https://community.smartthings.com/t/release-osram-lightify-smart-dimmer-switch-button-controller-device-handler-and-smart-app/39039

I'm using the latter because it gives me the ability to get dimming functions.

Many thanks in advance.

thisisbenwoo commented 5 years ago

Well, I resolved it myself! I changed device handlers to: SmartThingsPublic/devicetypes/adamoutler/lightify-dimming-switch-zigbee.src/lightify-dimming-switch-zigbee.groovy

and it gives on/off which is good enough for me!! 👍

thisisbenwoo commented 5 years ago

Just another quick follow on, it seems that all of the various DTH provide extra info, while the one I noted above gives a simple on/off, it seems want to remember the last state, so if I pressed off, the lights go off, but if I then turn the lights back on with an Alexa command, it will not send another off command when I press the off button.

So, if at all possible, can the bridge provide more info in the payload please? Thank you again.