danielperna84 / hahomematic

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

Sensor state unknown #533

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.11.1

Home Assistant version (if applicable): 2022.7.4

CCU version:

Problem-relevant configuration:

Do you use tls? n Do you use callback? n Do you use username and password? n Which interfaces do you use? BidCoS-RF

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

I've updated RaspberryMatic, hahomematic and HomeAssistant. Now several sensors and actors show state "unknown" until the state changes. Restarting the RaspverryMatic Add-On or HA doesn't help.

grafik Two switches - they show on/off buttons until the state changes once.

grafik Rotation Handle Sensors - state unbekannt until state changes

grafik LOWBAT sensors - state unbekannt, even after hours

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

I don't know...

Screenshots (if applicable)

Relevant HA log entries (full log)

(too long - attached as file)

log.txt

Diagnostic Information (available on every device)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.7.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.15.45",
    "supervisor": "2022.07.0",
    "host_os": "Home Assistant OS 8.2",
    "docker_version": "20.10.14",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "dwd_weather": {
      "version": "1.2.22",
      "requirements": [
        "simple_dwd_weatherforecast==1.1.5",
        "markdownify==0.6.5"
      ]
    },
    "homematicip_local": {
      "version": "1.11.1",
      "requirements": [
        "hahomematic==2022.7.8"
      ]
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.2.0",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "hacs": {
      "version": "1.26.2",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "onkyo": {
      "version": "2022.7.2",
      "requirements": [
        "onkyo-eiscp==1.2.7"
      ]
    },
    "frontier_silicon": {
      "version": "2022.3.3",
      "requirements": [
        "afsapi==0.2.3rc2"
      ]
    },
    "smartthinq_sensors": {
      "version": "0.23.3",
      "requirements": [
        "pycountry>=20.7.3",
        "xmltodict>=0.12.0",
        "chardet>=4.0.0"
      ]
    },
    "presence_simulation": {
      "version": "2.2",
      "requirements": []
    },
    "browser_mod": {
      "version": "1.5.3",
      "requirements": []
    },
    "fontawesome": {
      "version": "2.1.5",
      "requirements": []
    },
    "emulated_hue": {
      "version": "2022.7.2",
      "requirements": [
        "aiohttp_cors==0.7.0"
      ]
    },
    "mass": {
      "version": "2022.7.0b1",
      "requirements": [
        "music-assistant==1.6.0"
      ]
    },
    "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==2022.7.8"
    ],
    "ssdp": [
      {
        "manufacturer": "EQ3",
        "manufacturerURL": "http://www.homematic.com"
      }
    ],
    "zeroconf": [],
    "homekit": {},
    "dependencies": [],
    "codeowners": [
      "@danielperna84",
      "@SukramJ"
    ],
    "iot_class": "local_push",
    "loggers": [
      "hahomematic"
    ],
    "version": "1.11.1",
    "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**",
        "tls": false,
        "verify_tls": false,
        "callback_host": null,
        "callback_port": null,
        "json_port": null,
        "interface": {
          "BidCos-RF": {
            "port": 2001
          },
          "HmIP-RF": {
            "port": 2010
          }
        }
      },
      "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": 57,
      "climate": 6,
      "light": 4,
      "sensor": 27,
      "switch": 14
    },
    "devices": [
      "HM-CC-TC",
      "HM-CC-VD",
      "HM-LC-Dim1PWM-CV",
      "HM-LC-Dim1T-FM",
      "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-SCI-3-FM",
      "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.

Additional context Add any other context about the problem here.

SukramJ commented 2 years ago

I wrote it to the release notes of 1.11.0

breti commented 2 years ago

I read them, but I obviously I didn't understand them.

You mean this one:

Use entity is_valid for state
Entities are now shown as unknown, as long as HA has not received any events from the CCU, or was not able to fetch data initially.
Old behaviour was to display a DEFAULT value.
As soon as events have been received from the CCU the state will switch to the correct state.
This should be relevant, if HA has been restarted shortly after the CCU has been restart.
See [Readme](https://github.com/danielperna84/custom_homematic#noteworthy-about-entity-states) for further information.

This means that it can take 24 hours for the RHS, for example, until the status is reported by the cyclic report.

With the battery LOWBAT sensors, not a single one has been updated so far, even after 12 hours of waiting time.

Is there no way to pull the state from the CCU, or what's the reason for this?

SukramJ commented 2 years ago

It's been an illusion that you saw real values when restarting HA and CCU. Binary_sensors just displayed default values.

The reasons can be found in these threads:

  1. https://homematic-forum.de/forum/viewtopic.php?f=84&t=74780
  2. https://github.com/danielperna84/hahomematic/discussions/12#discussioncomment-3114694
  3. https://github.com/danielperna84/hahomematic/issues/516

Feel free to comment in 1 or 2

breti commented 2 years ago

None of the HM LOWBAT sensors have recovered so far (Gaswaage is an ESPhome device).

grafik

SukramJ commented 2 years ago

Except from diagnostic entities like LOWBAT and RSSI_XXX: What is state of other entity types?

breti commented 2 years ago

No "Servicemeldungen" or "Alarmmeldungen" on CCU.

emufan commented 2 years ago

Same here with my HM-ES-TX-WM RSSI and LOWBAT are only and always in unknown state, energy_counter and power is updating as expected.

SukramJ commented 2 years ago

There seems to be a problem, that the CCU is not sending periodical events on the maintainance channel (0) for some parameters. Other parameters like RSSI_DEVICE, RSSI_PEER and SABOTAGE also seem to be affected.

I think we should close this ticket and go on with the discussion https://github.com/danielperna84/hahomematic/discussions/12#discussioncomment-3114694 to find a solution.