Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S220 Device support #542

Closed
Mandrake1967 opened this issue Sep 29, 2023 · 24 comments · Fixed by #566 or #571
Closed

S220 Device support #542

Mandrake1967 opened this issue Sep 29, 2023 · 24 comments · Fixed by #566 or #571
Assignees
Labels
enhancement New feature or request

Comments

@Mandrake1967
Copy link

Please add full support for the Tapo S200 switch series so that entities can be revealed and utilised within Home Assistant

@wavemop
Copy link

wavemop commented Sep 30, 2023

Same here - the S210 has no listed entities in the Integration.

@miumer
Copy link

miumer commented Sep 30, 2023

This would be great!

@petretiandrea
Copy link
Owner

As reported here buttons in general doesn't allow getting a "live click event". This is especially true for S200B button which doesn't report "is_on", but if S220 support "is_on" and report it, I will add suport for this

@petretiandrea petretiandrea added enhancement New feature or request triage labels Sep 30, 2023
@T8DAGR8
Copy link

T8DAGR8 commented Sep 30, 2023

Same here the S220 switch has no entities.

@wavemop
Copy link

wavemop commented Oct 2, 2023

"As reported here ..."

Wow, thanks man - that's explaining so much. Couldn't believe it's truly a full non-local device in the moment of purchase.
Damn wrong hardware ... AGAIN!

@Mandrake1967
Copy link
Author

The Tapo s200b is simply a low power button and completely different. I can understand that this will simply act as a trigger and no more and is not stateful. The hub cannot know a state since its just a 'pulse' of 'on-off'.

The s220 is a stateful power switch, which certainly should support entities in home assistant via the hub since it has defined on and off states and also battery level.

@petretiandrea
Copy link
Owner

If s220 is stateful, I can integrate It

@wavemop
Copy link

wavemop commented Oct 7, 2023

If s220 is stateful, I can integrate It

s210 is also stateful (has single switch instead of twin switch S220)

@petretiandrea
Copy link
Owner

I need your support to integrate them. You must run a python snippet and report here the state of your connected devices to hub

Install pip install plugp100==3.11.0 and then use the following script but after initialize use these lines

# - hub example
hub = HubDevice(client)
print(await hub.get_children())
print(await hub.get_state_as_json())

@miumer
Copy link

miumer commented Oct 8, 2023

Im only posting the s220 part of the response and hidding all the IDs and region stuff here, but getting a response something like this. Is this response enough:

{'parent_device_id': '...', 'hw_ver': '1.0', 'fw_ver': '1.7.0 Build 220620 Rel.170201', 'device_id': '...', 'original_device_id': '...', 'mac': '...', 'type': 'SMART.TAPOSWITCH', 'model': 'S220', 'hw_id': '...', 'oem_id': '...', 'specs': 'EU', 'category': 'subg.plugswitch.switch', 'bind_count': 2, 'slot_number': 2, 'position': 1, 'status_follow_edge': False, 'status': 'online', 'is_low': False, 'lastOnboardingTimestamp': 1687434540, 'rssi': -70, 'signal_level': 2, 'jamming_rssi': -118, 'jamming_signal_level': 1, 'nickname': '...', 'avatar': 'switch', 'device_on': False, 'led_off': 0, 'region': '...', 'latitude':..., 'longitude': ..., 'has_set_location_info': True}

@petretiandrea
Copy link
Owner

Im only posting the s220 part of the response and hidding all the IDs and region stuff here, but getting a response something like this. Is this response enough:

{'parent_device_id': '...', 'hw_ver': '1.0', 'fw_ver': '1.7.0 Build 220620 Rel.170201', 'device_id': '...', 'original_device_id': '...', 'mac': '...', 'type': 'SMART.TAPOSWITCH', 'model': 'S220', 'hw_id': '...', 'oem_id': '...', 'specs': 'EU', 'category': 'subg.plugswitch.switch', 'bind_count': 2, 'slot_number': 2, 'position': 1, 'status_follow_edge': False, 'status': 'online', 'is_low': False, 'lastOnboardingTimestamp': 1687434540, 'rssi': -70, 'signal_level': 2, 'jamming_rssi': -118, 'jamming_signal_level': 1, 'nickname': '...', 'avatar': 'switch', 'device_on': False, 'led_off': 0, 'region': '...', 'latitude':..., 'longitude': ..., 'has_set_location_info': True}

Thanks, I can integrate it

@petretiandrea petretiandrea self-assigned this Oct 11, 2023
@petretiandrea petretiandrea added this to the 2.3.0 milestone Oct 11, 2023
@wavemop
Copy link

wavemop commented Oct 11, 2023

You also need that script on the s210 or can you take data from s220 log ?

Thanks for all your efforts!

@petretiandrea
Copy link
Owner

You also need that script on the s210 or can you take data from s220 log ?

Thanks for all your efforts!

Having both is better ;)

@DimiTerz
Copy link
Contributor

DimiTerz commented Oct 12, 2023

To help out I also include my result here.

