Giter VIP home page Giter VIP logo

Comments (32)

gshoebridge avatar gshoebridge commented on May 17, 2024

Hi - got the integration working with P100 switch but the power monitoring version (P110) doesnt create an entity.
Im guessing this wiull also integrate into the power piece within the latest version?

Many thanjks and good luck

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Hi, P110 is actually not supported, follow this wiki to ask for: https://github.com/petretiandrea/home-assistant-tapo-p100/wiki/Request-device-support.

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Thanks for the update

Will you be adding in P110? At any time

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Thanks for the update

Will you be adding in P110? At any time

Yes, but I need that you or any P110 owner, follow the steps reported to this wiki https://github.com/petretiandrea/home-assistant-tapo-p100/wiki/Request-device-support. Posting the output of snippet code, described in the Wiki, allows me to develop a support for P110.

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Happy to help. Working from a MAC and never run this before. Installed Python3, getting error in Terminal

Traceback (most recent call last):
File "/Users/xxxxxxxxxxxxxxx/main.py", line 2, in
from plugp110 import TapoApiClient
ModuleNotFoundError: No module named 'plugp110'

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Ignore above - missed the plugp100 install - doing now then will rerun and advise output

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Output from main.py

743e03c849dfa98b94c9394174d8f2544cc6b4d1
TapoDeviceState(device_id='80222EF474BEC01D849DB7F9B01DB7041E800077', nickname='Power Desk', model='P110', type='SMART.TAPOPLUG', device_on=True, brightness=None, hue=None, saturation=None, color_temp=None, overheated=False, signal_level=2, rssi=-50)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x110b03130>

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Thanks for collaboration, but I've update right now the wiki with a new main.py which provide me more info. Please try again with the new main and update plugp100 to 2.1.8 :)

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Update from new file version

743e03c849dfa98b94c9394174d8f2544cc6b4d1
TapoDeviceState(device_id='80222EF474BEC01D849DB7F9B01DB7041E800077', nickname='Power Desk', model='P110', type='SMART.TAPOPLUG', device_on=True, brightness=None, hue=None, saturation=None, color_temp=None, overheated=False, signal_level=2, rssi=-55)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10c9d8130>

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

No change was required to main.py?

743e03c849dfa98b94c9394174d8f2544cc6b4d1
TapoDeviceState(device_id='80222EF474BEC01D849DB7F9B01DB7041E800077', nickname='Power Desk', model='P110', type='SMART.TAPOPLUG', device_on=True, brightness=None, hue=None, saturation=None, color_temp=None, overheated=False, signal_level=2, rssi=-55)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111ad8130>

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

No change was required to main.py?

743e03c849dfa98b94c9394174d8f2544cc6b4d1
TapoDeviceState(device_id='80222EF474BEC01D849DB7F9B01DB7041E800077', nickname='Power Desk', model='P110', type='SMART.TAPOPLUG', device_on=True, brightness=None, hue=None, saturation=None, color_temp=None, overheated=False, signal_level=2, rssi=-55)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x111ad8130>

Use the latest main.py from Wiki, which is different from actual one. And don't forget to update plugp100 to 2.1.8.
Thanks :)

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

New code: (updated main.py)

743e03c849dfa98b94c9394174d8f2544cc6b4d1
Traceback (most recent call last):
File "/Users/guyshoebridge/main.py", line 11, in
loop.run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/guyshoebridge/main.py", line 8, in main
print(await sw.get_state_as_dict())
AttributeError: 'TapoApiClient' object has no attribute 'get_state_as_dict'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10367c130>

Good hunting :)

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Sorry again, my fault, try updating plugp100 to 2.1.9 :)

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

743e03c849dfa98b94c9394174d8f2544cc6b4d1
Traceback (most recent call last):
File "/Users/guyshoebridge/main.py", line 11, in
loop.run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/guyshoebridge/main.py", line 8, in main
print(await sw.get_state_as_dict())
AttributeError: 'TapoApiClient' object has no attribute 'get_state_as_dict'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x1043ee130>

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Rerun

743e03c849dfa98b94c9394174d8f2544cc6b4d1
Traceback (most recent call last):
File "/Users/guyshoebridge/main.py", line 11, in
loop.run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/guyshoebridge/main.py", line 7, in main
await sw.login()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/plugp100/api.py", line 70, in login
await self._login_request(self.username, self.password)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/plugp100/api.py", line 191, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'
Unclosed client session

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Rerun

743e03c849dfa98b94c9394174d8f2544cc6b4d1
Traceback (most recent call last):
File "/Users/guyshoebridge/main.py", line 11, in
loop.run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/guyshoebridge/main.py", line 7, in main
await sw.login()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/plugp100/api.py", line 70, in login
await self._login_request(self.username, self.password)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/plugp100/api.py", line 191, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'
Unclosed client session

Are you sure about IP, email and passwd? Now the error seems to be at login phase

EDIT: I confirm that 2.1.9 is working, check IP, email and password

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Error in main.py (left in "ip") - corrected and rerun

743e03c849dfa98b94c9394174d8f2544cc6b4d1
Traceback (most recent call last):
File "/Users/guyshoebridge/main.py", line 11, in
loop.run_until_complete(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/guyshoebridge/main.py", line 8, in main
print(await sw.get_state_as_dict())
AttributeError: 'TapoApiClient' object has no attribute 'get_state_as_dict'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x109c63130>

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Im using pip3 and python3 commands

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

What the version of plugp100? pip show plupg100

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

It's coming up as 2.1.7
I've installed 3 times

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

I always pip3 install plugp100

Just tried pip install plugp100

Same output for pip show plugp100 and pip3 show plugp100- 2.1.7

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Okay, as described before you need to update plugp100 to 2.1.9. Use: pip install -I plugp100==2.1.9. Try again, will work :)

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

updated: pip show plugp100 now showing 2.1.9
running update

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

code from: "python3 main.py"

743e03c849dfa98b94c9394174d8f2544cc6b4d1
{'device_id': '80222EF474BEC01D849DB7F9B01DB7041E800077', 'fw_ver': '1.0.2 Build 210224 Rel.200046', 'hw_ver': '1.0', 'type': 'SMART.TAPOPLUG', 'model': 'P110', 'mac': 'C0-06-C3-E4-AB-5C', 'hw_id': '56DD079101D61D400A11C4A3D41C51DA', 'fw_id': '00000000000000000000000000000000', 'oem_id': 'AE7B616A7168B34151ABBCF86C88DF34', 'overheated': False, 'ip': '192.168.0.59', 'time_diff': 0, 'ssid': 'U0tZNVlSR0s=', 'rssi': -87, 'signal_level': 1, 'latitude': 513553, 'longitude': -18955, 'lang': 'en_US', 'avatar': 'plug', 'region': 'Europe/London', 'specs': '', 'nickname': 'UG93ZXIgRGVzaw==', 'has_set_location_info': True, 'device_on': True, 'ontime': 197048, 'default_states': {'type': 'last_states', 'state': {}}}
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10786a130>

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

P110 support added to 1.1.4 version. Make a clean installation of this integration or update it from HACS from your home assistant instance :)

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

Check if it's working

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

Updated and working great
Simply updated through HACS.
P110 already present as a device. When restarted it then generated an entity.

One question - can you get to the power attributes?

Would be good to be able to follow the usage. Also with new HA additions to include in Power/Energy

Thanks for your diligence thus far.

from home-assistant-tapo-p100.

petretiandrea avatar petretiandrea commented on May 17, 2024

from home-assistant-tapo-p100.

gshoebridge avatar gshoebridge commented on May 17, 2024

from home-assistant-tapo-p100.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.