jamesbarnett91 / tplink-energy-monitor

An energy monitoring dashboard for TP-Link smart plugs
GNU General Public License v3.0
461 stars 102 forks source link

Support for TP-LINK Smart Bulb LB130 #20

Open dietpiuser opened 5 years ago

dietpiuser commented 5 years ago

Hello,

This is more an enhancement request rather than an issue but not able to tag the "enhancement" label to this post.

Is the TP-LINK Smart Bulb LB130 on the roadmap for support with the energy monitor?

It appears the Kasa app has the ability to pull energy monitoring details from it.

Also, wondering if there is a timeline for implementing the daily cost metrics for HS110?

Thanks.

jamesbarnett91 commented 5 years ago

Hi sorry for the slow reply. It should be pretty easy to add support for the smart bulb assuming it all uses the same format/protocol for the energy monitoring, which it probably does if it shows up under the kasa app. I'll add it to the todo list and take a look.

Unfortunately I haven’t had much time to work on this project recently, so there isn't a timeline for implementing any of the new features I'm afraid!

Thanks

dietpiuser commented 5 years ago

Thanks James. Appreciate the effort you putting in the project.

Only went and bought those TP-LINK devices after seeing the project the Dashboard.

I saw the version 0.8 is out. I'm running version 0.7 in NPM.

Is that a matter of just replacing the file with the new one?

Regards, Fazeel


From: James Barnett notifications@github.com Sent: Saturday, 26 January 2019 11:34 PM To: jamesbarnett91/tplink-energy-monitor Cc: dietpiuser; Author Subject: Re: [jamesbarnett91/tplink-energy-monitor] Support for TP-LINK Smart Bulb LB130 (#20)

Hi sorry for the slow reply. It should be pretty easy to add support for the smart bulb assuming it all uses the same format/protocol for the energy monitoring, which it probably does if it shows up under the kasa app. I'll add it to the todo list and take a look.

Unfortunately I haven’t had much time to work on this project recently, so there isn't a timeline for implementing any of the new features I'm afraid!

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamesbarnett91/tplink-energy-monitor/issues/20#issuecomment-457827696, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlNx3_DOryk1YSMY0d5N8Fbm7TvAuA35ks5vHEtigaJpZM4ZvYiU.

jamesbarnett91 commented 5 years ago

Thanks Fazeel!

If you're running with NPM did you get the source code using git? If so you can just run a git pull to grab the latest changes.

Otherwise you can download the source code again however you did before, and copy them into your project directory overwriting the old ones (it shouldn't overwrite your log files, but you may want to back them up if you don't want to lose them)

dietpiuser commented 5 years ago

I'm getting the below error after I've cloned the repo again and did an npm install + npm start:

root@raspberrypi:/opt/tplink-energy-monitor/tplink-energy-monitor# npm start (node:28426) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

tplink-monitor@0.0.1 start /opt/tplink-energy-monitor/tplink-energy-monitor node ./app.js

Logger config file: "logger-config.json" Log directory path: "." events.js:183 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::3000 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at Server.setupListenHandle [as _listen2] (net.js:1367:14) at listenInCluster (net.js:1408:12) at Server.listen (net.js:1492:7) at Function.serverListen [as listen] (/opt/tplink-energy-monitor/tplink-energy-monitor/node_modules/express-ws/lib/index.js:42:40) at Object. (/opt/tplink-energy-monitor/tplink-energy-monitor/app.js:42:5) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32)

npm ERR! tplink-monitor@0.0.1 start: node ./app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the tplink-monitor@0.0.1 start script. npm ERR! This is most likely a problem with the tplink-monitor package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./app.js npm ERR! You can get their info via: npm ERR! npm owner ls tplink-monitor npm ERR! There is likely additional logging output above. npm ERR! System Linux 4.14.79-v7+ npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! cwd /opt/tplink-energy-monitor/tplink-energy-monitor npm ERR! node -v v8.11.1 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /opt/tplink-energy-monitor/tplink-energy-monitor/npm-debug.log npm ERR! not ok code 0

Regards, Fazeel


From: James Barnett notifications@github.com Sent: Sunday, 27 January 2019 12:43 AM To: jamesbarnett91/tplink-energy-monitor Cc: dietpiuser; Author Subject: Re: [jamesbarnett91/tplink-energy-monitor] Support for TP-LINK Smart Bulb LB130 (#20)

Thanks Fazeel!

If you're running with NPM did you get the source code using git? If so you can just run a git pull to grab the latest changes.

Otherwise you can download the source code again however you did before, and copy them into your project directory overwriting the old ones (it shouldn't overwrite your log files, but you may want to back them up if you don't want to lose them)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jamesbarnett91/tplink-energy-monitor/issues/20#issuecomment-457832203, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlNx3wXwJewaVGTnlpG6n4EhW6Wh05N6ks5vHFuGgaJpZM4ZvYiU.

dietpiuser commented 5 years ago

I reverted back to the old version from the old directory and rebooted the Pi and it's working again.

root@raspberrypi:/opt/tplink-energy-monitor/tplink-energy-monitor# ls -ltr total 432 -rw-r--r-- 1 root root 4983 Dec 5 19:17 README.md -rw-r--r-- 1 root root 35147 Dec 5 19:17 LICENSE -rw-r--r-- 1 root root 104 Dec 5 19:17 Dockerfile -rw-r--r-- 1 root root 1320 Dec 5 19:17 app.js drwxr-xr-x 2 root root 4096 Dec 5 19:17 views -rw-r--r-- 1 root root 125 Dec 5 19:17 sonar-project.properties drwxr-xr-x 2 root root 4096 Dec 5 19:17 services drwxr-xr-x 2 root root 4096 Dec 5 19:17 routes drwxr-xr-x 4 root root 4096 Dec 5 19:17 public -rw-r--r-- 1 root root 58815 Dec 5 19:17 package-lock.json -rw-r--r-- 1 root root 839 Dec 5 19:17 package.json -rw-r--r-- 1 root root 58 Dec 5 19:34 logger-config.json -rw-r--r-- 1 root root 2 Dec 22 09:25 -log.json drwxr-xr-x 13 root root 4096 Jan 27 00:33 node_modules -rw-r--r-- 1 root root 1077 Jan 27 01:38 npm-debug.log -rw-r--r-- 1 root root 286065 Jan 27 01:45 8006C9231115D28CCBF56726BD833A801A4BCC7B-log.json root@raspberrypi:/opt/tplink-energy-monitor/tplink-energy-monitor# root@raspberrypi:/opt/tplink-energy-monitor/tplink-energy-monitor# root@raspberrypi:/opt/tplink-energy-monitor/tplink-energy-monitor# pwd /opt/tplink-energy-monitor/tplink-energy-monitor

What is the command to check the version of the executable?

Also when were referring to run git pull, are you able to help me with the exact command based on my directory and file structure above and i will try it again.