petretiandrea / home-assistant-tapo-p100

A custom integration to control Tapo devices from home assistant.
MIT License
776 stars 99 forks source link

H100 Hub not connecting to Integration if T110 Sensor is connected to the Hub #759

Open Nerot0 opened 2 months ago

Nerot0 commented 2 months ago

3.1.2

Configuration

H100 Hardware Version 1.0
Firmware 1.5.10 Build 240207 Rel.175759

T110 Hardware Version 1.0
Firmware 1.9.0 Build 230704 Rel.154531

Describe the bug

I am using a H100 Hub with a T110 and a T300 Sensor. The Integration works fine if only the T300 Sensor is connected to the Hub.

If the T110 is connected to the Hub the Integration stops working. Integration starts working again if T110 is removed from Hub.

Removing the T300 does not change anything about this behavior.

Debug log


2024-04-21 11:15:12.111 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 317, in _async_get_device
await device.update()
File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
await component.update(state)
File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/hub_children_component.py", line 47, in update
await child_device.update()
File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
await component.update(state)
File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py", line 15, in update
self.is_open = current_state["is_open"]
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'is_open'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 143, in async_step_user
device = await self._async_get_device(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 322, in _async_get_device
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect
realcnk commented 2 months ago

Me too. About 6 hours ago, tapo controller fails and shows "Failed to connect" message when try to reconfigure. Delete integration and reinstall it not works.

davidsanz commented 2 months ago

Me too. After update from 3.1.0 version i see this error. Searching in my implementation can´t find "is_open". Devices: Hub H100 Sensor P110

Vicrah commented 2 months ago

Please, I need help too. I've also tried changing my password to lower case and limiting it to 8 characters, but it's still not working after the last update. Here's my log:

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: custom_components.tapo.config_flow
Fonte: custom_components/tapo/config_flow.py:143
Integrazione: TP-Link Tapo (documentazione, problemi)
Prima occorrenza: 22:55:47 (1 occorrenze)
Ultima registrazione: 22:55:47

Failed to setup cannot connect
Traceback (most recent call last):
  File "/config/custom_components/tapo/config_flow.py", line 317, in _async_get_device
    await device.update()
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
    await component.update(state)
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/hub_children_component.py", line 47, in update
    await child_device.update()
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
    await component.update(state)
  File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py", line 15, in update
    self.is_open = current_state["is_open"]
                   ~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'is_open'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/tapo/config_flow.py", line 143, in async_step_user
    device = await self._async_get_device(user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 322, in _async_get_device
    raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

Any suggestions would be greatly appreciated. @petretiandrea need your help :)

realcnk commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

Saftlad commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

That's only a workaround if you already have a Matter hub. Having another hub to connect to a hub seems a bit ott

Same issue here though. 2x hubs with T110 sensors reporting Failed Setup

realcnk commented 2 months ago

Tapo Hub is a matter hub, i don't have any other hub. Try this solution, my hub and sensors are working again.

Saftlad commented 2 months ago

Tapo Hub is a matter hub, i don't have any other hub. Try this solution, my hub and sensors are working again.

Ah, gotcha thanks. I was trying to find it through the desktop app, but it seems a lot easier to setup via mobile

realcnk commented 2 months ago

Mobile app is the way, via desktop tells you to go to mobile HA app

seba1337 commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

That's only a workaround if you already have a Matter hub. Having another hub to connect to a hub seems a bit ott

Same issue here though. 2x hubs with T110 sensors reporting Failed Setup

I have an old hub and it seems that it received Matter support with some firmware update. The workaround actually works. It works now via Matter.

Vicrah commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

Thank you for your suggestion. Unfortunately, I am also having trouble with the Matter integration. It doesn't seem to be working and I can't even get it to start. I would appreciate any other suggestions or solutions you might have.

Here’s the supervisor log and matter one:

2024-04-23 23:04:12.131 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-04-23 23:04:13.038 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to NOT_RUNNING
2024-04-23 23:05:23.164 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to RUNNING
2024-04-23 23:05:23.164 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
2024-04-23 23:05:23.165 INFO (MainThread) [supervisor.homeassistant.core] Successfully started Home Assistant 2024.4.4
2024-04-23 23:05:24.796 INFO (SyncWorker_0) [supervisor.docker.manager] Cleanup images: ['ghcr.io/home-assistant/qemux86-64-homeassistant:2024.4.3']
2024-04-23 23:05:29.258 WARNING (MainThread) [supervisor.addons.addon] core_matter_server is already running!
2024-04-23 23:07:29.266 WARNING (MainThread) [supervisor.addons.addon] Timeout while waiting for addon Matter Server to start, took more than 120 seconds
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service banner: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started

-----------------------------------------------------------
 Add-on: Matter Server
 Matter WebSocket Server for Home Assistant Matter support.
-----------------------------------------------------------
 Add-on version: 5.5.1
 You are running the latest version of this add-on.
 System: null  (amd64 / qemux86-64)
 Home Assistant Core: 2024.4.3
 Home Assistant Supervisor: 2024.04.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service banner successfully started
s6-rc: info: service matter-server: starting
s6-rc: info: service matter-server successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[21:11:08] INFO: Starting Matter Server...
[21:11:08] WARNING: Trying fallback method to determine primary interface
[21:11:08] INFO: Using 'eth0' as primary network interface.
[21:11:09] INFO: Successfully send discovery information to Home Assistant.
2024-04-23 21:11:12.360 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Logging...
2024-04-23 21:11:12.361 (MainThread) INFO [matter_server.server.stack] Initializing CHIP/Matter Controller Stack...
[1713899472.574287][126:126] CHIP:CTL: Setting attestation nonce to random value
[1713899472.574684][126:126] CHIP:CTL: Setting CSR nonce to random value
[1713899472.576544][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1713899472.576747][126:126] CHIP:DL: writing settings to file (/tmp/chip_kvs-RoV3fJ)
[1713899472.576835][126:126] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1713899472.577143][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1713899472.577254][126:126] CHIP:DL: writing settings to file (/data/chip_factory.ini-NijsUI)
[1713899472.577305][126:126] CHIP:DL: renamed tmp file to file (/data/chip_factory.ini)
[1713899472.577326][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_config.ini
[1713899472.577374][126:126] CHIP:DL: writing settings to file (/data/chip_config.ini-ABVncL)
[1713899472.577422][126:126] CHIP:DL: renamed tmp file to file (/data/chip_config.ini)
[1713899472.577438][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_counters.ini
[1713899472.577485][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-k8muvI)
[1713899472.577559][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1713899472.577921][126:126] CHIP:DL: writing settings to file (/data/chip_factory.ini-yqx5nJ)
[1713899472.578065][126:126] CHIP:DL: renamed tmp file to file (/data/chip_factory.ini)
[1713899472.578074][126:126] CHIP:DL: NVS set: chip-factory/unique-id = "DCA07539B2790BAB"
[1713899472.578156][126:126] CHIP:DL: writing settings to file (/data/chip_factory.ini-XDYWeJ)
[1713899472.578278][126:126] CHIP:DL: renamed tmp file to file (/data/chip_factory.ini)
[1713899472.578287][126:126] CHIP:DL: NVS set: chip-factory/vendor-id = 65521 (0xFFF1)
[1713899472.578360][126:126] CHIP:DL: writing settings to file (/data/chip_factory.ini-dlWNbH)
[1713899472.578531][126:126] CHIP:DL: renamed tmp file to file (/data/chip_factory.ini)
[1713899472.578545][126:126] CHIP:DL: NVS set: chip-factory/product-id = 32769 (0x8001)
[1713899472.578634][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-XjUV5G)
[1713899472.578747][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1713899472.578758][126:126] CHIP:DL: NVS set: chip-counters/reboot-count = 1 (0x1)
[1713899472.578855][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-1rjWBK)
[1713899472.579033][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1713899472.579047][126:126] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0)
[1713899472.579126][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-eijXBK)
[1713899472.579255][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1713899472.579267][126:126] CHIP:DL: NVS set: chip-counters/boot-reason = 0 (0x0)
[1713899472.579359][126:126] CHIP:DL: writing settings to file (/data/chip_config.ini-1ha8GJ)
[1713899472.579544][126:126] CHIP:DL: renamed tmp file to file (/data/chip_config.ini)
[1713899472.579558][126:126] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0)
[1713899472.579657][126:126] CHIP:DL: writing settings to file (/data/chip_config.ini-hPZvNI)
[1713899472.579817][126:126] CHIP:DL: renamed tmp file to file (/data/chip_config.ini)
[1713899472.579830][126:126] CHIP:DL: NVS set: chip-config/location-capability = 2 (0x2)
[1713899472.580208][126:126] CHIP:DL: Got Ethernet interface: eth0
[1713899472.580439][126:126] CHIP:DL: Found the primary Ethernet interface:eth0
[1713899472.580827][126:126] CHIP:DL: Failed to get WiFi interface
[1713899472.580837][126:126] CHIP:DL: Failed to reset WiFi statistic counts
2024-04-23 21:11:12.581 (MainThread) WARNING [PersistentStorage] Initializing persistent storage from file: /data/chip.json
2024-04-23 21:11:12.581 (MainThread) ERROR [root] [Errno 2] No such file or directory: '/data/chip.json'
2024-04-23 21:11:12.581 (MainThread) CRITICAL [root] Could not load configuration from /data/chip.json - resetting configuration...
2024-04-23 21:11:12.581 (MainThread) WARNING [root] No valid SDK configuration present - clearing out configuration
2024-04-23 21:11:12.581 (MainThread) WARNING [root] No valid REPL configuration present - clearing out configuration
2024-04-23 21:11:12.645 (MainThread) WARNING [CertificateAuthorityManager] Loading certificate authorities from storage...
2024-04-23 21:11:12.645 (MainThread) WARNING [CertificateAuthority] New CertificateAuthority at index 1
2024-04-23 21:11:12.648 (MainThread) WARNING [FabricAdmin] New FabricAdmin: FabricId: 0x0000000000000002, VendorId = 0x134B
2024-04-23 21:11:12.649 (MainThread) INFO [matter_server.server.stack] CHIP Controller Stack initialized.
2024-04-23 21:11:12.651 (MainThread) INFO [matter_server.server.server] Starting the Matter Server...
2024-04-23 21:11:12.654 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Fetching the latest PAA root certificates from DCL.
2024-04-23 21:11:17.352 (ThreadPoolExecutor-0_0) WARNING [py.warnings] /usr/local/lib/python3.11/concurrent/futures/thread.py:58: CryptographyDeprecationWarning: The parsed certificate contains a NULL parameter value in its signature algorithm parameters. This is invalid and will be rejected in a future version of cryptography. If this certificate was created via Java, please upgrade to JDK21+ or the latest JDK11/17 once a fix is issued. If this certificate was created in some other fashion please report the issue to the cryptography issue tracker. See https://github.com/pyca/cryptography/issues/8996 and https://github.com/pyca/cryptography/issues/9253 for more details.
  result = self.fn(*self.args, **self.kwargs)

