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

Can't find plugs with firewalld running #84

Open smbell1979 opened 3 years ago

smbell1979 commented 3 years ago

I apologize if this is something obvious, but it's my first time using docker... I can't seem to get my plugs to detect if I start the docker container while firewalld is running. If I disable it, then start the container, it detects the plugs correctly. Then I can start firewalld back up and it continues to work.

Are there additional ports that I need to open or another method to let the container detect the plugs through firewalld? I'm able to access the page perfectly fine using localhost:3000.

I'm running Fedora 33 btw.

donaldta commented 3 years ago

Not sure if it helps you but, I found this pdf, Storming the Kasa? Security analysis of TP-Link Kasa smart home devices

It describes some interesting stuff with the TP-Link Smart Plugs, notably...

"They discovered 3 open ports: 80/TCP, 9999/TCP, and 1040/UDP (user datagram protocol). The service listening on port 80 was found to be a fake HTTP server, but the remaining two ports, 9999 and 1040, implemented the TP-Link Smart Home Protocol (TSHP) and TP-Link Device Debug Protocol (TDDP), respectively. Sniffing network traffic indicated that, after booting and connecting to a WLAN, the HS110 would synchronize its time with an NTP server and attempt to connect to a TP-Link cloud server. Stroetmann & Esser noted the plug would regularly attempt to contact the cloud server, even when the device was not configured for remote use."

Xeroxxx commented 3 years ago

Hey, you may check out https://github.com/Xeroxxx/tplink-energy-monitor

We improved the current build form james and currently working (dev-v2.0 branch) on a complete remade and improved version.