Device Handler with 2 contact sensors and motion sensor?

devicetype
arduino
developers

(Kevin) #1

Working on my garage ESP8266 Arduino and wondering if it is possible to have a DH with 2 or more “primary” sensors? By primary, referring to contact or motion sensors.

I know that it can be created, the problem is that SmartThings/SmartTiles can only see one device of each type it seems. In the past I have had this one ESP8266 with 2 door contacts, one motion, temp/humidity/lum. Wondering if I should make a DH specifically for doors, then use two instances of this DH with a preference for which door. Then a 2nd DH which is like a typical multi-sensor motion/temp/humidity/lum.


(Dan) #2

The only way I have been able to do so, is to create a virtual device for each of the sensors, and then use a SmartApp to link your Esp8266 DH’s custom attributes to corresponding virtual devices.

Check out my various examples of what I call a “Multiplexer SmartApp” and virtual DH’s as part of my ST_Anything project below.


(Evan) #3

@ogiewon do you have an example SmartApp on how link the virtual device to the custom attribute?


(Dan) #4

Yes. Check out my various “Multiplexer” SmartApps in my github repository.


(Evan) #5

@ogiewon thanks, I will check them out!