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

Tahoma component stopped working after Connexoon firmware last update #37291

Closed
cdeharo opened this issue Jul 1, 2020 · 8 comments · Fixed by #43966
Closed

Tahoma component stopped working after Connexoon firmware last update #37291

cdeharo opened this issue Jul 1, 2020 · 8 comments · Fixed by #43966

Comments

@cdeharo
Copy link

cdeharo commented Jul 1, 2020

The problem

Tahoma component started failing after upgrading Connexoon firmware to latest version.

Before updating the firmware Tahoma component works fine.

After updating the firmware using the Connexoon Terrace app and before rebooting HA the awning is able to open or close from the HA, but it is not reporting its position.

Once HA is rebooted, the component isn't able to be loaded and logs the message shown in the Traceback/Error logs section.

Environment

  • Home Assistant Core release with the issue: 0.111.4
  • Last working Home Assistant Core release (if known): 0.111.4
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: Tahoma
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/tahoma/

Problem-relevant configuration.yaml

tahoma:
  username: !secret connexoon_username
  password: !secret connexoon_password
  exclude: [PodMiniComponent]

Traceback/Error logs

2020-07-01 08:52:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component tahoma
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 190, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tahoma/__init__.py", line 88, in setup
    api.get_setup()
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 156, in get_setup
    self._get_setup(result)
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 167, in _get_setup
    device = Device(self, device_data)
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 689, in __init__
    "' has not been defined: " + debug_output)
ValueError: Active state 'core:NameState' has not been defined: {"creationTime": 1593526239000, "lastUpdateTime": 1593526239000, "label": "OGP KNX Bridge", "deviceURL": "ogp://xxxx-xxxx-xxxx/xxxxxxx", "shortcut": false, "controllableName": "ogp:Bridge", "definition": {"commands": [{"commandName": "sendPrivate", "nparams": 1}], "states": [{"type": "DataState", "qualifiedName": "core:Private10State"}, {"type": "DataState", "qualifiedName": "core:Private1State"}, {"type": "DataState", "qualifiedName": "core:Private2State"}, {"type": "DataState", "qualifiedName": "core:Private3State"}, {"type": "DataState", "qualifiedName": "core:Private4State"}, {"type": "DataState", "qualifiedName": "core:Private5State"}, {"type": "DataState", "qualifiedName": "core:Private6State"}, {"type": "DataState", "qualifiedName": "core:Private7State"}, {"type": "DataState", "qualifiedName": "core:Private8State"}, {"type": "DataState", "qualifiedName": "core:Private9State"}], "dataProperties": [], "widgetName": "DynamicBridge", "uiClass": "ProtocolGateway", "qualifiedName": "ogp:Bridge", "type": "ACTUATOR"}, "states": [{"name": "core:NameState", "type": 3, "value": "OGP KNX Bridge"}], "attributes": [{"name": "core:Manufacturer", "type": 3, "value": "Overkiz"}, {"name": "core:ManufacturerReference", "type": 3, "value": "OGP KNX Bridge"}, {"name": "ogp:Features", "type": 10, "value": [{"name": "private"}]}, {"name": "core:Technology", "type": 3, "value": "KNX"}], "available": true, "enabled": true, "placeOID": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx", "widget": "DynamicBridge", "type": 1, "oid": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", "uiClass": "ProtocolGateway"}

Additional information

@probot-home-assistant
Copy link

Hey there @philklei, mind taking a look at this issue as its been labeled with an integration (tahoma) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@cdeharo
Copy link
Author

cdeharo commented Jul 1, 2020

Updated to 0.112.0 without any changes.

@jensihnow
Copy link
Contributor

Conversation about the same issue https://community.home-assistant.io/t/tahoma-error-during-setup/208515

@jensihnow
Copy link
Contributor