I have one S210 and one S220 for comparison and also in both ON and OFF stage. Here are my results:

S220-1 ON
"parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170201", "device_id":"", "original_device_id":"", "mac":"...617", "type":"SMART.TAPOSWITCH", "model":"S220", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":4, "slot_number":2, "position":2, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104677, "rssi":-54, "signal_level":3, "jamming_rssi":-118, "jamming_signal_level":1, "nickname":"bWlycm9yIGxpZ2h0", "avatar":"switch", "device_on":true, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true },
S220-1 OFF
{ "parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170201", "device_id":"", "original_device_id":"", "mac":"...617", "type":"SMART.TAPOSWITCH", "model":"S220", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":4, "slot_number":2, "position":2, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104677, "rssi":-55, "signal_level":3, "jamming_rssi":-118, "jamming_signal_level":1, "nickname":"bWlycm9yIGxpZ2h0", "avatar":"switch", "device_on":false, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true }
S220-2 ON
{ "parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170201", "device_id":"", "original_device_id":"", "mac":"...617", "type":"SMART.TAPOSWITCH", "model":"S220", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":4, "slot_number":2, "position":1, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104677, "rssi":-54, "signal_level":3, "jamming_rssi":-118, "jamming_signal_level":1, "nickname":"YmF0aHJvb20gbGlnaHQ=", "avatar":"switch", "device_on":true, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true }
S220-2 OFF
{ "parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170201", "device_id":"", "original_device_id":"", "mac":"...617", "type":"SMART.TAPOSWITCH", "model":"S220", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":4, "slot_number":2, "position":1, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104677, "rssi":-55, "signal_level":3, "jamming_rssi":-118, "jamming_signal_level":1, "nickname":"YmF0aHJvb20gbGlnaHQ=", "avatar":"switch", "device_on":false, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true },
S210 ON
{ "parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170603", "device_id":"", "original_device_id":"", "mac":"...155", "type":"SMART.TAPOSWITCH", "model":"S210", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":5, "slot_number":1, "position":1, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104572, "rssi":-60, "signal_level":3, "jamming_rssi":-114, "jamming_signal_level":1, "nickname":"b2ZmaWNlIGxpZ2h0", "avatar":"switch_s210", "device_on":true, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true }
S210 OFF
{ "parent_device_id":"", "hw_ver":"1.0", "fw_ver":"1.7.0 Build 220620 Rel.170603", "device_id":"", "original_device_id":"", "mac":"...155", "type":"SMART.TAPOSWITCH", "model":"S210", "hw_id":"", "oem_id":"", "specs":"EU", "category":"subg.plugswitch.switch", "bind_count":5, "slot_number":1, "position":1, "status_follow_edge":false, "status":"online", "is_low":false, "lastOnboardingTimestamp":1697104572, "rssi":-62, "signal_level":2, "jamming_rssi":-114, "jamming_signal_level":1, "nickname":"b2ZmaWNlIGxpZ2h0", "avatar":"switch_s210", "device_on":false, "led_off":0, "region":"Europe/Athens", "latitude":, "longitude":, "has_set_location_info":true }

@miumer
Copy link

miumer commented Oct 14, 2023

The s220 devices seem to have no controls related to them in the devices menus in HASS. Can't add any automations, no info on the device, no entities etc. It

@Mandrake1967
Copy link
Author

Agree, that this is not closed.
S220 is not showing any entities at all still
Also I note that the H100 hub has now also lost the siren function.

@T8DAGR8
Copy link

T8DAGR8 commented Oct 14, 2023

Agreed still no entities for a s220 switch

@DimiTerz
Copy link
Contributor

DimiTerz commented Oct 15, 2023

Only S210 switches are working for me also. And I noticed another limitation as explained in issue #570.

I am not sure since I can not debug it at the moment but they issye regarding S220 might be in tapo_hub.py

elif any(supported in model for supported in ["s200", "s210"]): return SwitchChildDevice(hub, device_id)

Maybe it should be

elif any(supported in model for supported in ["s220", "s210"]): return SwitchChildDevice(hub, device_id)

@petretiandrea petretiandrea added this to the Release 2.10.1 milestone Oct 16, 2023
@petretiandrea petretiandrea linked a pull request Oct 16, 2023 that will close this issue
@Mandrake1967
Copy link
Author

Working , much appreciated!

@T8DAGR8
Copy link

T8DAGR8 commented Oct 17, 2023

I can’t find the update 2.10.1 in HACS.
Does anyone know where I can find it?

@T8DAGR8
Copy link

T8DAGR8 commented Oct 17, 2023

I've found it now.
And it works with all entities and the battery level sensors.
Thanks

@wavemop
Copy link

wavemop commented Oct 17, 2023

perfectly working on s210, much appreciated!🎉

@T8DAGR8
Copy link

T8DAGR8 commented Oct 17, 2023

Also the siren feature on the h100 hub is back.

@ashwinikalantri
Copy link

These devices should be added to the supported devices list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
7 participants