Skip to content

Conversation

@ggarnier12
Copy link

I added two addtitional command cases to leverage getDayStats function from tplink-smarthome-api :

  • "getMeterCurrentMonthDayStats" : to get days consumption statistics corresponding to current month
  • "getMeterLastMonthDayStats" : to get days consumption statistics corresponding to last month
    These two cases cover the available data to retrieve as the plug only record the 30 last days

I successfully tested these with nodered pushing the commands through msg.payload input.

Add two new commands :
- getMeterCurrentMonthDayStats :
- getMeterLastMonthDayStats :
@ggarnier12 ggarnier12 changed the title Ggarnier12 patch 1 Adding DayStats capabilities for power consumption Jul 17, 2020
@StuFrankish
Copy link

StuFrankish commented Sep 2, 2021

I've just seen this PR only after I've raised a feature request for something very similar (if not the same).
Can someone confirm if the request I've raised here (#56), will be covered by these changes, and when these changed might be merged and released?

@caseyjhol Any update on this project?

@caseyjhol
Copy link
Owner

If you could add some documentation for this I can get it merged in.

@normanr
Copy link

normanr commented Dec 30, 2022

If you could add some documentation for this I can get it merged in.

Is this "just" a matter of adding two lines to the Commands section in kasa.html (around line ~200)?

Something like:

       <li><code>getMeterInfo</code> - Fetch the current device consumption.</li>
+      <li><code>getMeterCurrentMonthDayStats</code> - Fetch the consumption statistics corresponding to current month.</li>
+      <li><code>getMeterLastMonthDayStats</code> - Fetch the consumption statistics corresponding to last month.</li>
       <li><code>eraseStats</code> - Clear all the meter statistics.</li>

@ggarnier12 could you add this to the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants