TPLink Smart Home Plugin for Homebridge. (formerly
npm install -g homebridgeor
sudo npm install -g --unsafe-perm homebridge(more details)
npm install -g homebridge-tplink-smarthome
npm update -g homebridge-tplink-smarthome
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:
"platforms":"platform": "TplinkSmarthome""name": "TplinkSmarthome"
Note that comments aren't allowed in JSON files. But are included here for readability.
"platforms":"platform": "TplinkSmarthome""name": "TplinkSmarthome"////////////////////////////////// Device Discovery Options////////////////////////////////"broadcast": "255.255.255.255" // 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
OutletInUse (based on On state)
OutletInUse (based on energy monitoring)
|LB100, LB110, LB200||bulb||On
Devices that support energy monitoring (HS110) will have extra characteristics that are viewable in the Eve app. Turn this off by setting
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": "192.168.0.100""host": "192.168.0.101""host": "192.168.0.102" "port": "9999" // port defaults to "9999" but can be overriden
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.
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. https://blog.georgovassilis.com/2016/05/07/controlling-the-tp-link-hs100-wi-fi-smart-plug/