2024-04-23 21:11:24.466 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Fetched 131 PAA root certificates from DCL.
2024-04-23 21:11:24.467 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Fetching the latest PAA root certificates from Git.
2024-04-23 21:11:39.360 (MainThread) INFO [matter_server.server.helpers.paa_certificates] Fetched 90 PAA root certificates from Git.
2024-04-23 21:11:39.361 (MainThread) WARNING [FabricAdmin] Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000002, NodeId: 0x000000000001B669, CatTags: []
2024-04-23 21:11:39.592 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 231 ms, for event type 2
2024-04-23 21:11:39.594 (MainThread) INFO [matter_server.server.device_controller] Loaded 0 nodes from stored configuration
2024-04-23 21:11:39.602 (MainThread) INFO [matter_server.server.vendor_info] Loading vendor info from storage.
2024-04-23 21:11:39.602 (MainThread) INFO [matter_server.server.vendor_info] Loaded 0 vendors from storage.
2024-04-23 21:11:39.602 (MainThread) INFO [matter_server.server.vendor_info] Fetching the latest vendor info from DCL.
2024-04-23 21:11:39.898 (MainThread) INFO [matter_server.server.vendor_info] Fetched 186 vendors from DCL.
2024-04-23 21:11:39.899 (MainThread) INFO [matter_server.server.vendor_info] Saving vendor info to storage.

At this point, I'm at my wits’ end...

seba1337 commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

Thank you for your suggestion. Unfortunately, I am also having trouble with the Matter integration. It doesn't seem to be working and I can't even get it to start. I would appreciate any other suggestions or solutions you might have.

I've had troubles at first how to add it. Here the instructions:

You go first to your Tapo app on your phone, tap on the hub, tap on the upper right setting icon (nut), tap on to "Bind to Matter (Beta)", scroll down and copy the code in the form 1234-123-1234 under the QR code. Now quickly (I think you have 15 min) go to your HA, Settings, Devices & Services. Click on the lower right "+ Add Integration". Click "Add Matter Device". Click "Yes. It's already in use". Click "Other controllers". Copy paste the code you got from the Tapo app inside the "Setup code" input and click Add Device.

The Matter integration of the hub lacks thou a few things: you can't activate the siren, you can't read the battery status or the signal strength, but otherwise it works. Might be that the sensors like motion or open/close sensor are even of push type and not pull as it's now, I need to check. This would be a good thing as you would get the events instantly.

redradoa commented 2 months ago

Workarround: add matter beta addin to home assistant, activate matter beta in tapo app in the tapo hub settings, configure with matter code, add to home assistant integration. It works, more faster than tapo controler custom integration.

Thank you for your suggestion. Unfortunately, I am also having trouble with the Matter integration. It doesn't seem to be working and I can't even get it to start. I would appreciate any other suggestions or solutions you might have.

I've had troubles at first how to add it. Here the instructions:

You go first to your Tapo app on your phone, tap on the hub, tap on the upper right setting icon (nut), tap on to "Bind to Matter (Beta)", scroll down and copy the code in the form 1234-123-1234 under the QR code. Now quickly (I think you have 15 min) go to your HA, Settings, Devices & Services. Click on the lower right "+ Add Integration". Click "Add Matter Device". Click "Yes. It's already in use". Click "Other controllers". Copy paste the code you got from the Tapo app inside the "Setup code" input and click Add Device.

The Matter integration of the hub lacks thou a few things: you can't activate the siren, you can't read the battery status or the signal strength, but otherwise it works. Might be that the sensors like motion or open/close sensor are even of push type and not pull as it's now, I need to check. This would be a good thing as you would get the events instantly.

This is the answer that I have been looking for more than two weeks. Thank you very much!!

Beatz89 commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Vicrah commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Hi mate. I recently found a workaround for me.

I try to rollback to a previous version of ha core (2024.3) then I try to update selectively every component.

Now I’m on the last version of core and not the latest of Tapo controller. The last one generate the signature problem for me.

Beatz89 commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Hi mate. I recently found a workaround for me.

I try to rollback to a previous version of ha core (2024.3) then I try to update selectively every component.

Now I’m on the last version of core and not the latest of Tapo controller. The last one generate the signature problem for me.

What version of the controller are you using? I rolled mine back to the last version but that didn't work for me, just wondering how far back I need to go.

Vicrah commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Hi mate. I recently found a workaround for me. I try to rollback to a previous version of ha core (2024.3) then I try to update selectively every component. Now I’m on the last version of core and not the latest of Tapo controller. The last one generate the signature problem for me.

What version of the controller are you using? I rolled mine back to the last version but that didn't work for me, just wondering how far back I need to go.

Atm, I’m on 3.0 of the Tapo controller and last version of ha core.

Beatz89 commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Hi mate. I recently found a workaround for me. I try to rollback to a previous version of ha core (2024.3) then I try to update selectively every component. Now I’m on the last version of core and not the latest of Tapo controller. The last one generate the signature problem for me.

What version of the controller are you using? I rolled mine back to the last version but that didn't work for me, just wondering how far back I need to go.

Atm, I’m on 3.0 of the Tapo controller and last version of ha core.

Cheers! Will give this a try when I get home! 🤞

Beatz89 commented 2 months ago

Any update on this? Really needing to be able to use the Hubs Siren & ability top change the tone on the hub, matter works to check the sensors but pretty useless without being able to sound the alarm! - Anyone have any other workarounds for this?

Hi mate. I recently found a workaround for me. I try to rollback to a previous version of ha core (2024.3) then I try to update selectively every component. Now I’m on the last version of core and not the latest of Tapo controller. The last one generate the signature problem for me.

What version of the controller are you using? I rolled mine back to the last version but that didn't work for me, just wondering how far back I need to go.

Atm, I’m on 3.0 of the Tapo controller and last version of ha core.

Cheers! Will give this a try when I get home! 🤞

Worked perfectly! Rolled back and voila could add the hub and it showed my sensors immediately after.

tallackn commented 2 months ago

Me too. Sadly I can't get the matter thing to work either. Never has worked with any of my kit. Methinks I have the matter hub setup wrong.

Don't want to be rolling back the core. Will wait for them to fix this integration I think. Should not be too long I hope. :(

khodgson commented 2 months ago

The rollback worked for me, but it's meant I've lost a month's worth of data annoyingly. Looking forward to having this issue resolved so I can be on the latest rollout.

itrack commented 2 months ago

Same error, any update?

Beatz89 commented 2 months ago

Same error, any update?

