2 releases

0.1.1 Jun 13, 2023
0.1.0 Jun 8, 2023

#1087 in Embedded development

Download history 4/week @ 2024-02-18 10/week @ 2024-02-25 1/week @ 2024-03-03 12/week @ 2024-03-10 41/week @ 2024-03-31

53 downloads per month
Used in drmemd

MIT license

81KB
1.5K SLoC

drmem-drv-tplink

This driver supports WiFi devices that use the TP-Link protocol.

This driver doesn't access a user's TP-Link account to find the hardware; DrMem wants to control things locally -- even when the Internet isn't available. To make this work reliably, you should assign a fixed address for the device using its MAC address and the configuration in your DHCP service (typically in your router.)

Tested Devices

This table contains products that are known to work with this driver.

Device Model Vendor Description
HS220 Kasa Dimmer switch. Note: it takes around 200ms for this module to respond to a command. In some instances, it took ~1s! So don't try controlling it rapidly.

Configuration

The driver needs to know where to access the device.

  • addr is a string containing the host name, or IP address, and port number of the TP-Link device (in "hostname:#" or "#.#.#.#:#" format.) The port is almost always 9999.

Devices

The driver creates these devices:

Base Name Type Units Comment
error bool, RO If true, there is an error communicating with the device.
brightness f64 , RW % Accepts 0 - 100 for percent brightness. If the value is out of range, it will be brought back in range.
led bool, RW true and false turn the LED indicator on and off, respectively.

History

Added in v0.3.0.

Dependencies

~6–17MB
~197K SLoC