[APP][Pro] TP-Link Smart Devices KASA - central topic

I have submitted an update of the app to the store which should take care of the issues.

If you are able to install via the ‘CLI method’ (refer to https://community.homey.app/t/how-to-cli-install-method/198), it can be downloaded from github (https://github.com/abaretta/nu.baretta.tplink.

Changes:

  • The ‘dynamic IP’ feature is now optional, and disabled by default
  • The discovery process would continue to run in case no new plugs were found. It will now run 3 times at 2,5 s. interval and stop after 9 seconds.
  • I added conditions on the driver type for the use of certain capabilities.

This is still not working after upgrading via cli. Getting loads of - Error sending value. And then the app crashes.

Hi Rafi,

Can you send me the output from the cli?

How do I do that in v2.0?

You started the app through the athom cli, right? If you start the app with

‘athom app run …’

You will get debugging output on your screen (if you use ‘athom app install’ it just installs the app and you do not get the output). Presumably that’s also where you saw errors?

Are you using hs100 or hs110 plugs?

Below is the output from cli debugging. As soon as I tap on one of the TP-Link HS110 the app crashes.
Thanks for your help.

C:\Users\rafal\Downloads\Homey\nu.baretta.tplink-master>athom app run
✓ Pre-processing app…
✓ Validating app…
✓ Homey App validated successfully against level debug
✓ Packing Homey App…
— App size: 1.68 MB
✓ Installing Homey App on Homey (https://192-168-1-142.homey.homeylocal.com)…
✓ Homey App nu.baretta.tplink successfully installed
✓ Running nu.baretta.tplink, press CTRL+C to quit
— Profile your app’s performance at https://go.athom.com/app-profiling?homey=5881f9f0e9dd2f810d32d2de&app=nu.baretta.tplink
─────────────── Logging stdout & stderr ───────────────
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] device init
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] id: 192.168.1.144
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] name: En suite Radiator
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] class: socket
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] settings IP address: 192.168.1.144
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] dynamicIp is defined: false
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [0] settings totalOffset: undefined
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] device init
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] id: 192.168.1.143
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] name: Main Bathroom Radiator
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] class: socket
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] settings IP address: 192.168.1.143
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] dynamicIp is defined: false
2019-01-28 13:38:11 [log] [ManagerDrivers] [hs110] [1] settings totalOffset: undefined
2019-01-28 13:38:21 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:38:21 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:38:24 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 1 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:24 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:24 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 2 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:24 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:31 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:38:31 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:38:34 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 3 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:34 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:34 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 4 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:34 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:41 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:38:41 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:38:44 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 5 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:44 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:44 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 6 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:44 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:51 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:38:51 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:38:54 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 7 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:54 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:38:54 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 8 Discover count: 0 DynamicIP option: false
2019-01-28 13:38:54 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:01 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:39:01 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:39:04 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 9 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:04 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:04 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 10 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:04 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:11 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:39:11 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:39:14 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 11 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:14 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:14 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 12 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:14 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:21 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:39:21 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:24 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 13 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:24 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:39:24 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 14 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:24 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:31 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-28 13:39:31 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-28 13:39:34 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 15 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:34 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:34 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 16 Discover count: 0 DynamicIP option: false
2019-01-28 13:39:34 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-28 13:39:38 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: true
/drivers/hs110/device.js:140
this.LedOn(device);
^

TypeError: this.LedOn is not a function
at TPlinkPlugDevice.onCapabilityLedOnoff (/drivers/hs110/device.js:140:18)
at TPlinkPlugDevice.__onCapability (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/Device.js:1:1934)
at emitTwo (events.js:126:13)
at TPlinkPlugDevice.emit (events.js:214:7)
at TPlinkPlugDriver.__onCapability (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/Driver.js:1:1511)
at emitTwo (events.js:126:13)
at TPlinkPlugDriver.emit (events.js:214:7)
at Homey.ready (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/drivers.js:1:1506)
at SDK._onReady (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/SDK.js:1:1045)
at ManagerDrivers._onEventDriverMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/drivers.js:1:1424)

— INFO: nu.baretta.tplink has been killed —

Thanks, that helps in getting the cause of the problem.

The IP address appears to be incorrect for both devices. You can either enable the ‘dynamicIP’ option in the settings, or manually enter the correct IP address.

I’ll look into the ‘this.LedOn is not a function’ error… Yes, that’s a bug (typo). Fixed, no idea why that is a problem for some (on V2) but not everyone.

This is fixed in version 0.1.3, I have updated the github repository, so you can test it if you want.

Wow! Fastest approval from Athom ever, I have just publised v0.1.3 in the appstore :slight_smile:

1 Like

It’s not crashing now but you can’t turn on or off the plugs at all.
Debug below:

Pre-processing app…
✓ Validating app…
✓ Homey App validated successfully against level debug
✓ Packing Homey App…
— App size: 1.68 MB
✓ Installing Homey App on Homey (https://192-168-1-142.homey.homeylocal.com)…
✓ Homey App nu.baretta.tplink successfully installed
✓ Running nu.baretta.tplink, press CTRL+C to quit
— Profile your app’s performance at https://go.athom.com/app-profiling?homey=5881f9f0e9dd2f810d32d2de&app=nu.baretta.tplink
─────────────── Logging stdout & stderr ───────────────
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] device init
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] id: 192.168.1.144
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] name: En suite Radiator
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] class: socket
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] settings IP address: 192.168.1.144
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] dynamicIp is defined: false
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [0] settings totalOffset: undefined
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] device init
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] id: 192.168.1.143
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] name: Main Bathroom Radiator
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] class: socket
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] settings IP address: 192.168.1.143
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] dynamicIp is defined: false
2019-01-29 22:20:31 [log] [ManagerDrivers] [hs110] [1] settings totalOffset: undefined
2019-01-29 22:20:41 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:20:41 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:20:44 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 1 Discover count: 0 DynamicIP option: false
2019-01-29 22:20:44 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:20:44 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 2 Discover count: 0 DynamicIP option: false
2019-01-29 22:20:44 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:20:51 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:20:51 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:20:54 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 3 Discover count: 0 DynamicIP option: false
2019-01-29 22:20:54 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:20:54 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 4 Discover count: 0 DynamicIP option: false
2019-01-29 22:20:54 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:01 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:01 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:04 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 5 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:04 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:04 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 6 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:04 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:11 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:11 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:14 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 7 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:14 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:14 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 8 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:14 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:21 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:21 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:24 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 9 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:24 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:24 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 10 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:24 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:31 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:31 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:34 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 11 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:34 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:34 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 12 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:34 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:39 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: false
2019-01-29 22:21:39 [log] [ManagerDrivers] [hs110] [1] Turning device off
2019-01-29 22:21:41 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:41 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
2019-01-29 22:21:42 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: true
2019-01-29 22:21:42 [log] [ManagerDrivers] [hs110] [1] Turning device on 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26247) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:42 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 13 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:42 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:44 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 14 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:44 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:51 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:21:51 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:21:54 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 15 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:54 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:21:54 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 16 Discover count: 0 DynamicIP option: false
2019-01-29 22:21:54 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:01 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:01 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
2019-01-29 22:22:04 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: false
2019-01-29 22:22:04 [log] [ManagerDrivers] [hs110] [1] Turning device off
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:04 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 17 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:04 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:04 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 18 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:05 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:06 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: true
2019-01-29 22:22:06 [log] [ManagerDrivers] [hs110] [1] Turning device on 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
2019-01-29 22:22:11 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:11 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:14 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 19 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:14 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:14 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 20 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:14 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:21 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:21 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:24 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 21 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:24 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:24 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 22 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:24 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:31 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:31 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:35 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 23 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:35 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:35 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 24 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:35 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:41 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:41 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
2019-01-29 22:22:42 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: true
2019-01-29 22:22:42 [log] [ManagerDrivers] [hs110] [1] Turning LED on
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:45 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 25 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:45 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:45 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 26 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:45 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
2019-01-29 22:22:51 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:22:51 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:22:55 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 27 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:55 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:22:55 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 28 Discover count: 0 DynamicIP option: false
2019-01-29 22:22:55 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:01 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:23:01 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: false
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Turning LED off
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 29 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 30 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Capability called: onoff value: true
2019-01-29 22:23:05 [log] [ManagerDrivers] [hs110] [1] Turning LED on
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
(node:26247) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.143:9999
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
(node:26247) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
2019-01-29 22:23:11 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:23:11 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:15 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 31 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:15 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:23:15 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 32 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:15 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:21 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:23:21 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:23:25 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 33 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:25 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:25 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 34 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:25 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:32 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:23:32 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.143:9999
2019-01-29 22:23:35 [log] [ManagerDrivers] [hs110] [1] Device unreachable. Unreachable count: 35 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:35 [log] [ManagerDrivers] [hs110] [1] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.143:9999
[undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:35 [log] [ManagerDrivers] [hs110] [0] Device unreachable. Unreachable count: 36 Discover count: 0 DynamicIP option: false
2019-01-29 22:23:35 [log] [ManagerDrivers] [hs110] [0] Caught error in getStatus / getSysInfo function: connect EHOSTUNREACH 192.168.1.144:9999
2019-01-29 22:23:42 [log] [ManagerDrivers] [hs110] [0] getStatus device: 192.168.1.144
2019-01-29 22:23:42 [log] [ManagerDrivers] [hs110] [1] getStatus device: 192.168.1.143

What do you mean by that:

The IP address appears to be incorrect for both devices. You can either enable the ‘dynamicIP’ option in the settings, or manually enter the correct IP address.

Those device can be managed by Kasa app with no issues.

Thanks

Thanks

What I mean is that the Homey app is polling the devices at the wrong IP addresses! You have three options to address this and get it working:

  1. Manually change the IP for each device in the Homey app to the IP currently used by the device.
  2. Enable the ‘dynamicIp’ option in the Homey app for each device in the settings for the device. Or:
  3. Remove the devices and add them again. The Homey app will discover them again at the correct IP’s.

Either way enable the dynamicIp option or the app will stop working when the devices get a different IP through dhcp.

Some progress here. I removed the devices from Homey and re-added them. Now I can turn on and off them. However the Switch LED ON/OFF doesn’t changed its status when it’s on and all meter readings don’t refresh automatically, you have to leave the window that shows them and re-open it to get the current readings. Thanks

That’s something else I presume, that’s about screen-refresh. You can update the screen-value by clicking on it.


Created an issue for this at Athom already but would be good if you do that too:

About the LED, you can test the function with a flowcard, see if you can turn it back on manually.

And in your case you should enable the ‘dynamicIp’ option.

Re the LED, it looks like the initial state is not reflected in the app. Once I turned it on and off, it started showing it correctly.
Again, anne thanks for your help. I wish Fibaro guys were so responsive but they’re not at all.

Hi all,

I have submitted an update of the TP-Link Smart Devices app to the app store, version 0.1.4.

The changes are minor, the most noticable change is that I have removed the ‘LED on/off’ functionality from the interface for the TP-Link smartplugs (hs100/hs110/hs200). The feature got in more or less ‘by accident’ with the Homey V2 upgrade, and I felt it was more of a nuisance (as you had to swipe it away to get to the on/off button) than adding any useful functionality.

Note that you can still toggle the LED with a flowcard, so if you really need a button for it this is still possible.

Unfortunately the now non-functional LED button will remain in the interface until you re-pair the plug, ie. remove the device and add it again. After adding it again you will need to repair all flows the device was used in. After adding the plug again you will only have an on/off button.

1 Like

I have some TP-Link light bulbs which appear to frequently pick up new IP addresses meaning I have to delete them in Homey and rediscover them. So I’m hoping that this post means that a solution is on the way. But I don’t know what the above SDK rewrite refers to. Will this be the Athom app I use on my WIndows laptop or something else?

That rewrite was published months ago, the current version is v0.1.4. However, support for dynamic IPs is included as an option. All you need to do is go to the (advanced) settings and enable support for dynamic IP’s.

You mention a Windows app, are you still on Homey V1? It should work on V1 as well (albeit no longer supported by me as I can’t test it…).

Note that the appstore includes details such as this, click on the ‘show more’ link for the app to read it :+1:

Hi Anne,

Thanks for the quick response. I’m using the Windows desktop app and it’s version 1.0.4 I’ve checked for updates and it says it’s the most up to date version. I never found an option in there for dynamic IP addresses but the Homey hub is currently switched off at another address so I can’t get in to check any config at the moment.

What about firmware? Does that update automatically?

Cheers, David.

Hi David,

In V1, if you go to the device view in the desktop app, there’s a little cog in the corner of each TP-Link device (bulbs in your case). Click it to enable the ‘dynamic IP’ option.

You may want to consider upgrading to Homey V2, V1 is not developed any further, and more and more apps are V2 only, as it is difficult to support apps for V1 once a developer has moved on to V2.

By default the firmware is updated automagically, except for the upgrade to V2. The reason is that you will lose the desktopapp (although for managing flows a new webinterface has been provided, it is very good). There are a zillion posts about this on the forum. You can upgrade by installing the new Homey app on your phone. You may want to check all your devices are supported, although by now that shouldn’t be an issue anymore I guess.

Hi Anne

Wondered if you could assist with a recent issue I am having with the app and TP-Link HS1000 switches. I am running v2 on my homey and latest v0.1.4 app. I had four HS100’s running fine with my Homey and for some reason, one dropped off and went “unreachable” and I am unable to get the app to pick it up again.

I have tried deleting the device and re adding it and manually adding the IP to the HS1000
I checked from my router and matched the IP with the MAC address of the HS1000 to make sure I had the correct IP.

I know it is not the HS1000 as I can control it with the TP-Link app.
Just to see what happened, I deleted one of my other HS100 switches and tried to re-add and this also fails.

Any assistance appreciated.
By the way, I am a bit tech savvy but not a programmer.

Regards
John

Any chance you can install the app via the CLI? This may give some useful output.

When discovering plugs the app checks the ID of the discovered device against the ID’s of the devices that are already paired. It will only show devices that are not yet paired.

When you manually enter an IP it ‘should’ just work. In other words, no idea what the issue may be :-/