No update as yet, still rolling back to tapo 3.0.0 seems to fix it(I haven't had problems yet) although on a recent fresh install I had to redownlpad version 3.0.0 about 3/4 times before it started working 😕

Danconnolly commented 1 month ago

I'm also affected.

Danconnolly commented 1 month ago

The problem is actually in plugp100. See PR https://github.com/petretiandrea/plugp100/pull/189

For users who want to take some risks, if you dare with no support from me:

  1. update file /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py
  2. on line 15 (last line), replace "is_open" with "open" near the end of the line. So resultant line is self.is_open = current_state["open"]
  3. restart Home Assistant
Beatz89 commented 1 month ago

The problem is actually in plugp100. See PR https://github.com/petretiandrea/plugp100/pull/189

For users who want to take some risks, if you dare with no support from me:

  1. update file /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py
  2. on line 15 (last line), replace "is_open" with "open" near the end of the line. So resultant line is self.is_open = current_state["open"]
  3. restart Home Assistant

Thanks Dan, will try this out tonight

realcnk commented 1 month ago

The problem is actually in plugp100. See PR petretiandrea/plugp100#189

For users who want to take some risks, if you dare with no support from me:

  1. update file /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py
  2. on line 15 (last line), replace "is_open" with "open" near the end of the line. So resultant line is self.is_open = current_state["open"]
  3. restart Home Assistant

Hi. Where is the location of smart_door_component.py in Home Assistant OS? In my VM the python3.12 directory is not found in /usr/local/lib

Danconnolly commented 1 month ago

I"m afraid I dont have the OS version so I cant check, and it would be difficult for me to get it. Is there a different python directory there, such as python3.10, or python3.9?

realcnk commented 1 month ago

I"m afraid I dont have the OS version so I cant check, and it would be difficult for me to get it. Is there a different python directory there, such as python3.10, or python3.9?

There is no any Python directory

DarthSonic commented 1 month ago

@Danconnolly unfortunately there is no python* or plugp100 directory in Home Assistant OS. Also, I cannot find smart_door_component.py file. Or at least none of them is visible for ftp tool.

beeeeswax commented 1 month ago

As others are saying, where are these mysterious python directories and files? I have the same path in my HA logs:

/usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py

But when I SSH into HA, there are no files or directories anything like this. You can manually install the Tapo integration just by extracting the custom_components directory from the Github to your HA install so where do Python3.x folders and plugp100 related files come from?

calentadorsolarpasoapaso commented 1 month ago

The problem is actually in plugp100. See PR petretiandrea/plugp100#189

For users who want to take some risks, if you dare with no support from me:

1. update file /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py

2. on line 15 (last line), replace "is_open" with "open" near the end of the line. So resultant line is `self.is_open = current_state["open"]`

3. restart Home Assistant

Worked to me, Thanks!!

DarthSonic commented 1 month ago

Is there any hope HAOS user will get a fix soon?

tallackn commented 3 weeks ago

As others are saying, where are these mysterious python directories and files? I have the same path in my HA logs:

/usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py

But when I SSH into HA, there are no files or directories anything like this. You can manually install the Tapo integration just by extracting the custom_components directory from the Github to your HA install so where do Python3.x folders and plugp100 related files come from?

You need to get into the docker container and edit it there. You can do that at the command line by running this command:

docker exec -it homeassistant /bin/bash

Remember to logout and restart home assistant once you have made the change.

DarthSonic commented 3 weeks ago

As others are saying, where are these mysterious python directories and files? I have the same path in my HA logs: /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py But when I SSH into HA, there are no files or directories anything like this. You can manually install the Tapo integration just by extracting the custom_components directory from the Github to your HA install so where do Python3.x folders and plugp100 related files come from?

You need to get into the docker container and edit it there. You can do that at the command line by running this command:

docker exec -it homeassistant /bin/bash

Remember to logout and restart home assistant once you have made the change.

There is no docker container when using HAOS.

gitTerracide commented 2 weeks ago

As others are saying, where are these mysterious python directories and files? I have the same path in my HA logs: /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py But when I SSH into HA, there are no files or directories anything like this. You can manually install the Tapo integration just by extracting the custom_components directory from the Github to your HA install so where do Python3.x folders and plugp100 related files come from?

You need to get into the docker container and edit it there. You can do that at the command line by running this command:

docker exec -it homeassistant /bin/bash

Remember to logout and restart home assistant once you have made the change.

WORKED FOR ME!!! w00t!

Thank you @tallackn for the docker command! Worked like a boss! Thank you @Danconnolly - the edit sorted everything out! Legends, thanks guys!

@ Those unsure they want to try an edit. Easiest comfort is to make a backup of the file before you edit. This way you can just delete the original and rename the backup back, if theres any disaster typos. :)

make a backup of the file:

cp smart_door_component.py smart_door_component.py_backup

then edit the file:

vi smart_door_component.py

then press INSERT to go into edit mode. edit as per the post. press ESCAPE once done to go back to command mode. then save the file by typing :wq and then press enter. restart HA as stated in @tallackn and @Danconnolly's posts.

For reference. I am running HA as a VMWare Workstation VM. HAOS 12.3. Core 2024.6.1. Supervisor 2024.06.02.

beeeeswax commented 1 week ago

As others are saying, where are these mysterious python directories and files? I have the same path in my HA logs: /usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py But when I SSH into HA, there are no files or directories anything like this. You can manually install the Tapo integration just by extracting the custom_components directory from the Github to your HA install so where do Python3.x folders and plugp100 related files come from?

You need to get into the docker container and edit it there. You can do that at the command line by running this command:

docker exec -it homeassistant /bin/bash

Remember to logout and restart home assistant once you have made the change.

This command doesn't work for me on my VMWare Workstation HAOS machine. I get the error:

Error: Unknown shorthand flag: 'i' in -it FATAL[0000] Error while executin rootCmd: Unknown shorthand flag: 'i' in -it

Still have no idea how to perform this simple edit :(