iMicknl / ha-tahoma

Custom component for Home Assistant to interact with smart devices via Somfy TaHoma or other OverKiz based API's.
MIT License
154 stars 30 forks source link

Wrong state for Velux Shutters with Tahoma Switch & home assistant #544

Closed dbrep closed 2 years ago

dbrep commented 3 years ago

Did you read the instructions?

The problem

I use Velux shutters as well as Somfy shutters connected to a Tahoma switch box. Home assistant is using the Tahoma switch through ha-tahoma integration.

Everything works well, except the state of two Velux shutters. Even if closed, they are reported as open in the history. Somfy shutters are well reported as closed.

The activated controls in the panel work well though : can only open if they the shutters are closed.

Home assistant runs on a raspberry pi 4. Home assistant in a docker container.

Thanks for all the very impressive work done so far !

What version of this integration (ha-tahoma) has the issue?

2.6.3

What version of Home Assistant Core has the issue?

core-2021.8.8

Which gateway / hub do you use?

Somfy Tahoma Switch

Device model

PositionableTiltedRollerShutter

Device type

io:RollerShutterVeluxIOComponent

Additional information

In the development tools interface, one can see that despite a current_position of 0, the reported state its open and core:OpenClosedState is open.

Relevant log output

current_position: 0
rssi_level: 40
core:Manufacturer: VELUX
core:NameState: Volet Bureau
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: low
core:RSSILevelState: 40
core:ClosureState: 100
core:OpenClosedState: open
core:Memorized1PositionState: 0
io:PriorityLockOriginatorState: null
io:PriorityLockLevelState: null
friendly_name: Volet Bureau
supported_features: 527
device_class: shutter
tetienne commented 3 years ago

All the attributes prefixed by xx: are returned by Somfy. We will remove them as they can be confusing.

Can you confirm when you open your cover HA is well returning a closed status?

dbrep commented 3 years ago

Hi, I'm not sure what is called cover HA.

In the 'Aperçu' page, I can see that when the shutter is closed: image

The buttons are in the right state.

However, in the history, or when I click on the shutter icon, I get this panel, which states the shutter as open:

image

When the shutter is closing or opening, I have a correct 'closing' or 'openning' state. In any other case, a state 'open' is reported.

Thanks.

tetienne commented 3 years ago

OK so you confirmed my previous message. You are confused by the raw data we output as attribute. core:xxxx and io:xxxx are data returned by Somfy. We use them to compute what you see in HA. Just ignore them. On your screenshot, as you can see you can open the cover so it means the cover is well detected as closed. You can confirm this going in Outils de développement and check the state of your cover in the second column.

image

dbrep commented 3 years ago

Tetienne, I clearly understood that xx:... attributes are not directly used.

What confuses me is that as you said :

Also when clicking on the cover in the main panel, I get image

The buttons are in the correct state to open and not close, but the history in the other tab shows the cover as "open".

image

This is why I think something is wrong ...

