dswd / OctoPrint-PSUControl-Tapo

Adds TPLink Smart Plug support to OctoPrint-PSUControl as a sub-plugin
GNU Affero General Public License v3.0
7 stars 2 forks source link

Username und Passwort??? #2

Open Blockfett opened 2 years ago

Blockfett commented 2 years ago

Hi, kann den Tapo nicht verbinden. Nirgends steht, was für ein User und PW genommen werden muss. Lasse ich es leer, passiert auch nichts. TPU Control auf PlugIn gesetzt und Tapo ausgewählt

Hi, can't connect the Tapo. Nowhere to find wich Username and password to fill in. Is it empty no connection, too. TPU Control set to PlugIn and choose Tapo. Nothing happend.

ionabio commented 2 years ago

Hi, can't connect the Tapo. Nowhere to find wich Username and password to fill in. Is it empty no connection, too. TPU Control set to PlugIn and choose Tapo. Nothing happend.

Hi. I just tried it and will reply here for future reference. it is the same username password used in tapo app to control the plug.

Blockfett commented 2 years ago

For reference:

switch to PSU- Control Tapo

I disconnected my P100 in the App and reconnected again. I have to type in the device name and THEN my WLAN- Password. No extra password for the P100. After bluetooth and given a name (with WLAN password--> new devices allowed and devices can communicate each other) the App will control my Tapo P100. The same name and the WLAN password are in the PlugIn (PSU Control Tapo) and nothing happen. I can see a symbol (flash) click on it and nothing happen, too.

I remember to read that the connection is "too save" for OctoPrint. Other TP devices can coonect to OctoPrint but not the Tapo P100. I have to switch the light by the App. And this is semi good. I like it more to click on a symbol like the PSU Control plugin gives me.

lord-edel commented 2 years ago

I have the same issue. I can't control my Tapo P110 with PSU Control. I also have no idea what to enter in the username and password field. Is the username the device name I assigned in the Tapo App or my network SSID or something else? The password is my WIFI-Password or something else? I didn't see any username or password settings in the tapo app...

Also: it would be helpful to give examples what to enter and also display an error message if it didn't work or a success message if it worked.

thank you

ionabio commented 2 years ago

For me username and password were both the ones used in the tapo app. for the password, I remember reading somewhere the API doesn't work well with complex passwords, so I switched it to something simple.

so both user name and password are the ones you use in the tapo app (no wifi, or network ssid.). I don't think you can use tapo app without any username or password.

note that user name for me was the email address I used. not the name.

I cannot use tapo without logging in ("Me" in the bottom right corner), I forgot what I set as a password then, so I logged out of there and in again.

image

The IP address of the plug you can access via the same tapo app.

eataiwo commented 2 years ago

Exactly as @ionabio mentioned. I managed to connect using the IP address of my plug as the "address". You can find the IP address in the Tapo app under "Device Settings" > "Device Info" > "IP Address". My username was my email address used in the Tapo app, and my "password" was the password I used to log in to the Tapo app.

eataiwo commented 2 years ago

@Blockfett @lord-edel #3 could be the reason why controlling your Tapo device is not working. If you are comfortable you can ssh into your raspberry pi which is running Octoprint by using the command pi@<IP address> and entering your password when prompted. If you navigate to the directory where the PSU Control Tapo plugin is located. It should be something like cd /home/pi/oprint/lib/python3.7/site-packages/octoprint_psucontrol_tapo is you then edit the tapo.py file e.g. nano tapo.py and change the timeout value on line 55 from 0.5 to 2 and then exit the editor, in nano this is done by pressing Ctrl-X then Y then enter and that should save. If you reboot your RPi and try using the PSU control plugin on Octoprint again to control your smart plug hopefully it should work if you have the same issue I did.

Blockfett commented 2 years ago

IT WORKED!

Username+ Password= E-Mail address from Tapo App and Password (also from the App). Now after few weeks it works finaly. Thanks to all.

lord-edel commented 2 years ago

thank you for your help! following your steps I'm almost there :) the sub-plugin is finally able to communicate with the tapo-smartplug, but unfortunately it is turning it on and immediately off again. it doesn't matter if I use the lightning-button on the octoprint site or try to send a print-file from prusa-slicer... are my settings wrong maybe?

PSU_Control
ionabio commented 2 years ago

I had in beginning the same issue as above and I think it is because of PSU control plug-in (not the Tapo one). As you showed in your screenshot and as it was on mine, I think some options are conflicting with eachother. So as a solution I un-checked the automatically turn on PSU control.

image

I also noticed that when printer is off, octo print doesn't remember the printer serial port, so for that I turn on and refresh the page.

eataiwo commented 2 years ago

You have very similar settings to mine. The only difference is "Post On Delay" and "Disconnect on power off". I do not think the delay is relevant to your issues, so as @ionabio mentioned, maybe try turning off settings like "automatically turn on PSU control" and "Disconnect on power off" and see if that works.

Screenshot from 2022-06-08 13-39-05 Screenshot from 2022-06-08 13-39-21 Screenshot from 2022-06-08 13-39-30 Screenshot from 2022-06-08 13-39-37

lord-edel commented 2 years ago

hey thank you @ionabio now it stays on! :) the next problem was, that the printer turned on but I got an error from octoprint, that the printer isn't connected. the post on delay suggestion from @eataiwo helped with that, thank you! :)

the only thing still not working is the start of the print. in my mind, I should be able to press "upload and print" in prusa-slicer, then the printer switches on, connects to octoprint and starts printing. now everything apart from the last step works. any ideas?

eataiwo commented 2 years ago

So what currently happens with your system? Does Octoprint register that there should be an active print? Could you show us the terminal feed to see what commands are being sent to your printer and what the beginning of the GCODE you are uploading looks like? P.S. I am not an expert in Octoprint, so I might not be able to help much further.