[Custom Component] Tapo P100 Plug Control

nothing…I tried both single and double quotes.
I see there is someone else on github having my same issue.

This is my configuration in configuration.yaml

switch:
    platform: tapo_p100_control
    ip_address: 11.1.1.114
    email: "[email protected]"
    password: "Password123"

and I copied the folder tapo_p100_control with the 3 files in config/custom_components/

I don’t really know what’s wrong.

Thanks

Greatly appreciate the time and effort taken to develop this functionality, just purchased Tapo plugs and only checked after buying them 2 days ago whether they could be integrated!

I’ve successfully managed to implement this for one device, I’ve tried inputting multiple IP addresses of all the plugs I now own though it’ll only pick up the last one on the list. If I remove the rest and keep one address it’ll work with that one device.

Probably a silly question but is there a specific method for listing multiple addresses associated with various plugs?

Hello! Thanks so much for this, have been looking forward to it.

Also having some issues with the configuration. I am getting:

2020-11-02 23:40:16 ERROR (SyncWorker_4) [custom_components.tapo_p100_control.switch] Could not connect to plug. Possibly invalid credentials
2020-11-02 23:40:16 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo_p100_control platform for switch
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/PyP100/PyP100.py", line 155, in login
    self.token = ast.literal_eval(decryptedResponse)["result"]["token"]
KeyError: 'result'

Any ideas? Many thanks!

Multiple plugs is a feature I’m currently working on :slight_smile:

2 Likes

Hi! While I was researching, I stumbled upon this thread…

My question for you all would be if it would be possible to port this code to Homebridge? I’m a complete noob when it comes to coding, so I have not a single idea how to do it myself :slight_smile:
Thanks!

having same issues as above
plain password, with or without quotes (single /double) same error as above.
Does anyone have any suggestions (rebooting already been tryied :slight_smile: )

Same. On 0.117.3. Supervised Hassio.

Tried changing password, logging out of the app. Using quotes or not.

Hmmmn.

Error in log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/PyP100/PyP100.py", line 155, in login
    self.token = ast.literal_eval(decryptedResponse)["result"]["token"]
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tapo_p100_control/switch.py", line 41, in setup_platform
    add_entities([P100Plug(p100)])
  File "/config/custom_components/tapo_p100_control/switch.py", line 49, in __init__
    self.update()
  File "/config/custom_components/tapo_p100_control/switch.py", line 79, in update
    self._p100.login()
  File "/usr/local/lib/python3.8/site-packages/PyP100/PyP100.py", line 159, in login
    raise Exception(f"Error Code: {errorCode}, {errorMessage}")
Exception: Error Code: -1501, Invalid Request or Credentials

Does any of you with this issue use an Android phone or all iPhone users?

iPhone XR, iOS14.1 in the UK…

@d_3d2, @tommisgr, @crgnclsn what phones are you using? Android or iPhone?

@Soos, @Rahaaas can you try with an Android phone? Or an Android emulator. It is just a blind guess…

I’m using Android

I’ve been using Android throughout and the issue persists.

This works fine for me. I have no quote surrounding either my username or password in the config. Worked on 0.117.2 and 0.117.4. Set up Tapo account and plug on iPhone X via iOS app.

using android

Logged out of android
Logged in with IOS (ipad)
Trying restarting HASS host and machine same errors
also trying on 3 different IP adresses (I have 3 tapos)

That would be an amazing addition. I have a heap of these plugs in use and controlling them all within Home-Assistant would be grand.

Does this mean that having multiple plugs registered in the app causes it to fail…? I have three registered.

Could the credential errors be a region issue, given how weirdly tied to it the accounts are?

Not working for me in the UK.

(I also absentmindedly ordered a pile thinking they were HA-supported and they’re sat waiting to go back to Amazon. OR ARE THEY?)

I’ll try later to set up a whole new account, reset the plugs and link just one. Noticed there’s a ‘share’ feature that might be another route.

My experiance so far is that you can only set one plug, if you add multiple lines to the config file HA picks the last one and runs with that. Hopefully @fishbigger has success his/her efforts to get multiple plugs working. Ill stay tuned.

Working for me in UK so don’t think it’s regional. I do only have 1 of the plugs though.

Worth noting that I do also have some TP link Kasa bulbs that I am using the same account for (those work with the existing tp link integration).