In a previous install (Under Synology, I think it was ha_tahoma 2.4.10 , I don't know ha version), done in early august, things where working ok and were synchonized.

Best Regards and thanks a lot for your help.

tetienne commented 3 years ago

That's pretty clear now. Thx for the explanation. I didn't know this kind of bug was possible.

I will try to understand how it's possible.

As a remark it's indeed weird Somfy always returns open state.

dbrep commented 3 years ago

Thanks for having a look into it.

If I can help by checking things or providing logs, don't hesitate.

tetienne commented 3 years ago

Thx !

Can you show me the attributes for your cover in the following states: closed, almost closed, almost opened and opened?

In the Tahoma application, everything is OK?

On our side to know if a cover is closed we check if core:OpenClosedState is equals to closed. So it can explains your issue.

dbrep commented 3 years ago

Here are the attributes in the asked positions:

Open

current_position: 100
rssi_level: 52
core:Manufacturer: VELUX
core:NameState: Volet Bureau
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: normal
core:RSSILevelState: 52
core:ClosureState: 0
core:OpenClosedState: open
core:Memorized1PositionState: 0
io:PriorityLockOriginatorState: null
io:PriorityLockLevelState: null
friendly_name: Volet Bureau
supported_features: 527
device_class: shutter

Almost open:

current_position: 90
rssi_level: 52
core:Manufacturer: VELUX
core:NameState: Volet Bureau
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: normal
core:RSSILevelState: 52
core:ClosureState: 10
core:OpenClosedState: open
core:Memorized1PositionState: 0
io:PriorityLockOriginatorState: null
io:PriorityLockLevelState: null
friendly_name: Volet Bureau
supported_features: 527
device_class: shutter

Almost closed:

current_position: 10
rssi_level: 40
core:Manufacturer: VELUX
core:NameState: Volet Bureau
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: low
core:RSSILevelState: 40
core:ClosureState: 90
core:OpenClosedState: open
core:Memorized1PositionState: 0
io:PriorityLockOriginatorState: null
io:PriorityLockLevelState: null
friendly_name: Volet Bureau
supported_features: 527
device_class: shutter

Closed:

current_position: 0
rssi_level: 40
core:Manufacturer: VELUX
core:NameState: Volet Bureau
core:PriorityLockTimerState: 0
core:StatusState: available
core:DiscreteRSSILevelState: low
core:RSSILevelState: 40
core:ClosureState: 100
core:OpenClosedState: open
core:Memorized1PositionState: 0
io:PriorityLockOriginatorState: null
io:PriorityLockLevelState: null
friendly_name: Volet Bureau
supported_features: 527
device_class: shutter

In the Tahoma application on iphone, everything works well: The cover appears as closed when closed.

Yes, I think the reason is that core:OpenClosedState is equal to open, even if the shutter is closed. Does this mean that the problem is coming from the Tahoma API with VELUX shutters ?

I just checked with my previous install ( ha core-2021.7.4, ha_tahoma 2.4.10) and the behavior is now the same as with the current install... The core:OpenClosedState also appears as open, always.

dbrep commented 3 years ago

In order to test, I tried to slightly modify tahoma_cover.py

In the is_closed method, I just commented the test on the state variable, to rely only on the position to tell if the shutter is closed. Then, the value of core:OpenClosedState is not used anymore.

@property
    def is_closed(self):
        """Return if the cover is closed."""

        state = self.executor.select_state(
            CORE_OPEN_CLOSED_STATE,
            CORE_SLATS_OPEN_CLOSED_STATE,
            CORE_OPEN_CLOSED_PARTIAL_STATE,
            CORE_OPEN_CLOSED_PEDESTRIAN_STATE,
            CORE_OPEN_CLOSED_UNKNOWN_STATE,
            MYFOX_SHUTTER_STATUS_STATE,
        )
        #if state is not None:
        #    return state == STATE_CLOSED

        if self.current_cover_position is not None:
            return self.current_cover_position == 0

        if self.current_cover_tilt_position is not None:
            return self.current_cover_tilt_position == 0

        return None

This indeed seems to solve my problem, but I don't know if there are side effects.

I'll check tomorrow.

Thanks

tetienne commented 3 years ago

I will contact their support to know what’s the best way to know if a cover is closed or not. Removing the code you comment will break other devices, like the gate with pedestrian position which behave in HA like a cover but without position.

tetienne commented 3 years ago
{
  "commands": [
    {
      "commandName": "advancedRefresh",
      "nparams": 1
    },
    {
      "commandName": "close",
      "nparams": 0
    },
    {
      "commandName": "delayedStopIdentify",
      "nparams": 1
    },
    {
      "commandName": "down",
      "nparams": 0
    },
    {
      "commandName": "getName",
      "nparams": 0
    },
    {
      "commandName": "identify",
      "nparams": 0
    },
    {
      "commandName": "my",
      "nparams": 0
    },
    {
      "commandName": "open",
      "nparams": 0
    },
    {
      "commandName": "refreshMemorized1Position",
      "nparams": 0
    },
    {
      "commandName": "setClosure",
      "nparams": 1
    },
    {
      "commandName": "setDeployment",
      "nparams": 1
    },
    {
      "commandName": "setMemorized1Position",
      "nparams": 1
    },
    {
      "commandName": "setName",
      "nparams": 1
    },
    {
      "commandName": "setPosition",
      "nparams": 1
    },
    {
      "commandName": "setSecuredPosition",
      "nparams": 1
    },
    {
      "commandName": "startIdentify",
      "nparams": 0
    },
    {
      "commandName": "stop",
      "nparams": 0
    },
    {
      "commandName": "stopIdentify",
      "nparams": 0
    },
    {
      "commandName": "up",
      "nparams": 0
    },
    {
      "commandName": "wink",
      "nparams": 1
    },
    {
      "commandName": "pairOneWayController",
      "nparams": 2
    },
    {
      "commandName": "setConfigState",
      "nparams": 1
    },
    {
      "commandName": "unpairAllOneWayControllers",
      "nparams": 0
    },
    {
      "commandName": "unpairOneWayController",
      "nparams": 2
    }
  ],
  "states": [
    {
      "type": "ContinuousState",
      "qualifiedName": "core:ClosureState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "good",
        "low",
        "normal",
        "verylow"
      ],
      "qualifiedName": "core:DiscreteRSSILevelState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:Memorized1PositionState"
    },
    {
      "type": "DataState",
      "qualifiedName": "core:NameState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "closed",
        "open"
      ],
      "qualifiedName": "core:OpenClosedState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:PriorityLockTimerState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:RSSILevelState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:SecuredPositionState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "available",
        "unavailable"
      ],
      "qualifiedName": "core:StatusState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "comfortLevel1",
        "comfortLevel2",
        "comfortLevel3",
        "comfortLevel4",
        "environmentProtection",
        "humanProtection",
        "userLevel1",
        "userLevel2"
      ],
      "qualifiedName": "io:PriorityLockLevelState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "LSC",
        "SAAC",
        "SFC",
        "UPS",
        "externalGateway",
        "localUser",
        "myself",
        "rain",
        "security",
        "temperature",
        "timer",
        "user",
        "wind"
      ],
      "qualifiedName": "io:PriorityLockOriginatorState"
    }
  ],
  "dataProperties": [
    {
      "value": "500",
      "qualifiedName": "core:identifyInterval"
    }
  ],
  "widgetName": "PositionableTiltedRollerShutter",
  "uiProfiles": [
    "StatefulCloseableShutter",
    "StatefulCloseable",
    "Closeable",
    "StatefulOpenClose",
    "OpenClose"
  ],
  "uiClass": "RollerShutter",
  "qualifiedName": "io:RollerShutterVeluxIOComponent",
  "type": "ACTUATOR"
}
dbrep commented 3 years ago

