Skip to content

tateg/kasa-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kasa Ruby

A Ruby wrapper for the TP-Link Kasa API

Base API URL: https://wap.tplinkcloud.com Regional URLs:

This is a simple Ruby wrapper that makes it easy to interact with the TP-Link Kasa Smart Home API. As long as you have generated an API Token and have a list of device IDs to interact with the usage is simple.

Create two .env files after pulling the repo: config.env & devices.env

  • Place your API token and API URL in config.env
API_TOKEN='<token>'
API_URL='<url>'
  • Place your device name => ID in devices.env
DEVICE_NAME='<id>'

Update the device.rb script to reference your device names in the BULBS and PLUGS arrays.

Turn devices on or off by calling:

device.rb on
device.rb off

Visit https://cynicalengineering.com to learn how to interact with the API further, generate a token and use this wrapper.

Releases

No releases published

Packages

No packages published

Languages