Sign inSign up

ponylucky/tenda-controller

By ponylucky

•Updated almost 4 years ago
Archived

Control your Tenda plug locally without any access to WAN. (Developped for SP9)

Image
0

333

ponylucky/tenda-controller repository overview

⁠Tenda SP9 Controller

This is a simple controller for the Tenda SP9 smart plug. Thanks to rex_3⁠ for providing the endpoints of the plugs.

From : Github⁠.

This is a webserver.

⁠Arguments

  • ROUTER_IP (env variable) to force your router ip if not 192.168.1.1
  • LANGUAGE (env variable) to force one language ('en', 'fr'). Defaults to 'en'.
  • Serve at port 80.
  • JSON file is located at /config/, add this to a volume to see it outside of the image.

⁠I am in the main page, what do I do?

  1. The main page shows all plugs and their status.
  2. By clicking on the row of a plug a modal will pop up that allows you to toogle the plug.
  3. At the bottom of the page there is a button that allows you to refresh all the plugs found to get all newly accessible plugs (it changes only the .json file and not the plugs).

⁠I refresh but one or multiple plugs are missing

Right, this is because the script only looks for plugs that are on the same network as the computer/server running the script. So, if you have a plug that is not on the same network as the computer/server running the script, it will not be found. To fix this, you can add the IP address of the plug to plugs.json manually.

It can also happen when a plug is bugged and need to be reset. To do this, hold the button on the plug for 10 seconds (unplugging until there is no led anymore works too). After this, the plug will be reset. Its possible that you will need to configure the plug again using the Tenda app. When the plug is OK (when the light is blue, and not blinking) you can click on the refresh button in the main page or add the IP address of the plug to plugs.json manually.

⁠I want to add a plug

After the plug is rightly configured and at least accessible from the computer/server running the script, you can click on the refresh button in the main page or add the IP address of the plug to plugs.json manually.

⁠I want to remove a plug

Unplug the plug and click on the refresh button in the main page or remove the IP address of the plug from plugs.json manually.

⁠I want to change the name of a plug

Change the name of the plug via the Tenda app or ultimatly change the name in plugs.json manually.

Tag summary

Content type

Image

Digest

sha256:e80a53d7d…

Size

46.1 MB

Last updated

almost 4 years ago

docker pull ponylucky/tenda-controller