I also get this quite often from one of my sockets. It is nothing the plugin can do anything about. It seems that the plugs are sometimes not reachable for a period of time when polling.
Maybe it can help to reduce the polling interval.
New plugin for TP-Link SmartPlugs HS100 and HS110
I also get this quite often from one of my sockets. It is nothing the plugin can do anything about. It seems that the plugs are sometimes not reachable for a period of time when polling.
Maybe it can help to reduce the polling interval.
Same here. But it isn’t to often…
I think i have the same problem here (HS110 / tplink-smartplug 0.0.7).
I can toggle the switch => works
But i can’t get any consumption data. The values shown on my pimatic device are always “Unknown”
Do you have an idea what’s going wrong?
P.S.
Hardware-Version: 2.0
updated to Firmware-Version : 1.5.2
Same problem here, this stopped working since a few days.
I reset my plug but that did nothing.
After editting my device in pimatic and saving it everything worked again.
Follow my domotica project on http://maredana.nl
@incmve said in New plugin for TP-Link SmartPlugs HS100 and HS110:
Same problem here, this stopped working since a few days.
I reset my plug but that did nothing.
After editting my device in pimatic and saving it everything worked again.
ok, i have try this.
i have same:
Hardware-Version: 2.0
updated to Firmware-Version : 1.5.2
toggel works, with feedback when i turn in pimatic or direct press the hadware butten
Energy not work for me say, “unbekannt”
hmm not work for me, gives alternate?
thanks
@thex The base package hs100-api
you’re using is deprecated. You should use tplink-smarthome-api
instead which is API compatible as far as I can see. I found another hint on homebridge-tplink-smarthome
which is by the same author, that the newer HS110 hardware and software revisions return energy metrics in much smaller units. See
EDIT:
Actually, the API for obtaining consumption data is slightly different. I have twiddled around with the device simulator and it seems to be working fine now. If someone is ready to test my fork, this will be great. I have also filed a PR.
See
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
ok, thanks.
can you wirte the comand for dummys
i use a pi3 with debian.
when you brought more infos tell me
Thanks.
edit:
this is my output
root@raspberrypi:/home/pi/pimatic-app/node_modules# rm -rf pimatic-tplink-smartplug
root@raspberrypi:/home/pi/pimatic-app/node_modules# sudo npm install homebridge-tplink-smarthome
npm WARN engine homebridge-tplink-smarthome@3.11.0: wanted: {"node":">=6.5.0","homebridge":">=0.4.27"} (current: {"node":"4.6.2","npm":"2.15.11"})
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"})
npm WARN unmet dependency /home/pi/pimatic-app/node_modules/pimatic-maxcul/node_modules/serialport/node_modules/node-pre-gyp/node_modules/tar-pack requires debug@'~2.2.0' but will load
npm WARN unmet dependency /home/pi/pimatic-app/node_modules/pimatic-maxcul/node_modules/serialport/node_modules/debug,
npm WARN unmet dependency which is version 2.6.9
npm ERR! Linux 4.4.41-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "homebridge-tplink-smarthome"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package pimatic@0.9.42 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer pimatic-amazing-dash-button@0.9.14 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-angular-material-frontend@0.3.4 wants pimatic@>=0.8.31
npm ERR! peerinvalid Peer pimatic-calendar@0.8.0 wants pimatic@0.8.*
npm ERR! peerinvalid Peer pimatic-cron@0.8.8 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-customcss@0.1.0 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-dash-button@0.2.1 wants pimatic@~0.9.0
npm ERR! peerinvalid Peer pimatic-echo@0.5.3 wants pimatic@~0.9.0
npm ERR! peerinvalid Peer pimatic-enigma2@0.1.2 wants pimatic@0.8.*
npm ERR! peerinvalid Peer pimatic-filebrowser@0.9.0 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-filter@0.9.4 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-fritz@0.6.6 wants pimatic@^0.9.40
npm ERR! peerinvalid Peer pimatic-google-calendar@0.4.1 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-harmonyhub@0.0.6 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-homeduino@0.9.11 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-iframe@0.3.1 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-ipcamera@1.1.1 wants pimatic@0.8.*
npm ERR! peerinvalid Peer pimatic-lcd@0.9.2 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-led-light@0.9.5 wants pimatic@>=0.9.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-location@0.2.5 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-log-reader@0.9.1 wants pimatic@>=0.9.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-mail@0.8.6 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-max@0.9.0 wants pimatic@>=0.8.31 <1.0.0
npm ERR! peerinvalid Peer pimatic-maxcul@1.0.7 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-milight-reloaded@0.9.17 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-mjpg@0.0.1 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-mobile-frontend@0.9.12 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-mqtt@0.9.7 wants pimatic@>=0.9.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-openweather@0.9.4 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-ping@0.9.5 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-ps4waker@0.1.4 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-shell-execute@0.9.11 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-sunrise@0.9.2 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-sysinfo@0.9.4 wants pimatic@0.9.*
npm ERR! peerinvalid Peer pimatic-ultrasonic@0.9.0 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-watchdog-unix@0.0.1 wants pimatic@>=0.8.0 <1.0.0
npm ERR! peerinvalid Peer pimatic-xmpp@0.0.11 wants pimatic@>=0.9.0
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/pimatic-app/node_modules/npm-debug.log
@heiko1988 You don 't need to install homebridge-tplink-smarthome
!
Try the following:
# First of all, check whether 'git' is installed by typing the git into your command shell
# If it prompt a command not found error you need to install git as follows
sudo apt-get install git
# Now continue as follows
sudo service pimatic stop
cd /home/pi/pimatic-app/node_modules
sudo rm -rf pimatic-tplink-smartplug
sudo rm -rf homebridge-tplink-smarthome
sudo npm i mwittig/pimatic-tplink-smartplug --unsafe-perm
sudo service pimatic start
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
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