An Example using Roku to Control a dlink Smart Plug over the network
Brightscript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
components
images
source
.project
README.md
hqdefault.jpg
manifest

README.md

Roku-mydlink-Home-Smart-Plug

An Example using Roku to Control a dlink Smart Plug over the network

Requirements

  1. A Roku that is in developmer mode
  2. An Account at IFTTT
  3. A Dlink Wi-Fi Smart Plug
  4. A Text Editor (for full Roku Brightscript Development use Eclipse IDE for Java Developers with the Roku SDK Plugin)

Setup

The Smart Plug

  1. Grab your dlink username & password
  2. Successfully connect your smart plug to the network and verify it is functioning correctly from the Android or iOS application.

IFTTT

  1. Login to IFTTT
  2. Navigate to Maker WebHooks
  3. Enable your webhooks and access the 'documentation' button in the top right of the page
  4. Copy the key, we will need this for the Roku Code section coming up
  5. Return to your Applets and create a new Applet
  6. For THIS select Maker Webhooks and name your request (you will also need this name coming up)
  7. For THAT we will be selecting the DLINK SMART PLUG and Toggling it On/Off for 30 seconds.
  8. Return to the documentation at Maker WebHooks and enter your new event name from step 6
  9. Verify it toggles your plug on/off

The Roku Code

  1. open 'components/SimpleTask.xml' in an editor
  2. change '{YOUR API KEY HERE}' to the API Key you generated in IFTTT step 4.
  3. change '{EVENT}' to the event name you generated in IFTTT step 6.
  4. rezip the directory and use the Roku Development Portal (usually 192.168.1.12) to upload the package. Note: Updating the package instantly fires the command we set up in IFTTT earlier.

Demo

Be9Concepts YouTube