danielperna84 / hahomematic

Python 3 Interface for Home Assistant to interact with HomeMatic devices
MIT License
136 stars 21 forks source link

Blueprint long_press issue #385

Closed breti closed 2 years ago

breti commented 2 years ago

DONT'T DELETE THIS. Please answer all questions as good as possible.

Make sure you have read the documentation at https://github.com/danielperna84/custom_homematic#custom_homematic.

Make sure you are running the latest version of hahomematic or it's custom_component (and Home Assistant) before reporting an issue.

custom_component/hahomematic version (if applicable): 1.0.2

Home Assistant version (if applicable): 2022.3.8

CCU version:

Problem-relevant configuration:

Do you use tls? no Do you use callback? no Do you use username and password? yes Which interfaces do you use? BidCoS RF

Describe the bug A clear and concise description of what the bug is.

I've tried to use the homematicip_local-actions-for-6-button.yaml with HM-PB-6-WM55 to dim up/down a light. This basically works, but long-pressing a button just dims one step up/down and stops afterwards.

I've attached a event log for these buttons. There are several events while holding down a button: HM-PB-6-WM55 events.txt

I'm not sure, but perhaps one should consider evaluating the press_cont events as well? Didn't try it yet.

The bluebrint description says: "
description: When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU."

I'm not sure about homematic ip, but this seems to be wrong for BidCoS devices.

To Reproduce Steps to reproduce the behavior:

Screenshots (if applicable)

Relevant HA log entries (full log)

Diagnostic Information (available on every device)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.3.8",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.9.9",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.10.108",
    "supervisor": "2022.03.5",
    "host_os": "Home Assistant OS 7.6",
    "docker_version": "20.10.9",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "dwd_weather": {
      "version": "1.2.18",
      "requirements": [
        "simple_dwd_weatherforecast==1.1.2",
        "markdownify==0.6.5"
      ]
    },
    "homematicip_local": {
      "version": "1.0.2",
      "requirements": [
        "hahomematic==1.0.4"
      ]
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.1.5",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    },
    "hacs": {
      "version": "1.24.2",
      "requirements": [
        "aiogithubapi>=21.11.0"
      ]
    },
    "onkyo": {
      "version": "2021.10.5",
      "requirements": [
        "onkyo-eiscp==1.2.7"
      ]
    },
    "frontier_silicon": {
      "version": "2022.3.3",
      "requirements": [
        "afsapi==0.2.3rc2"
      ]
    },
    "smartthinq_sensors": {
      "version": "0.12.12",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0"
      ]
    },
    "presence_simulation": {
      "version": "1.14",
      "requirements": []
    },
    "browser_mod": {
      "version": "1.3.1",
      "requirements": []
    },
    "fontawesome": {
      "version": "2.1.5",
      "requirements": []
    },
    "simpleicons": {
      "version": "v2.0.0",
      "requirements": [
        "simpleicons==6.16.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "homematicip_local",
    "name": "Homematic(IP) Local",
    "config_flow": true,
    "documentation": "https://github.com/danielperna84/custom_homematic",
    "issue_tracker": "https://github.com/danielperna84/hahomematic/issues",
    "requirements": [
      "hahomematic==1.0.4"
    ],
    "ssdp": [
      {
        "manufacturer": "EQ3",
        "manufacturerURL": "http://www.homematic.com"
      }
    ],
    "zeroconf": [],
    "homekit": {},
    "dependencies": [],
    "codeowners": [
      "@danielperna84",
      "@SukramJ"
    ],
    "iot_class": "local_push",
    "loggers": [
      "hahomematic"
    ],
    "version": "1.0.2",
    "is_built_in": false
  },
  "data": {
    "config": {
      "entry_id": "35822aacb390d7028935d6c727a3c230",
      "version": 1,
      "domain": "homematicip_local",
      "title": "ccu",
      "data": {
        "instance_name": "ccu",
        "host": "de838cd8-raspberrymatic",
        "username": "**REDACTED**",
        "password": "**REDACTED**",
        "callback_host": "0.0.0.0",
        "callback_port": 0,
        "json_port": null,
        "tls": false,
        "verify_tls": false,
        "interface": {
          "BidCos-RF": {
            "port": 2001
          }
        }
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": "172.30.33.3",
      "disabled_by": null
    },
    "platform_stats": {
      "binary_sensor": 61,
      "climate": 6,
      "light": 4,
      "sensor": 27,
      "switch": 14,
      "hub_sensor": 5,
      "hub_binary_sensor": 1
    },
    "devices": [
      "HM-CC-TC",
      "HM-CC-VD",
      "HM-LC-Sw1-FM",
      "HM-LC-Sw1-Pl",
      "HM-LC-Sw2-FM",
      "HM-PB-4-WM",
      "HM-PB-6-WM55",
      "HM-PBI-4-FM",
      "HM-RC-12",
      "HM-Sec-RHS",
      "HM-Sec-SCo",
      "HM-Sec-SD-2",
      "HM-Sec-SD-2-Team",
      "HM-Sen-MDIR-SM",
      "HM-Sen-MDIR-WM55"
    ]
  }
}

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

SukramJ commented 2 years ago

I'm not sure, but perhaps one should consider evaluating the press_cont events as well? Didn't try it yet.

The bluebrint description says: " description: When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU."

I'm not sure about homematic ip, but this seems to be wrong for BidCoS devices.

I added these blueprints as i use them with my hmip devices. I can update the docs, but i will not further investigate in these blueprints. Please feel free to tryout different options. If you have an improved version we could add it to the repo.

breti commented 2 years ago

OK, I'll do my best...

SukramJ commented 2 years ago

Sounds good.