Thanks tetienne, please keep me informed if you get some information from the support.

I noticed that things are ok with Somfy shutters, but Velux shutters through Tahoma seem to have this pb.

tetienne commented 3 years ago

Somfy support was nice, and tested in their lab. They reported me the io:RollerShutterVeluxIOComponentworks fine and returned closed state as expected. If there is an issue, it’s not linked to their service.

So we have to continue the investigation.

Can you please close your cover, and restart HA. Do you still have the open state?

Can you also enable the debug mode (don’t forget to restart)? See https://github.com/iMicknl/ha-tahoma#enable-debug-logging

Open your cover, then close it. Wait at least 30s, and go to the logs page. Click on the Load full HA logs button.

Paste here all the logs you will see related to our component.

dbrep commented 3 years ago

Hello tetienne, sorry for being long to answer, but I didn't have access to the shutter during this time.

I dit the requested manoeuvers:

1/ Close the shutter, restart HA.

The state is as follow after the restart

image

2/ Enable debug, then open then close cover. Here is the full log

2021-08-29 18:34:30 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tahoma which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-29 18:34:36 DEBUG (MainThread) [custom_components.tahoma] Initialized DataUpdateCoordinator with 0:00:30 interval.
2021-08-29 18:34:36 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.059 seconds
2021-08-29 18:34:36 INFO (MainThread) [custom_components.tahoma] HomeKit support detected with setup code 108-18-928.
2021-08-29 18:34:36 DEBUG (MainThread) [custom_components.tahoma] Unsupported device detected (internal:WifiComponent - Wifi - Wifi - internal://2004-3574-2793/wifi/0)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:RollerShutterVeluxIOComponent - RollerShutter - PositionableTiltedRollerShutter - io://2004-3574-2793/10728872)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:RollerShutterVeluxIOComponent - RollerShutter - PositionableTiltedRollerShutter - io://2004-3574-2793/12015568)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:RollerShutterGenericIOComponent - RollerShutter - PositionableRollerShutter - io://2004-3574-2793/15347126)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:WindowOpenerVeluxIOComponent - Window - PositionableTiltedWindow - io://2004-3574-2793/3546528)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:HorizontalAwningIOComponent - Awning - PositionableHorizontalAwning - io://2004-3574-2793/3889878)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:WindowOpenerVeluxIOComponent - Window - PositionableTiltedWindow - io://2004-3574-2793/8660524)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added device (io:RollerShutterGenericIOComponent - RollerShutter - PositionableRollerShutter - io://2004-3574-2793/9937318)
2021-08-29 18:34:37 DEBUG (MainThread) [custom_components.tahoma] Added gateway (2004-3574-2793 - 98 - GatewaySubType.TAHOMA_BASIC_PLUS)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_REGISTERED/92c3b43d-ac10-3e01-653e-2b0293b6a977 (device: None, state: None -> None)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c3b43d-ac10-3e01-653e-2b0293b6a977 (device: None, state: ExecutionState.INITIALIZED -> ExecutionState.NOT_TRANSMITTED)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.GATEWAY_SYNCHRONIZATION_STARTED/None (device: None, state: None -> None)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c3b43d-ac10-3e01-653e-2b0293b6a977 (device: None, state: ExecutionState.NOT_TRANSMITTED -> ExecutionState.TRANSMITTED)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.GATEWAY_SYNCHRONIZATION_ENDED/None (device: None, state: None -> None)
2021-08-29 18:35:04 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:05 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:06 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:06 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c3b43d-ac10-3e01-653e-2b0293b6a977 (device: None, state: ExecutionState.TRANSMITTED -> ExecutionState.IN_PROGRESS)
2021-08-29 18:35:06 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:35:07 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:07 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.034 seconds
2021-08-29 18:35:08 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.033 seconds
2021-08-29 18:35:09 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:10 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:11 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:35:12 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:13 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:14 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:15 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:16 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:17 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:35:18 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.036 seconds
2021-08-29 18:35:19 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:20 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:21 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:22 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:23 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:24 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:25 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:26 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:27 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:27 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:28 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:29 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:30 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.039 seconds
2021-08-29 18:35:31 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:32 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:33 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:35:34 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:35:35 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:36 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:37 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.033 seconds
2021-08-29 18:35:38 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:35:39 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:40 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:40 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c3b43d-ac10-3e01-653e-2b0293b6a977 (device: None, state: ExecutionState.IN_PROGRESS -> ExecutionState.COMPLETED)
2021-08-29 18:35:40 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_REGISTERED/92c46fd3-ac10-3e01-653e-2b02e0e4469c (device: None, state: None -> None)
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c46fd3-ac10-3e01-653e-2b02e0e4469c (device: None, state: ExecutionState.INITIALIZED -> ExecutionState.NOT_TRANSMITTED)
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.GATEWAY_SYNCHRONIZATION_STARTED/None (device: None, state: None -> None)
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c46fd3-ac10-3e01-653e-2b02e0e4469c (device: None, state: ExecutionState.NOT_TRANSMITTED -> ExecutionState.TRANSMITTED)
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.GATEWAY_SYNCHRONIZATION_ENDED/None (device: None, state: None -> None)
2021-08-29 18:35:52 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.034 seconds
2021-08-29 18:35:53 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:35:54 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:54 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c46fd3-ac10-3e01-653e-2b02e0e4469c (device: None, state: ExecutionState.TRANSMITTED -> ExecutionState.IN_PROGRESS)
2021-08-29 18:35:54 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.035 seconds
2021-08-29 18:35:55 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:35:55 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.033 seconds
2021-08-29 18:35:56 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:57 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:35:58 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:35:59 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:36:00 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.028 seconds
2021-08-29 18:36:01 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:02 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:03 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.033 seconds
2021-08-29 18:36:04 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:05 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:06 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:07 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:36:08 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:09 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:36:10 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.044 seconds
2021-08-29 18:36:11 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:36:12 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:13 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.042 seconds
2021-08-29 18:36:14 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:36:15 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:36:16 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:36:16 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.030 seconds
2021-08-29 18:36:17 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.029 seconds
2021-08-29 18:36:18 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:19 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.027 seconds
2021-08-29 18:36:20 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.034 seconds
2021-08-29 18:36:21 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:36:22 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.031 seconds
2021-08-29 18:36:23 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:24 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.027 seconds
2021-08-29 18:36:25 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:26 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:27 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.032 seconds
2021-08-29 18:36:28 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.DEVICE_STATE_CHANGED/None (device: io://2004-3574-2793/12015568, state: None -> None)
2021-08-29 18:36:28 DEBUG (MainThread) [custom_components.tahoma.coordinator] EventName.EXECUTION_STATE_CHANGED/92c46fd3-ac10-3e01-653e-2b02e0e4469c (device: None, state: ExecutionState.IN_PROGRESS -> ExecutionState.COMPLETED)
2021-08-29 18:36:28 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.034 seconds
2021-08-29 18:36:58 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.108 seconds
2021-08-29 18:37:28 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.102 seconds
2021-08-29 18:37:58 DEBUG (MainThread) [custom_components.tahoma] Finished fetching device events data in 0.089 seconds

Thanks for your help

tetienne commented 3 years ago

Can you please update the component with this version please https://github.com/iMicknl/ha-tahoma/archive/refs/heads/enhancement/better-logs.zip and repeat the same steps? I totally rework our logs to report more information. What we have currently was not enough.

tetienne commented 3 years ago

@dbrep can you retry the previous scenario with the latest version? You will see more debug log.

dbrep commented 3 years ago

Hello tetienne,

Sorry for the answering delay : I couldn't find the time to have a look.

I checked this morning after having updated to the last version on your github.

It seems that the state is now perfect for the cover :

When closed I get this : image

I'll try to find th etime today to send you the logs, but not sure I'll manage to do it. It can be next week.

Thanks a lot anyway, things seem to be working fine.

Best Regards

iMicknl commented 3 years ago

@dbrep could you try how this works with 2.9.1? I will close this issue for now, since you mentioned last time that it works.

Just reply here if you still have an issue, and we will reopen this issue.

SeerKan commented 2 years ago

I have the exact same problem described here, only with a somfy gate, the state is always open and position 50, even if the gate is closed. I am currently using the latest version available in HACS and also using the latest hassio Capture2 Capture .

Any suggestions would be very appreciated, planning to automate some tasks based on the gate and this is preventing that.

Thanks and appreciate the great work, too bad somfy doesn't do at least 50% of what you are doing.

iMicknl commented 2 years ago

@SeerKan that is another problem, see https://github.com/iMicknl/ha-tahoma/issues/487#issuecomment-968671338 where we track this issue.

By the way, you could give the latest master version a try. This should add a select entitity that's correct.

SeerKan commented 2 years ago

@iMicknl thank you for that, missed that ticket. The latest master is not working, however https://github.com/iMicknl/ha-tahoma/archive/refs/heads/fix/gate-position.zip does work fine.

github-actions[bot] commented 2 years ago

'There hasn't been any activity on this issue recently. Is this issue still present? Please make sure to update to the latest Home Assistant version and version of this integration to see 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.'

alexandreaudrain commented 2 years ago

Hi. I also have a problem with shutters position (same configuration as dbrep : Tahoma Switch + Velux Shutters + HAss core-2021.12.4 + Python 3.9.9). Positions seems inconsistant : image

iMicknl commented 2 years ago

@alexandreaudrain could you please create another issue, since your 'issue' is not the same? The number.my_position doesn't reflect your current position. It reflects the value where the my position (preset) is set to. Calling the button will set it to that position, when supported by your device.

github-actions[bot] commented 2 years ago

'There hasn't been any activity on this issue recently. Is this issue still present? Please make sure to update to the latest Home Assistant version and version of this integration to see 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.'