thexperiments / pimatic-tplink-smartplug Goto Github PK
View Code? Open in Web Editor NEWThis plugin adds the functionality to control TP Link Smartplug HS100 and HS110 via pimatic
License: GNU General Public License v2.0
This plugin adds the functionality to control TP Link Smartplug HS100 and HS110 via pimatic
License: GNU General Public License v2.0
After update i get an error:
TypeError: this is not a typed array.
generated from here:
https://github.com/plasticrake/tplink-smarthome-crypto/blob/master/lib/index.js#L17
my research says maybe node version
my version is v4.2.6
@mwittig do you have a hint?
20:52:03.173 [pimatic] Loading plugin: "pimatic-tplink-smartplug" (0.0.8)
20:52:03.174 [pimatic] debug is true in plugin config, showing debug output for pimatic-tplink-smartplug.
20:52:03.445 [pimatic] this is not a typed array.
20:52:03.450 [pimatic] TypeError: this is not a typed array.
20:52:03.450 [pimatic]> at Function.from (native)
20:52:03.450 [pimatic]> at encrypt (/opt/pimatic-docker/node_modules/pimatic-tplink-smartplug/node_modules/tplink-smarthome-api/node_modules/tplink-smarthome-crypto/lib/index.js:17:20)
20:52:03.450 [pimatic]> at Object.<anonymous> (/opt/pimatic-docker/node_modules/pimatic-tplink-smartplug/node_modules/tplink-smarthome-api/lib/client.js:42:23)
20:52:03.450 [pimatic]> at Module._compile (module.js:410:26)
20:52:03.450 [pimatic]> at Object.Module._extensions..js (module.js:417:10)
20:52:03.450 [pimatic]> at Module.load (/opt/pimatic-docker/node_modules/pimatic-mobile-frontend/node_modules/nap/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
20:52:03.450 [pimatic]> at Function.Module._load (module.js:301:12)
20:52:03.450 [pimatic]> at Module.require (module.js:354:17)
20:52:03.450 [pimatic]> at require (internal/module.js:12:17)
20:52:03.450 [pimatic]> at Object.<anonymous> (/opt/pimatic-docker/node_modules/pimatic-tplink-smartplug/node_modules/tplink-smarthome-api/lib/index.js:8:11)
20:52:03.450 [pimatic]> at Module._compile (module.js:410:26)
20:52:03.450 [pimatic]> at Object.Module._extensions..js (module.js:417:10)
20:52:03.450 [pimatic]> at Module.load (/opt/pimatic-docker/node_modules/pimatic-mobile-frontend/node_modules/nap/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
20:52:03.450 [pimatic]> at Function.Module._load (module.js:301:12)
20:52:03.450 [pimatic]> at Module.require (module.js:354:17)
20:52:03.450 [pimatic]> at require (internal/module.js:12:17)
20:52:03.450 [pimatic]> at module.exports (/opt/pimatic-docker/node_modules/pimatic-tplink-smartplug/tplink-smartplug.coffee:24:15)
20:52:03.450 [pimatic]> at PluginManager.loadPlugin (/opt/pimatic-docker/node_modules/pimatic/lib/plugins.coffee:83:16)
20:52:03.450 [pimatic]> at /opt/pimatic-docker/node_modules/pimatic/lib/plugins.coffee:485:25
20:52:03.450 [pimatic]> at tryCatcher (/opt/pimatic-docker/node_modules/bluebird/js/release/util.js:16:23)
20:52:03.450 [pimatic]> at Promise._settlePromiseFromHandler (/opt/pimatic-docker/node_modules/bluebird/js/release/promise.js:512:31)
20:52:03.450 [pimatic]> at Promise._settlePromise (/opt/pimatic-docker/node_modules/bluebird/js/release/promise.js:569:18)
20:52:03.450 [pimatic]> at Promise._settlePromiseCtx (/opt/pimatic-docker/node_modules/bluebird/js/release/promise.js:606:10)
20:52:03.450 [pimatic]> at _drainQueueStep (/opt/pimatic-docker/node_modules/bluebird/js/release/async.js:142:12)
20:52:03.450 [pimatic]> at _drainQueue (/opt/pimatic-docker/node_modules/bluebird/js/release/async.js:131:9)
20:52:03.450 [pimatic]> at Async._drainQueues (/opt/pimatic-docker/node_modules/bluebird/js/release/async.js:147:5)
20:52:03.450 [pimatic]> at Immediate.Async.drainQueues [as _onImmediate] (/opt/pimatic-docker/node_modules/bluebird/js/release/async.js:17:14)
20:52:03.450 [pimatic]> at processImmediate [as _immediateCallback] (timers.js:383:17)
I had to disconnect my HS110 and although I defined on the device settings, a (polling) interval of 86400 seconds, I get the following error every 60 seconds anyway:
error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: connect EHOSTUNREACH ipaddress:9999
Restarting pimatic server after changing the setting seems to have done the trick.
My heating element consumes 1970W, but in the UI in Pimatic it is displayed as 1970kW which is a bit much :)
Hello.
Don't know exactly why, but it seems my HS110 stopped communicating data to Pimatic properly, all of a sudden.
Plug should be OK, because Kasa app can still show it (https://www.dropbox.com/s/pjormuhoxrjhsxn/Kasa.png?dl=0), just not Pimatic (https://www.dropbox.com/s/29de76c61jz0f7a/Pimatic.png?dl=0).
No messages appear in Pimatic, no relevant configuration changes.
Is there any way I can help you understand why this now happening?
Rebooting the server seems to have done the trick... I also reduced the periodicity with which Pimatic fetches the updated information, to see if it helps.
Hello.
Would it be possible to implement a button to reset the power statistics for the HS110?
According to the plug API, it should be possible to send that command (https://github.com/softScheck/tplink-smartplug/blob/master/tplink-smarthome-commands.txt):
Erase All EMeter Statistics
{"emeter":{"erase_emeter_stat":null}}
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.