jamesbarnett91 / tplink-energy-monitor

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

Unraid #103

Open nikaiwolf opened 1 year ago

nikaiwolf commented 1 year ago

Would it be possible to put together an Unraid docker image?

bgktmxg commented 1 year ago

There's already a docker image on dockerhub, Ive been running it for a few years now.

Go to the apps tab » search for jbarnett » install tplink-energy-monitor » change network type to host » apply

You should then be able to access via HOSTIPADDRESS:3000 eg 192.168.1.100:3000

devanteweary commented 1 year ago

Unfortunately, not finding the Docker container nor "jbarnett" on the Apps tab.

dk-charter commented 1 year ago

tplink-energy-monitor - I just searched and found it in Apps on Unraid 6.11.5

bgktmxg commented 1 year ago

Unfortunately, not finding the Docker container nor "jbarnett" on the Apps tab.

Missed a step on my instructions sorry!

Go to the apps tab » search for jbarnett » select "Click Here To Get More Results From DockerHub" in the top right » install tplink-energy-monitor » change network type to host » apply

devanteweary commented 1 year ago

Oh dang I never even realized that "Get more results" was there. Sorry about that guys!

OK I haven't done ANY troubleshooting yet but I get this trying to run it. (Changed network to host and switched port to something not in use.)

Log from Trying to Run Container events.js:183 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::3000 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at Server.setupListenHandle [as _listen2] (net.js:1355:14) at listenInCluster (net.js:1396:12) at Server.listen (net.js:1480:7) at Function.serverListen [as listen] (/opt/tplink-monitor/node_modules/express-ws/lib/index.js:42:40) at Object. (/opt/tplink-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! code ELIFECYCLE npm ERR! errno 1 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 probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-07-11T15_29_32_056Z-debug.log events.js:183 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::3000 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at Server.setupListenHandle [as _listen2] (net.js:1355:14) at listenInCluster (net.js:1396:12) at Server.listen (net.js:1480:7) at Function.serverListen [as listen] (/opt/tplink-monitor/node_modules/express-ws/lib/index.js:42:40) at Object. (/opt/tplink-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! code ELIFECYCLE npm ERR! errno 1 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 probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-07-11T15_32_01_208Z-debug.log > tplink-monitor@0.0.1 start /opt/tplink-monitor > node ./app.js > tplink-monitor@0.0.1 start /opt/tplink-monitor > node ./app.js ** Press ANY KEY to close this window **
bgktmxg commented 1 year ago

Are you certain port 3000 isn't being used, as the log seems to suggest it is?

Try running lsof -i:3000 in terminal. If anything is running on the port it will tell you.

Also try moving the energy monitor container to something else, maybe just 3001.

devanteweary commented 1 year ago

Sorry I kinda lied. I did do a little troubleshooting and that was making sure it was on port 3002.

Maybe it doesn't like being on anything but 3000?

Well I changed it back to 3000 and moved the other container to 3006 and now Energy Monitor works so thanks for helping! :>

Protip to anyone reading: Edit the container > Advanced View > WebUI > http://[IP]:[PORT:3000]

This will let you launch the Web UI like most other containers.

And if you put something under the Icon field, it'll give you an icon. For instance: https://raw.githubusercontent.com/causefx/Organizr/v2-master/plugins/images/organizr/logo-no-border.png