I installed the plugin and it seems to be running good.
Using it with a HS110
Hardware-Version: 1.0
Firmware-Version : 1.1.5
Updated to firmware 1.2.5 and still working.
New plugin for TP-Link SmartPlugs HS100 and HS110
I installed the plugin and it seems to be running good.
Using it with a HS110
Hardware-Version: 1.0
Firmware-Version : 1.1.5
Updated to firmware 1.2.5 and still working.
Follow my domotica project on http://maredana.nl
ok,
i have try this from mwittig not work by me, i think i have other problems…
the log say from i have: node 4.6.2 npm 2.15.11
And brought: node 4.8.0 npm 3
is there an easy way to update or misunderstand this?
Thanks for your help
First, thanks to @mwittig!
I followed your update procedure, but it’s not working. Switching still possible - power-data still “unknown”.
I’ve got some dependency warnings during the installation:
npm WARN engine tplink-smarthome-api@0.22.0: wanted: {"node":">=4.8.0","npm":">=3"} (current: {"node":"4.6.2","npm":"2.15.11"})
npm WARN engine tplink-smarthome-crypto@1.0.0: wanted: {"node":">=4.8.0"} (current: {"node":"4.6.2","npm":"2.15.11"})
pimatic-tplink-smartplug@0.0.6 pimatic-tplink-smartplug
└── tplink-smarthome-api@0.22.0 (lodash.defaultto@4.14.0, lodash.isequal@4.5.0, lodash.groupby@4.6.0, commander@2.16.0, tplink-smarthome-crypto@1.0.0, loglevel@1.6.1, babel-runtime@6.26.0)
@heiko1988 said in New plugin for TP-Link SmartPlugs HS100 and HS110:
the log say from i have: node 4.6.2 npm 2.15.11
And brought: node 4.8.0 npm 3
These are just warnings and can be ignored for now.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@incmve said in New plugin for TP-Link SmartPlugs HS100 and HS110:
I installed the plugin and it seems to be running good.
Thanks for trying this.
Back home I have also tested with my HS110 and it is also working for me (hardware rev. 1.0 and firmware 1.1.4) including sensible energy meter values. I have also upgraded to the latest firmware which also works fine for me. It is recommended to upgrade the firmware, btw., as it contains some important WPA2 security fixes.
There is one glitch, however, when the plug is not available on the network: In this case I get an “Converting circular structure to JSON” error.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Ok. When this only a warn.
What can I do to test?
In the kasa App work fine the Energy Meter.
In pimatic I can only the toogle switch. Work. Good.
Smart Meter dont Work.
My tp link. Is 2 weeks old.
Hardware v2. 0
Firmware 1.5.2
I check later my other tp link this is a old seicht from 1 year.
Tanks for help
Edit:
ok i have check my other, is only a tp100 without smart meter.
was already late yesterday;)
@mwittig said in New plugin for TP-Link SmartPlugs HS100 and HS110:
There is one glitch, however, when the plug is not available on the network: In this case I get an “Converting circular structure to JSON” error.
Actually, this is a nasty one. If the plug is not reachable at pimatic startup it causes an infinite loop/stack overflow when pimatic frontend is
connecting via WebSocket. The problem is that getState/setState/changeState do not return a Promise as required on the error cases. I have fixed that in my fork. Another issue is about cancellation of Promises. As native Promises as used by the underlying library I have created a Promise wrapper to support cancellation properly.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Thanks @mwittig maybe I find some time on the weekend to check your PR
@heiko1988 said in New plugin for TP-Link SmartPlugs HS100 and HS110:
My tp link. Is 2 weeks old.
Hardware v2. 0
Maybe the newer hardware make the difference here. This needs to be investigated further investigated.
The updated fork also support plugin-level debug. Just repeat the plugin installation procedure as described above. Then, set debug to true on tplink-smartplugin configuration and restart pimatic. Now it should produce more log data which might be helpful
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in New plugin for TP-Link SmartPlugs HS100 and HS110:
@heiko1988 said in New plugin for TP-Link SmartPlugs HS100 and HS110:
My tp link. Is 2 weeks old.
Hardware v2. 0Maybe the newer hardware make the difference here. This needs to be investigated further investigated.
The updated fork also support plugin-level debug. Just repeat the plugin installation procedure as described above. Then, set debug to true on tplink-smartplugin configuration and restart pimatic. Now it should produce more log data which might be helpful
ok,
i have try again.
i have only this output
error [pimatic-tplink-smartplug]: Unable to get consumption of device: Error: TCP Timeout
14:11:13error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug,TPlinkHS100]: Error getting attribute value nas.state: undefined
14:08:07error [pimatic-tplink-smartplug,TPlinkHS110]: Error getting attribute value brunnen-garten.state: undefined
14:08:07error [pimatic-tplink-smartplug,TPlinkHS110]: Error getting attribute value bachlauf-garten.state: undefined
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get power state of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get consumption of device: Error: TCP Timeout
14:08:07error [pimatic-tplink-smartplug]: Unable to get consumption of device: Error: TCP Timeout
i think this come from restart pimatic.
Thanks
uppdate:
ok, the valus i see direct in the shell console
14:20:47.008 [pimatic-tplink-smartplug] getting state
14:20:47.026 [pimatic-tplink-smartplug] getting state
14:20:47.039 [pimatic-tplink-smartplug] getting consumption
14:20:47.052 [pimatic-tplink-smartplug] getting state
14:20:47.064 [pimatic-tplink-smartplug] getting consumption
14:20:47.119 [pimatic-tplink-smartplug] state is true
14:20:47.362 [pimatic-tplink-smartplug] state is false
14:20:47.452 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234081,
14:20:47.452 [pimatic-tplink-smartplug]> current_ma: 1439,
14:20:47.452 [pimatic-tplink-smartplug]> power_mw: 334575,
14:20:47.452 [pimatic-tplink-smartplug]> total_wh: 2407,
14:20:47.452 [pimatic-tplink-smartplug]> err_code: 0 }
14:20:47.497 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234481,
14:20:47.497 [pimatic-tplink-smartplug]> current_ma: 37,
14:20:47.497 [pimatic-tplink-smartplug]> power_mw: 0,
14:20:47.497 [pimatic-tplink-smartplug]> total_wh: 117,
14:20:47.497 [pimatic-tplink-smartplug]> err_code: 0 }
14:20:47.654 [pimatic-tplink-smartplug] state is true
14:21:47.125 [pimatic-tplink-smartplug] getting state
14:21:47.338 [pimatic] rule zuhause-ja: set presence of Zuhause to present
14:21:47.422 [pimatic-tplink-smartplug] state is true
14:21:47.503 [pimatic-tplink-smartplug] getting state
14:21:47.523 [pimatic-tplink-smartplug] getting consumption
14:21:47.682 [pimatic-tplink-smartplug] getting state
14:21:47.707 [pimatic-tplink-smartplug] getting consumption
14:21:47.776 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234629,
14:21:47.776 [pimatic-tplink-smartplug]> current_ma: 37,
14:21:47.776 [pimatic-tplink-smartplug]> power_mw: 0,
14:21:47.776 [pimatic-tplink-smartplug]> total_wh: 117,
14:21:47.776 [pimatic-tplink-smartplug]> err_code: 0 }
14:21:47.915 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234260,
14:21:47.915 [pimatic-tplink-smartplug]> current_ma: 1445,
14:21:47.915 [pimatic-tplink-smartplug]> power_mw: 336228,
14:21:47.915 [pimatic-tplink-smartplug]> total_wh: 2412,
14:21:47.915 [pimatic-tplink-smartplug]> err_code: 0 }
14:21:47.938 [pimatic-tplink-smartplug] state is false
14:21:48.059 [pimatic-tplink-smartplug] state is true
in the frontend i dont see this.
@heiko1988 said in New plugin for TP-Link SmartPlugs HS100 and HS110:
ok, the valus i see direct in the shell console
Thanks for the update on log output. This was very helpful!
As one can see, hardware revision 2.0 plugs appear to provide the measurement data in a different format. I have updated my fork to handle both formats accordingly. The measurement data should now
be displayed properly in your setup (after having installed the latest changes).
Hardware Revision 2.0
14:21:47.915 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234260,
14:21:47.915 [pimatic-tplink-smartplug]> current_ma: 1445,
14:21:47.915 [pimatic-tplink-smartplug]> power_mw: 336228,
14:21:47.915 [pimatic-tplink-smartplug]> total_wh: 2412,
14:21:47.915 [pimatic-tplink-smartplug]> err_code: 0 }
Hardware Revision 1.0
15:05:14.574 [pimatic-tplink-smartplug] consumption data is { current: 0.136666,
15:05:14.574 [pimatic-tplink-smartplug]> voltage: 229.637248,
15:05:14.574 [pimatic-tplink-smartplug]> power: 16.457058,
15:05:14.574 [pimatic-tplink-smartplug]> total: 0.009,
15:05:14.574 [pimatic-tplink-smartplug]> err_code: 0 }
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in New plugin for TP-Link SmartPlugs HS100 and HS110:
@heiko1988 said in New plugin for TP-Link SmartPlugs HS100 and HS110:
ok, the valus i see direct in the shell console
Thanks for the update on log output. This was very helpful!
As one can see, hardware revision 2.0 plugs appear to provide the measurement data in a different format. I have updated my fork to handle both formats accordingly. The measurement data should now
be displayed properly in your setup (after having installed the latest changes).Hardware Revision 2.0
14:21:47.915 [pimatic-tplink-smartplug] consumption data is { voltage_mv: 234260, 14:21:47.915 [pimatic-tplink-smartplug]> current_ma: 1445, 14:21:47.915 [pimatic-tplink-smartplug]> power_mw: 336228, 14:21:47.915 [pimatic-tplink-smartplug]> total_wh: 2412, 14:21:47.915 [pimatic-tplink-smartplug]> err_code: 0 }
Hardware Revision 1.0
15:05:14.574 [pimatic-tplink-smartplug] consumption data is { current: 0.136666, 15:05:14.574 [pimatic-tplink-smartplug]> voltage: 229.637248, 15:05:14.574 [pimatic-tplink-smartplug]> power: 16.457058, 15:05:14.574 [pimatic-tplink-smartplug]> total: 0.009, 15:05:14.574 [pimatic-tplink-smartplug]> err_code: 0 }
Thank you very much
work all fine toggle, smart meter.
you are the man of the day for me
Thank you!
All works fine now!
@thex said in New plugin for TP-Link SmartPlugs HS100 and HS110:
However I’m currently experiencing some endless loops somewhere deep in the socket.io and can’t figure out where the problem is…
I had the same. See my earlier post infinite loop/stack overflow. It is forked in my fork
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Hi,
you can add the daily consumption and the running time to the tp link addon.
as it is in the kasa app?
maybe the variables are there, then it should not be too hard. I guess
that would be great.
Thank you
Hi,
today I got my 2nd HS110 with HW 2.0 -> switching yes, measurements not… same as you all.
With the fork of @mwittig it works well. But when will this find its way to the official plugin as an update?
@mwittig can you file a pullrequest? Hope I find the time to integrate it soon then. This thread somehow went under my radar.
I saw the update for the plugin and installed it. Unfortunately the HW ver.2.0 plug is still not working.
@thex said in New plugin for TP-Link SmartPlugs HS100 and HS110:
@mwittig can you file a pullrequest? Hope I find the time to integrate it soon then. This thread somehow went under my radar.
I already did back in July and you accepted the pull request
However, the is no package release yet
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
oops, will do it this weekend