View Source TpLink (tp_link v0.4.0)

Client library for interacting with Kasa/TP-Link smart home devices via either tplinkcloud.com or directly over the local network. See the README for examples.

Link to this section Summary

Functions

Sends a command to a device and returns the response. Use cloud_device/2 or local_device/2 to generate a device struct.

Creates a device struct for a device that is accessed through the cloud. Generate a session with TpLink.Cloud.login/2.

Returns the system info.

Create a device struct for a device that is accessed via the local Wifi network.

Link to this section Functions

Sends a command to a device and returns the response. Use cloud_device/2 or local_device/2 to generate a device struct.

Link to this function

cloud_device(session, device_id)

View Source

Creates a device struct for a device that is accessed through the cloud. Generate a session with TpLink.Cloud.login/2.

Returns the system info.

Link to this function

local_device(ip_or_host, opts \\ [])

View Source

Create a device struct for a device that is accessed via the local Wifi network.

options

Options

  • :timeout (pos_integer/0) - Timeout in milliseconds. The default value is 5000.