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

Tapo Smart Hub (H100) connected but no visibility of devices paired with it #354

Closed
monkga1 opened this issue Jan 25, 2023 · 59 comments
Closed
Labels
enhancement New feature or request

Comments

@monkga1
Copy link

monkga1 commented Jan 25, 2023

Add support for Tapo Smart Hub connected devices such as motion sensors (T100) which don't have own IP addresses.

I'd like to use Tapo Motion Sensors like any other HA supported motion sensors.

@Piksanhome
Copy link

Support

@MohitDeshwal
Copy link

Waiting for the same.

@seba1337
Copy link

I have captured some packets, which seems like json with base64 encoded binary data but I don't know how to decode it. Any tips? I can help with reverse engineering as I have H100 with various sensors on it.

@seba1337
Copy link

OK probably what I've catched was only get status requests from home assistant, meh. I see that everything is encrypted. Seems like a PIA to reverse engineer.

@seba1337
Copy link

On a RTL-SDR in EU:
tapo-eu

@MohitDeshwal
Copy link

Also have hub with few sensors connected willing to help if I could. @seba1337 Do you also have a Zigbee gateway around? tried connecting these sensors to that, instead of H100? I am worried about the future of these devices and potential Matter support in the Future.

@seba1337
Copy link

seba1337 commented Feb 13, 2023

I don't think it's ZigBee compatible.

Anyway I can't find any keyword that I could send to the H100 hub that would get me the connected devices or anything like that. The only thing that works is method: get_device_info

@seba1337 seba1337 mentioned this issue Feb 13, 2023
@petretiandrea
Copy link
Owner

Unfortunately without having the hub phisically, I can't develop a proper integration

@seba1337
Copy link

I have it. How would you approach the problem?

@Jacxel
Copy link

Jacxel commented May 4, 2023

Unfortunately without having the hub phisically, I can't develop a proper integration

I am willing to donate the cost of one if you think there is a chance you might be able to get it working. The hub and its accessories work very well and are great value, I would love to be able to integrate them into my HA setup.

@KennethS2022
Copy link

I'd happily chip in financially as well. Would love to have integration for S220 switches.

@akshaybengani
Copy link

I am willing to donate, if someone can start working on the integration of Tapo H100, Tapo T315, Tapo S200B

@Jacxel
Copy link

Jacxel commented May 16, 2023

I used your plugp100 code to run the state.get_unmapped_state() method on the hub and it returned the following:

{
   "device_id":"802DD58004D46C425A596926B180734E20B87756",
   "fw_ver":"1.2.3 Build 221012 Rel.103821",
   "hw_ver":"1.0",
   "type":"SMART.TAPOHUB",
   "model":"H100",
   "mac":"29-AE-5A-BB-21-0D",
   "hw_id":"F9GG7B5B3B67E8F51EBF6E2BBDE2977B",
   "fw_id":"00000000000000000000000000000000",
   "oem_id":"941591747A8D77AA74916014FEC3AD90",
   "overheated":false,
   "ip":"111.111.1.1",
   "time_diff":0,
   "ssid":"RsGjw7kvbk1lc2g=",
   "rssi":-58,
   "signal_level":2,
   "in_alarm":false,
   "in_alarm_source":"",
   "latitude":000000,
   "longitude":00000,
   "lang":"en_US",
   "avatar":"hub",
   "region":"Europe/Somwehere",
   "specs":"UK",
   "nickname":"VGFwyGDdWI=",
   "has_set_location_info":true
}

I assume it should be possible to create new methods to control the hub and subdevice functionality but I don't really know how, I tried adding a method to set the "in_alarm" parameter to true which i expected to activate the ringer but that didnt seem to happen.

Note: I have replaced most of the potentially identifying details

@NJBILLT
Copy link

NJBILLT commented Jun 4, 2023

Any movement on this request? Is it possible? I'd love to see the H100 hub integrated with HA.

@akshaybengani
Copy link

akshaybengani commented Jun 5, 2023

Screenshot_20230605-071752
Screenshot_20230605-071711

Well I think the Tapo team is working on the alexa integration directly, Yesterday I saw a device in my alexa devices section as tapo button, it gives 4 events, tap, double tap, rotate clockwise and rotate counter clockwise.
I made some alexa routines and it worked for several hours, now again it's not working either some network issue or maybe they are still working on this., So probably we might not need H100 integration directly.

@monkga1
Copy link
Author

monkga1 commented Jun 5, 2023 via email

@peculiarvale
Copy link

I'm also willing to donate to have HA integration for H100, to control sensors like T110

@petretiandrea
Copy link
Owner

I will add support for hub, I'm working on it

@petretiandrea petretiandrea added the enhancement New feature or request label Jun 29, 2023
@Jacxel
Copy link

Jacxel commented Jun 29, 2023

I will add support for hub, I'm working on it

I have a hub and some accessories, I have some basic python knowledge so if I can help I will

@compton2012
Copy link

If it helps, this repo could probably be easily unpicked to give the required functionality:

https://github.com/mihai-dinculescu/tapo

It breaks down all the api calls neccesary for hub comms and works on the same principle of ip/user/password

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 4, 2023
@Mandrake1967
Copy link

+1 for development of H100 support and peripherals

@NJBILLT
Copy link

NJBILLT commented Aug 7, 2023

+1 for development of H100 support and peripherals

It's true. I can see the hub but no sensors. All I can do is ring the doorbell chime.

@NJBILLT
Copy link

NJBILLT commented Aug 25, 2023

Is it supposed to work or is it still in development?

Still in development. I also have the hub and one door sensor and can only ring the hub's chime; can't see the sensor. I'm glad I didn't make big investment in these because we may never see it fully implemented. I'm sure it's a lot of work and there isn't a big demand. They work fine with the cloud and are cheap. In lieu of these, I'm using Z-Wave and they work flawlessly with HA.

@BaerHub
Copy link

BaerHub commented Sep 2, 2023

Same here, bought the H100 and T100 and thought it would work for HA, hoping for development

@petretiandrea
Copy link
Owner

I'm working on it, but require time. While for sensors an integration is working in progress, for button it's technically complex and infeasible. Let me explain, the integration can poll sensors to get proper data and that's ok, but for button the approach is inverse. When you click a button, it's the button which send a "message" to hub and the hub execute a cloud automation. Actually the hub doesn't expose a local "stream" of events, e.g. button pressed, double press, etcc..., so it's not possible to get event in real time and integration to home assistant. This is the same reason why if the hub is offline the automation does not work, cause rely on cloud instead of locally. An improper solution would be to poll high frequency to the hub to capture events, but this generates a lot of unnecessary network traffic

@BaerHub
Copy link

BaerHub commented Sep 6, 2023

I'm working on it, but require time. While for sensors an integration is working in progress, for button it's technically complex and infeasible. Let me explain, the integration can poll sensors to get proper data and that's ok, but for button the approach is inverse. When you click a button, it's the button which send a "message" to hub and the hub execute a cloud automation. Actually the hub doesn't expose a local "stream" of events, e.g. button pressed, double press, etcc..., so it's not possible to get event in real time and integration to home assistant. This is the same reason why if the hub is offline the automation does not work, cause rely on cloud instead of locally. An improper solution would be to poll high frequency to the hub to capture events, but this generates a lot of unnecessary network traffic

thanks for the explanation!
it would be already amazing, if sensors would work, otherwise my motion sensor is lies around

@TheTomahawk
Copy link

Well the motion sensor work for me...

metadata:
  name: Turn on Kitchen Lights on entering the kitchen .
  description: Turn on Kitchen Lights on entering the kitchen

automations:
  starters:
    - device: Kitchen Sensor - Kitchen
      type: device.state.MotionDetection
      state: motionDetectionEventInProgress
      is: true

  condition:
    type: time.between
    before: sunrise+30min
    after: sunset-60min 
    weekdays:
      - MON
      - TUE
      - WED
      - THU
      - FRI
      - SAT
      - SUN
 
  actions:
    - type: device.command.OnOff
      on: true
      devices: Kitchen Light - Kitchen

@BaerHub
Copy link

BaerHub commented Sep 6, 2023 via email

@jamesonuk
Copy link
Contributor

I'm working on it, but require time. While for sensors an integration is working in progress, for button it's technically complex and infeasible. Let me explain, the integration can poll sensors to get proper data and that's ok, but for button the approach is inverse. When you click a button, it's the button which send a "message" to hub and the hub execute a cloud automation. Actually the hub doesn't expose a local "stream" of events, e.g. button pressed, double press, etcc..., so it's not possible to get event in real time and integration to home assistant. This is the same reason why if the hub is offline the automation does not work, cause rely on cloud instead of locally. An improper solution would be to poll high frequency to the hub to capture events, but this generates a lot of unnecessary network traffic

Yep I get events are a pain. I know it is Rust and I haven't actually looked at it but wonder if https://github.com/mihai-dinculescu/tapo/blob/main/src/api/hub_handler.rs might help at all? Says it took inspiration from your work so could have a similar logical base at some level?

@petretiandrea
Copy link
Owner

I'm working on it, but require time. While for sensors an integration is working in progress, for button it's technically complex and infeasible. Let me explain, the integration can poll sensors to get proper data and that's ok, but for button the approach is inverse. When you click a button, it's the button which send a "message" to hub and the hub execute a cloud automation. Actually the hub doesn't expose a local "stream" of events, e.g. button pressed, double press, etcc..., so it's not possible to get event in real time and integration to home assistant. This is the same reason why if the hub is offline the automation does not work, cause rely on cloud instead of locally. An improper solution would be to poll high frequency to the hub to capture events, but this generates a lot of unnecessary network traffic

Yep I get events are a pain. I know it is Rust and I haven't actually looked at it but wonder if https://github.com/mihai-dinculescu/tapo/blob/main/src/api/hub_handler.rs might help at all? Says it took inspiration from your work so could have a similar logical base at some level?

My implementation is similar, but tapo doesn't offer a stream of events for button "clicks". The only way is polling, but I think is not a good way cause generate a lot of cpu and network waste

@jamesonuk
Copy link
Contributor

jamesonuk commented Sep 12, 2023

Ah yeah just dug a little into the code and I can see it grabs trigger logs
https://github.com/mihai-dinculescu/tapo/blob/main/src/api/child_devices/s200b_handler.rs

Can't see that working for a button. Shame but totally understand.

@petretiandrea
Copy link
Owner

Immagine 2023-09-12 224447

Working in progress 💪

@petretiandrea
Copy link
Owner

Ah yeah just dug a little into the code and I can see it grabs trigger logs https://github.com/mihai-dinculescu/tapo/blob/main/src/api/child_devices/s200b_handler.rs

Can't see that working for a button. Shame but totally understand.

Yes, but you get event logs when you ask for them by calling the proper method. An event stream is a push approach to be notified when something change, like button pressure

@Hatzefatz
Copy link

Hi!

That looks very great!

I'm using those devices already long time just for tapo automation. I did started using Home assistant and can't wait for that integration!

Can you let us know, how long you thing it will take to give us a alpha or beta version for those sensors TP310??

Thank you very much,
Henrik

@monisha15081996
Copy link

Hi,
I have managed to pair and integrate the Tapo Hub H100 with Home assistant. The siren works fine. However I am not able to add the Tapo T100 motion sensors since they do not have dedicated ip addresses. Could you please help me integrate the Tapo T100 motion sensors with home assistant?

@BaerHub
Copy link

BaerHub commented Sep 18, 2023

Hi, I have managed to pair and integrate the Tapo Hub H100 with Home assistant. The siren works fine. However I am not able to add the Tapo T100 motion sensors since they do not have dedicated ip addresses. Could you please help me integrate the Tapo T100 motion sensors with home assistant?

same here, im also waiting for a update <3

@vishn9893
Copy link

Ah yeah just dug a little into the code and I can see it grabs trigger logs https://github.com/mihai-dinculescu/tapo/blob/main/src/api/child_devices/s200b_handler.rs
Can't see that working for a button. Shame but totally understand.

Yes, but you get event logs when you ask for them by calling the proper method. An event stream is a push approach to be notified when something change, like button pressure

Ciao Andrea,
Would it be possible to integrate just a portion of the child-devices for the hub H100 as a custom plugin, In my case as well I have a hub h100 and a couple of T100 sensors i guess for the other people above who mentioned as well who have a similar setup needed for detection/monitoring in this case the trigger (event triggers) could be done using the api call that makes an HTTP GET request to the Tapo API endpoint correct?

@petretiandrea
Copy link
Owner

Release 2.9.0 is out now! It supports hub's devices, actually I've tested physically with T31 and S200, but I've extended support to other devices like smart door and motion sensor. Feel free to open new issues

@DimiTerz
Copy link
Contributor

Hi,
thanks for the big update regarding the HUB. I have S210 and S220 light switches paired to the Hub. Atfter 2.9.0 all switches are listed as devices but do't have any controls. Are there plans to expand the Hub support to this devices as well?

@ondrejsmola
Copy link

Hi,
thanks for your work. I can finally see temp/hum. sensors and I see there exist door sensors. But I don't see state of door sensors. When I look to log, I see some errors. I run HA in in Docker.

2023-09-21 10:17:18 2023-09-21 10:17:18.312 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.333 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tapo platform for binary_sensor 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform 2023-09-21 10:17:18 await asyncio.gather(*pending) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.366 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Error communication with API: Server disconnected 2023-09-21 10:17:18 2023-09-21 10:17:18.376 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Error communication with API: Server disconnected 2023-09-21 10:17:18 2023-09-21 10:17:18.840 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.955 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.970 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:27:48 2023-09-21 10:27:48.505 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Unexpected exception: Clock moved backwards. Refusing to generate ID.

@CaptainMidnight
Copy link

@petretiandrea a massive thank you to you, my temperature and humidity sensors are working perfectly.

Thank you my friend for all your hard work!

Enjoy the coffees

@NJBILLT
Copy link

NJBILLT commented Sep 21, 2023

Thank you for working on this., I see it's working for many. I only have a contact closure on a door. With the update, I see it as a device, but the only 2 entities it has are the battery and report interval. I don't know when it opens and closes. Am I doing something wrong? Again a big thank you and I'm sure this will only get better.

@DominionZA
Copy link

DominionZA commented Sep 21, 2023 via email

@RaidentaylorFilipeLeite85
Copy link

RaidentaylorFilipeLeite85 commented Sep 23, 2023

Thank you for working on this., I see it's working for many. I only have a contact closure on a door. With the update, I see it as a device, but the only 2 entities it has are the battery and report interval. I don't know when it opens and closes. Am I doing something wrong? Again a big thank you and I'm sure this will only get better.

Same with me. The state of device is missing:
IMG_2353

@petretiandrea
Copy link
Owner

S210 and S220

Actually are not supported, please open a new issue where you request support these two devices

@petretiandrea
Copy link
Owner

petretiandrea commented Sep 23, 2023

Hi, thanks for your work. I can finally see temp/hum. sensors and I see there exist door sensors. But I don't see state of door sensors. When I look to log, I see some errors. I run HA in in Docker.

2023-09-21 10:17:18 2023-09-21 10:17:18.312 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.333 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tapo platform for binary_sensor 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform 2023-09-21 10:17:18 await asyncio.gather(*pending) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.366 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Error communication with API: Server disconnected 2023-09-21 10:17:18 2023-09-21 10:17:18.376 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Error communication with API: Server disconnected 2023-09-21 10:17:18 2023-09-21 10:17:18.840 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.955 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:17:18 2023-09-21 10:17:18.970 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entities for domain binary_sensor with platform tapo 2023-09-21 10:17:18 Traceback (most recent call last): 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities 2023-09-21 10:17:18 await asyncio.gather(*tasks) 2023-09-21 10:17:18 File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 590, in _async_add_entity 2023-09-21 10:17:18 if entity.unique_id is not None: 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 File "/config/custom_components/tapo/hub/binary_sensor.py", line 38, in unique_id 2023-09-21 10:17:18 return super().unique_id + "_" + self._attr_name.replace(" ", "_") 2023-09-21 10:17:18 ^^^^^^^^^^^^^^^^^^^^^^^ 2023-09-21 10:17:18 AttributeError: 'NoneType' object has no attribute 'replace' 2023-09-21 10:27:48 2023-09-21 10:27:48.505 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Unexpected exception: Clock moved backwards. Refusing to generate ID.

Refers to #530

@petretiandrea
Copy link
Owner

I will close this issue, cause some devices are actually integrated with HA. Each specific issue related to a HUB child device must be reported to a new issue

Thank you for working on this., I see it's working for many. I only have a contact closure on a door. With the update, I see it as a device, but the only 2 entities it has are the battery and report interval. I don't know when it opens and closes. Am I doing something wrong? Again a big thank you and I'm sure this will only get better.

Thank you for working on this., I see it's working for many. I only have a contact closure on a door. With the update, I see it as a device, but the only 2 entities it has are the battery and report interval. I don't know when it opens and closes. Am I doing something wrong? Again a big thank you and I'm sure this will only get better.

Refers to #530

@petretiandrea
Copy link
Owner

I will close this issue cause child devices are actually supported. Any issue related to specific child device require a new issue

@bouledrouasam
Copy link

is there any solution for the smart button s200b

@ados8
Copy link

ados8 commented Nov 16, 2024

For those looking for any workaround I found a way.
#784 (comment)

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
Development

No branches or pull requests