-
Follow the instructions at http://build.smartthings.com/arduino/ to get your shield paired with SmartThings
-
Create a new device type (https://graph.api.smartthings.com/ide/devices)
- Name: Arduino Relay Board
- Author: [email protected]
- Capabilities: Poll
- Custom Capabilities: RelayOn1, RelayOff1... through RelayOn8, RelayOff8 (see CustomCommands.png)
-
Switch your ThingShield to use the new device type:device/list)
- Go to https://graph.api.smartthings.com/device/list
- Click the Arduino/ThingShield device
- Press Edit
- Change the type to "Arduino Relay Board" - it will be near the bottom of the list
- Press Update
One of the (current) issues with the SmartThings system is that it doesn't support single devices with multiple identical capabilities (such as multiple switches). The workaround for this is to create separate 'virtual' switch devices which CAN be controlled from regular SmartApps. Then use a custom SmartApp to map events on these virtual switches to the relay board.
There is a discussion of this problem here
See VirtualSwitch.groovy and VirtualSwitchParent.groovy for examples.