Project

tp_link

0.0
No commit activity in last 3 years
No release in over 3 years
Control various TPLink smart home devices.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.13, >= 0.13.1
~> 0.12, >= 0.12.2
 Project Readme

pipeline status

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.