Seems to be related to the new ogp:Bridge device type:

    {
      "creationTime": 1593547968000,
      "lastUpdateTime": 1593547968000,
      "label": "OGP KNX Bridge",
      "deviceURL": "ogp://xxxx-xxxx-xxxx/xxxx",
      "shortcut": false,
      "controllableName": "ogp:Bridge",
      "definition": {
        "commands": [
          {
            "commandName": "sendPrivate",
            "nparams": 1
          }
        ],
        "states": [
          {
            "type": "DataState",
            "qualifiedName": "core:Private10State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private1State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private2State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private3State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private4State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private5State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private6State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private7State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private8State"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:Private9State"
          }
        ],
        "dataProperties": [],
        "widgetName": "DynamicBridge",
        "uiClass": "ProtocolGateway",
        "qualifiedName": "ogp:Bridge",
        "type": "ACTUATOR"
      },
      "states": [
        {
          "name": "core:NameState",
          "type": 3,
          "value": "OGP KNX Bridge"
        }
      ],
      "attributes": [
        {
          "name": "core:Manufacturer",
          "type": 3,
          "value": "Overkiz"
        },
        {
          "name": "ogp:Features",
          "type": 10,
          "value": [
            {
              "name": "private"
            }
          ]
        },
        {
          "name": "core:Technology",
          "type": 3,
          "value": "KNX"
        },
        {
          "name": "core:ManufacturerReference",
          "type": 3,
          "value": "OGP KNX Bridge"
        }
      ],
      "available": true,
      "enabled": true,
      "placeOID": "xxxx",
      "widget": "DynamicBridge",
      "type": 1,
      "oid": "xxxx",
      "uiClass": "ProtocolGateway"
    },
    {
      "creationTime": 1593547969000,
      "lastUpdateTime": 1593547969000,
      "label": "OGP Siegenia Bridge",
      "deviceURL": "ogp://xxxx-xxxx-xxxx/xxxx",
      "shortcut": false,
      "controllableName": "ogp:Bridge",
      "definition": {
        "commands": [
          {
            "commandName": "discover",
            "nparams": 0
          },
          {
            "commandName": "identify",
            "nparams": 0
          },
          {
            "commandName": "setName",
            "nparams": 1
          }
        ],
        "states": [
          {
            "values": [
              "available",
              "unavailable"
            ],
            "type": "DiscreteState",
            "qualifiedName": "core:AvailabilityState"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:NameState"
          }
        ],
        "dataProperties": [],
        "widgetName": "DynamicBridge",
        "uiClass": "ProtocolGateway",
        "qualifiedName": "ogp:Bridge",
        "type": "ACTUATOR"
      },
      "states": [
        {
          "name": "core:NameState",
          "type": 3,
          "value": "OGP Siegenia Bridge"
        }
      ],
      "attributes": [
        {
          "name": "core:Manufacturer",
          "type": 3,
          "value": "Overkiz"
        },
        {
          "name": "core:ManufacturerReference",
          "type": 3,
          "value": "OGP Siegenia Bridge"
        },
        {
          "name": "ogp:Features",
          "type": 10,
          "value": [
            {
              "name": "discovery"
            },
            {
              "name": "identification"
            }
          ]
        },
        {
          "name": "core:Technology",
          "type": 3,
          "value": "Siegenia"
        }
      ],
      "available": true,
      "enabled": true,
      "placeOID": "xxxx",
      "widget": "DynamicBridge",
      "type": 1,
      "oid": "xxxx",
      "uiClass": "ProtocolGateway"
    },
    {
      "creationTime": 1593547968000,
      "lastUpdateTime": 1593547968000,
      "label": "OGP Intesis Bridge",
      "deviceURL": "ogp://xxxx-xxxx-xxxx/xxxx",
      "shortcut": false,
      "controllableName": "ogp:Bridge",
      "definition": {
        "commands": [
          {
            "commandName": "discover",
            "nparams": 0
          },
          {
            "commandName": "identify",
            "nparams": 0
          },
          {
            "commandName": "setName",
            "nparams": 1
          }
        ],
        "states": [
          {
            "values": [
              "available",
              "unavailable"
            ],
            "type": "DiscreteState",
            "qualifiedName": "core:AvailabilityState"
          },
          {
            "type": "DataState",
            "qualifiedName": "core:NameState"
          }
        ],
        "dataProperties": [],
        "widgetName": "DynamicBridge",
        "uiClass": "ProtocolGateway",
        "qualifiedName": "ogp:Bridge",
        "type": "ACTUATOR"
      },
      "states": [
        {
          "name": "core:NameState",
          "type": 3,
          "value": "OGP Intesis Bridge"
        }
      ],
      "attributes": [
        {
          "name": "core:ManufacturerReference",
          "type": 3,
          "value": "OGP Intesis Bridge"
        },
        {
          "name": "ogp:Features",
          "type": 10,
          "value": [
            {
              "name": "discovery"
            },
            {
              "name": "identification"
            }
          ]
        },
        {
          "name": "core:Manufacturer",
          "type": 3,
          "value": "Overkiz"
        },
        {
          "name": "core:Technology",
          "type": 3,
          "value": "Intesis"
        }
      ],
      "available": true,
      "enabled": true,
      "placeOID": "xxxx",
      "widget": "DynamicBridge",
      "type": 1,
      "oid": "xxxx",
      "uiClass": "ProtocolGateway"
    },

Actually it is a bit akward that they deliver such device in the response, while I'm not having it at all or the Box has the ability for it as this is only available on the TaHoma DIN Rail. I would consider this as an issue on Somfy side, doesn't help on the point that https://github.com/philklei/tahoma-api is tripping over it.

I tried testing with https://github.com/iMicknl/ha-tahoma but ran into an unrelated issue of zwave:ZWaveOccupancySensor not yet supported by it as it seems.

@jensihnow
Copy link
Contributor

Just to add, excluding ogp doesn't help as the issue is within the underlying lib https://github.com/philklei/tahoma-api. Unfortunately, I do not have a working dev setup right now to further debug.

@vlebourl
Copy link
Contributor

vlebourl commented Jul 2, 2020

This is indeed a bug in the api revealed by Tahoma's last server update. We are working on a new integration here with our own version of the api and a fix for the bug.

@cdeharo
Copy link
Author

cdeharo commented Jul 5, 2020

@vlebourl , thanks for your response. I've tested the new integration and it detects the awning and the light sensor correctly. I can operate by setting its position manually, but it doesn't detects the current_position if I opened using the open/close buttons:

In the following attributes state the awning is fully open:

current_position: 0
uiclass: Awning
widget: PositionableHorizontalAwning
type: io:HorizontalAwningIOComponent
rssi_level: 82
core:NameState: Toldo salon
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: good
core:RSSILevelState: 82
core:DeploymentState: 100
core:OpenClosedState: open
friendly_name: Toldo salon
supported_features: 15
device_class: awning

It seems that the core:DeploymentState only corresponds with the current_position if I used the slider to set the position or the button to close the awning. It is not refreshed if I used the open button (and also, the close button is not enabled).

I know that this is not part of this bug because the new integration is not part of the Home Assistant Core yet. This evening I will check the new integration issues in order to open a new one if this behaviour is not yet reported.

I will also obey the debug logs and open an issue for ogp:Bridge - ProtocolGateway - DynamicBridge and internal:PodMiniComponent - Pod - Pod unsupported Tahoma devices if both are not yet reported.

@stale
Copy link

stale bot commented Oct 4, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment