TP_Link
tp_link allows you to interact with TP-Link smart lights.
Installation
Add this line to your application's Gemfile:
gem 'tp_link'
And then execute:
$ bundle
Or inst all it yourself as:
$ gem tp_link
Usage
require 'tp_link'
#
sh=TPLink::SmartHome.new('user' => 'test@example.com',
'password' => 'password123')
# Get array of TPLink Devices
sh.devices
# Find a device by name:
light = sh.find("kitchen")
# Turn light on
light.on
# Turn light off
light.off
# Dim light to 50%
light.on(50)
Documentation
Contributing
Bug reports and pull requests are welcome on ruby-code.com at https://ruby-code.com/james/tp_link
License
The gem is available as open source under the terms of the MIT License.