Code for multi-switch posted to github

I’ve posted the code for my SmartThings multi-switch project to Github.

There you will find 3 files.

  1. smartthings_controller.ino – the Arduino code which communicated with the SmartThings cloud using the SmartThings Arduino library. I’m using an Uno.
  2. device_handler.groovy – the device handler code. This defines the device for use in the cloud and its UI in the SmartThings app. It is specific to the hardware, but not the use of the hardware.
  3. SmartApp.groovy – the SmartApp code. This defines how the device is used. In my app I tie specific hardware bits to specific device types (e.g. switch, switchLevel or musicPlayer).

For more information on the SmartThings IDE, writing SmartApps and related topic, have a look at these tutorials on the SmartThings developer site.