homebridge-tplink-smarthome: hs100 platform won't load

I managed to get my homebridge working with my nest device, works great. Now I am attempting to add my hs100 devices to homebridge. I have tried multiple ways to add the information to the config.json file but the platform will not load. It seems to still load the nest platform but homebridge doesn’t seem to work. I get the error:

[3/8/2017, 8:04:43 PM] Loaded plugin: homebridge-hs100
[3/8/2017, 8:04:43 PM] Registering platform 'homebridge-hs100.Hs100'
[3/8/2017, 8:04:43 PM] ---
[3/8/2017, 8:04:44 PM] Loaded plugin: homebridge-nest
[3/8/2017, 8:04:44 PM] Registering platform 'homebridge-nest.Nest'
[3/8/2017, 8:04:44 PM] ---
[3/8/2017, 8:04:44 PM] Loaded config.json with 0 accessories and 1 platforms.
[3/8/2017, 8:04:44 PM] ---
[3/8/2017, 8:04:44 PM] Loading 1 platforms...
[3/8/2017, 8:04:44 PM] Initializing Nest platform...
[3/8/2017, 8:04:44 PM] Fetching Nest devices.
Load homebridge-hs100.Hs100
/usr/local/lib/node_modules/homebridge-hs100/index.js:20
    this.plugs = config['plugs'] || [];
                       ^

TypeError: Cannot read property 'plugs' of null
    at new Hs100Platform (/usr/local/lib/node_modules/homebridge-hs100/index.js:20:24)
    at Server._loadDynamicPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:315:30)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:82:8)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:425:7)
    at startup (bootstrap_node.js:146:9)
    at bootstrap_node.js:540:3

Is this some incorrect parameters in the config file?

Sorry, new to this so any help would be much appreciated. I can share the contents of the config file.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

I also have the same error.

There is a bug in version 2.0.0, so I’ve installed version 1.1.1. It is working perfectly now. The only downside to version 1.1.1 is that the configuration requires a manually specified IP address of each switch (compared to the autodetect feature in 2.0.0).

Install version 1.1.1 using the following command:

npm install -g homebridge-hs100@1.1.1

Then you’ll need to add the following to your config.json file (see the old README.md)

"platforms": [{
    "platform": "Hs100",
    "plugs": [{
        "host": "10.0.1.2",
        "port": 9999
    }, {
        "host": "10.0.1.3",
        "port": 9999
    }, {
        "host": "10.0.1.4",
        "port": 9999
    }]
}],

I found the IP address of my HS100 by looking through the list of devices on my router. The port is always 9999.