TPLink Smart Home Plugin for Homebridge (formerly homebridge-hs100)
Clone or download
lint2015 and plasticrake Updated number formats used in characteristics and fixed compatibilit…
…y with newer HS110 revisions (#62)

* Updated characteristic number formats

Updated all characteristic number formats to reflect updated formats found here:

* Fixed compatibility with newer HS110 revisions

Fixed inUseThreshold comparison for compatibility with newer HS110 hardware and software revisions that return energy metrics in much smaller units. The threshold-based inUse state requires the corresponding fix in tplink-smarthome-api to function correctly.
Latest commit e7421c3 Jun 21, 2018


NPM Version js-semistandard-style

TPLink Smart Home Plugin for Homebridge. (formerly homebridge-hs100)

Models Supported

  • Plugs: HS100, HS105, HS110, HS200
  • Bulbs: LB100, LB110, LB120, LB130, LB200, LB230


  1. Node v6.5 or greater is required. Check by running: node --version
  2. Install Homebridge using: npm install -g homebridge or sudo npm install -g --unsafe-perm homebridge (more details)
  3. Install this plugin using: npm install -g homebridge-tplink-smarthome
  4. Update your configuration file. See the sample below.


  • npm update -g homebridge-tplink-smarthome

Note for Previous Users of homebridge-hs100

If you had homebridge-hs100 installed previously, due to how homebridge works, you may get this error on startup: Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory:. You'll need to remedy this by deleting the cachedAccessories file, or by manually editing the file to remove the old accessories under homebridge-hs100. On most systems that file will be here: ~/.homebridge/accessories/cachedAccessories.


Sample Configuration

"platforms": [{
  "platform": "TplinkSmarthome",
  "name": "TplinkSmarthome"
All options with defaults:

Note that comments aren't allowed in JSON files. But are included here for readability.

"platforms": [{
  "platform": "TplinkSmarthome",
  "name": "TplinkSmarthome",

  // Device Discovery Options
  "broadcast": "", // Broadcast Address
  "devices": [],         // Manual list of devices (see section below)
  "deviceTypes": [],     // set to [] or ["plug", "bulb"] to find all TPLink device types or ["plug"] / ["bulb"] for only plugs or bulbs
  "macAddresses": [],    // Whitelist of mac addresses to include. If specified will ignore other devices
  "pollingInterval": 10, // (seconds) How often to check device status in the background

  // Device Options
  "addCustomCharacteristics": true, // Adds energy monitoring characteristics viewable in Eve app
  "inUseThreshold": 0,       // (Watts) For plugs that support energy monitoring (HS110), min power draw for OutletInUse
  "switchModels": ["HS200"], // Matching models are created in homekit as a switch instead of an outlet
  "timeout": 5               // (seconds) communication timeout
Model deviceType Characteristics
HS100, HS105 plug On
OutletInUse (based on On state)
HS110 plug On
OutletInUse (based on energy monitoring)
Volts (Custom)
Amperes (Custom)
Watts (Custom)
VoltAmperes (Custom)
KilowattHours (Custom)
KilowattVoltAmpereHour (Custom)
HS200 plug On
LB100, LB110, LB200 bulb On
LB120 bulb On
LB130, LB230 bulb On

Eve Screenshot - Custom Characteristics

Custom Characteristics in Eve

Devices that support energy monitoring (HS110) will have extra characteristics that are viewable in the Eve app. Turn this off by setting addCustomCharacteristics false.

Manually Specifying Devices

If you have a network setup where UDP broadcast is not working, you can manually specify the devices you'd like this plugin to use. This will send the discovery message directly to these devices in addition to the UDP broadcast. Note that your device must have a static IP to work.

"platforms": [{
  "platform": "TplinkSmarthome",
  "name": "TplinkSmarthome",

  "devices": [
    { "host": "" },
    { "host": "" },
    { "host": "", "port": "9999" } // port defaults to "9999" but can be overriden

Accessory Names

Note the name in Homebridge/HomeKit may be out of sync from the Kasa app. This is a Homebridge/HomeKit limitation. You can rename your accessory through the Home app.


UUID Errors

Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory If you get an error about duplicate UUIDs you'll have to either remove your cached configuration files or manually edit them to remove the offending entry. By default they are stored in ~/.homebridge/accessories. In some cases you may also need to remove ~/.homebridge/persist and re-pair homebridge to your home.

You can remove them by running:

  • rm -rf ~/.homebridge/accessories
  • rm -rf ~/.homebridge/persist


Thanks to George Georgovassilis and Thomas Baust for reverse engineering the HS1XX protocol.