I’m interested in getting a TPLINK HS110 to be able to trigger an alert once the washing machine is done - your plugin looks great but I wonder by when you would be able to add the energy monitor support?
-
New plugin for TP-Link SmartPlugs HS100 and HS110
-
@GuybrushMR80 As an alternative you may want to consider getting the Edimax SP-2101W which is supported by pimatic-edimax. It is has about the same price tag than TP Link and works rock solid for me. I had some issues with Edimiax initially, but these have been solved by recent firmware updates. The plugin had been first released in April 2015.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
if using a fritzbox as router with you might be able to use the fritz plugin to monitor energy usage with the fritz dect 200 outlet as option
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@mwittig thanks, will look into that!
-
I hope that I find the time next week, should be doable within an evening
-
nice, ordered the hs110. Need to monitor some devices.
-
Received my HS110 today and I’ve added a device with consumption only (I don’t need switching). Don’t know if you’re interested? Otherwise I will create a PR
-
@sweebee Nice. Yes, push this a little bit and make a PR
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I cant figure out what current is. Its related to the wattage, it doesnt increase over time. But i cant find the relation between 38w and 0.201 kWh.
Edit: okay it was a long night lol, must be amperage
I’m also adding an average value (kWh), so you know how much it uses average over an hour.
-
@sweebee said in New plugin for TP-Link SmartPlugs HS100 and HS110:
I cant figure out what current
Yes, that amperage. I assume you’re using the getConsumption() method of the underlying hs-100 API library which does a callout to gathering “emeter.get_realtime”. It should return the following (at least):
- voltage (V)
- current (A)
- power (W)
Apparently, the library does not implement the callout to obtain daily and monthly statistics. I’ll make a fork and you can give it a try if you like.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I through i could use the uptime as reverence for a avarage consumption. But its resetted after turning it off and on again. While the kWh meter remains the same. The kWh meter resets once you remove the HS from the socket.
.
-
@sweebee ok, so, the statistics data provided by HS110 may be useful. I have added support for this on my fork. Would be great if you can give it a try (simply replace the index.js file on your base, or install the fork from git).
https://github.com/mwittig/hs100-api
Note, the parameters are optional, if omitted the current year and month will be used.
/** * Get Daily Statistic for the given month of the given year * @param number [month] the number of month * @param number [year] the full year, e.g. 2016 * @returns {Promise.<T>} */ Hs100Api.prototype.getDailyStatisticsForMonth = function (month, year) { ... } /** * Get Montly Statistic for given Year * @param number [year] the full year, e.g. 2016 * @returns {Promise.<T>} */ Hs100Api.prototype.getMonthlyStatisticsForYear = function (year) { ... }
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig nice, so the device does save values like daily, monthly etc?
I’ll test it tomorrow evening. Especially daily is very useful. Tester my fridge today, 90% of the time it’s 0W, the other time it’s 120W. So a daily value gives a better indication.
-
@sweebee said in New plugin for TP-Link SmartPlugs HS100 and HS110:
so the device does save values like daily, monthly etc
Yes, it does. I am not sure, however, whether or not it keeps the accumulated values when it gets unplugged. Regarding the “power” value being 0W most of the time sounds a bit strange to me - well, for a fridge that may be normal behaviour though. To test the measurement unit, you can use a 60W light bulb, for example. This may be useful to check the calibration of the device and to check whether or not it indicates a constant power consumption.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Great that so many people are interested in this!
@sweebee
Thanks for the Pullrequest!
I would have added it to the HS110 device instead of adding a new device and would prefer it that way. Are there any special reasons for the extra device? -
@thex @sweebee Just my two cents: For the common case, I’d prefer an extended PowerSwitch including the measurement attributes instead of having a Consumption device. See also pimatic-edimax, for example.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
The reason i created a device with consumption only is that i bought the hs110 because of the energy meter. I don’t want the switching capabilities. For instance, i had it between the socket and my server, if i accidentally press off, my server will stop immediately.
But if I would use it for switching, I don’t want to see all the data, to much info in 1 device. Maybe just wattage?
@mwittig the day/month/year stats seem not to reset after removing the plug:
[ { year: 2016, month: 9, day: 17, energy: 0.25 }, { year: 2016, month: 9, day: 18, energy: 0.615 }, { year: 2016, month: 9, day: 19, energy: 0.238 } ]
[ { year: 2016, month: 9, energy: 1.103 } ]
For me this is the ‘best’ solution:
since i have other meters which save the value of the day every night. Like the frionius plugin for my solar panels. And a normal pulse meter for overall consumption.
@thex maybe use 2 devices? one normal switch with some basic energy values. And a energy device only with more statistics for users like me?
-
@sweebee said in New plugin for TP-Link SmartPlugs HS100 and HS110:
the day/month/year stats seem not to reset after removing the plug
Sounds great to me. Thanks for testing. I’ll create a PR.
EDIT: https://github.com/thexperiments/hs100-api/pull/1"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
We need support for something like this:
-
absolutely! expandable devices would be a great thing
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !