danielperna84 / hahomematic

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

Low battery alarm is not shown in HA. #821

Closed killer0071234 closed 1 year ago

killer0071234 commented 1 year ago

DONT'T DELETE THIS.

This is for issues only If you have a feature request, add it as a new discussion, or add your point of view to an existing discussion.

Please answer all questions as good as possible.

Language: as you like -> english/DEUTSCH

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

Make sure you have read the release notes at https://github.com/danielperna84/custom_homematic/releases.

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

ENSURE that your Backend (CCU/Homegear/...) is working as expected and connected devices are controllable.

custom_component version (if applicable): 1.26.0

known last working custom_component version (if applicable): 1.x.x no one

Home Assistant:

CCU:

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 (hmip/bidcos/wired)? bidcos

Describe the bug A clear and concise description of what the bug is. Low battery alarm (or service message) is not shown in HA.

To Reproduce Steps to reproduce the behavior:

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

Screenshots (if applicable)

Relevant HA log entries (press full log) VERY IMPORTANT

2023-01-05 21:35:42.790 DEBUG (MainThread) [hahomematic.json_rpc_client] get_all_system_variables: Getting all system variables via JSON-RPC
2023-01-05 21:35:42.790 DEBUG (MainThread) [hahomematic.json_rpc_client] _post: Method: SysVar.getAll, [None]
2023-01-05 21:35:42.835 DEBUG (MainThread) [hahomematic.json_rpc_client] get_system_variables_ext_markers: Getting system variables ext markersvia JSON-RPC
2023-01-05 21:35:42.876 DEBUG (MainThread) [hahomematic.central_unit] check_connection: Checking connection to server RaspberryMatic
2023-01-05 21:35:42.876 DEBUG (MainThread) [hahomematic.xml_rpc_proxy] __async_request: ('ping', ('RaspberryMatic-BidCos-RF',))
2023-01-05 21:35:42.879 DEBUG (MainThread) [hahomematic.json_rpc_client] _post_script: Method: ReGa.runScript [get_system_variables_ext_marker.fn]
2023-01-05 21:35:42.879 DEBUG (MainThread) [hahomematic.hub] _update_entities: 10 sysvars received for RaspberryMatic
2023-01-05 21:35:42.879 DEBUG (MainThread) [hahomematic.json_rpc_client] get_all_programs: Getting all programs via JSON-RPC
2023-01-05 21:35:42.882 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = CENTRAL, parameter = PONG, value = RaspberryMatic-BidCos-RF
2023-01-05 21:35:42.930 DEBUG (MainThread) [hahomematic.json_rpc_client] _do_renew_login: Method: Session.renew [UBHlkmo360]
2023-01-05 21:35:42.931 DEBUG (MainThread) [hahomematic.json_rpc_client] _post: Method: Program.getAll, [None]
2023-01-05 21:35:42.970 DEBUG (MainThread) [hahomematic.hub] _update_entities: 1 programs received for RaspberryMatic
2023-01-05 21:35:53.552 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = CONTROL_MODE, value = 0
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = FAULT_REPORTING, value = 6
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = BATTERY_STATE, value = 2.2
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = VALVE_STATE, value = 0
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = BOOST_STATE, value = 24
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = ACTUAL_TEMPERATURE, value = 19.6
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = SET_TEMPERATURE, value = 17.0
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_TEMPERATURE, value = 5.0
2023-01-05 21:35:53.555 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_START_TIME, value = 720
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_START_DAY, value = 1
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_START_MONTH, value = 1
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_START_YEAR, value = 0
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_STOP_TIME, value = 0
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_STOP_DAY, value = 1
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_STOP_MONTH, value = 1
2023-01-05 21:35:53.556 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:4, parameter = PARTY_STOP_YEAR, value = 0
2023-01-05 21:35:57.884 DEBUG (MainThread) [hahomematic.central_unit] check_connection: Checking connection to server RaspberryMatic
2023-01-05 21:35:57.885 DEBUG (MainThread) [hahomematic.xml_rpc_proxy] __async_request: ('ping', ('RaspberryMatic-BidCos-RF',))
2023-01-05 21:35:57.889 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = CENTRAL, parameter = PONG, value = RaspberryMatic-BidCos-RF

Diagnostic Information (available on every device)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.1.0",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Vienna",
    "os_name": "Linux",
    "os_version": "5.15.80",
    "supervisor": "2022.12.1",
    "host_os": "Home Assistant OS 9.4",
    "docker_version": "20.10.19",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "tplink_deco": {
      "version": "2.2.5",
      "requirements": [
        "pycryptodome>=3.12.0"
      ]
    },
    "radioactivity_hu": {
      "version": "0.3.2",
      "requirements": []
    },
    "homematicip_local": {
      "version": "1.26.0",
      "requirements": [
        "hahomematic==2023.1.0"
      ]
    },
    "pfsense": {
      "version": "0.1.0",
      "requirements": [
        "mac-vendor-lookup>=0.1.11"
      ]
    },
    "powercalc": {
      "version": "v1.2.4",
      "requirements": [
        "numpy>=1.21.1"
      ]
    },
    "hacs": {
      "version": "1.29.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "hiq": {
      "version": "0.0.6",
      "requirements": [
        "cybro==0.0.8",
        "xmltodict==0.13.0"
      ]
    },
    "truenas": {
      "version": "0.0.0",
      "requirements": []
    },
    "watchman": {
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.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==2023.1.0"
    ],
    "ssdp": [
      {
        "manufacturer": "EQ3",
        "manufacturerURL": "http://www.homematic.com"
      }
    ],
    "zeroconf": [],
    "homekit": {},
    "dependencies": [],
    "codeowners": [
      "@danielperna84",
      "@SukramJ"
    ],
    "iot_class": "local_push",
    "loggers": [
      "hahomematic"
    ],
    "version": "1.26.0",
    "integration_type": "hub",
    "is_built_in": false
  },
  "data": {
    "config": {
      "entry_id": "731274bce9e7228a9b771c67af063905",
      "version": 1,
      "domain": "homematicip_local",
      "title": "RaspberryMatic",
      "data": {
        "instance_name": "RaspberryMatic",
        "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
          }
        }
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": "2ac1e2105",
      "disabled_by": null
    },
    "platform_stats": {
      "binary_sensor": 8,
      "climate": 4,
      "sensor": 13
    },
    "devices": [
      "HM-CC-RT-DN",
      "HM-Sec-SC",
      "HM-WDS100-C6-O"
    ]
  }
}

Expected behavior A clear and concise description of what you expected to happen. The current low battery alarm shall also indicated on the battery diagnostic input of the device.

Additional context Add any other context about the problem here.

SukramJ commented 1 year ago

I cannot see any LOWBAT events in your logs. As long as the CCU doesn't send these events we cannot display it.

killer0071234 commented 1 year ago

ok, but how can i get / enable it?

SukramJ commented 1 year ago

Remove the battery of a device?

SukramJ commented 1 year ago

Remove the battery of a device?

That won't work. This would result in an UNREACH event, that marks the device unavailable in HA.

Hard to test.

killer0071234 commented 1 year ago

Thats right, i just tested it. The only thing what i got (with the same batteries re-installed) was for 2 seconds the low battery. For me it seems that the CCU is reporting the low battery if it's really pretty low.

2023-01-05 22:08:56.465 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:0, parameter = LOWBAT, value = True
2023-01-05 22:08:56.466 DEBUG (XmlRpcServer on port 39731) [hahomematic.entity] event: RaspberryMatic-BidCos-RF, KEQ0513695:0, LOWBAT
2023-01-05 22:08:58.598 DEBUG (XmlRpcServer on port 39731) [hahomematic.central_unit] event: interface_id = RaspberryMatic-BidCos-RF, channel_address = KEQ0513695:0, parameter = LOWBAT, value = False
2023-01-05 22:08:58.599 DEBUG (XmlRpcServer on port 39731) [hahomematic.entity] event: RaspberryMatic-BidCos-RF, KEQ0513695:0, LOWBAT
SukramJ commented 1 year ago

For me it seems that the CCU is reporting the low battery if it's really pretty low.

Thats correct. That's why i added 0.1 V to the warning threshold in the CCU.

Can this be closed here?

killer0071234 commented 1 year ago

Many thanks.

Can this be closed here?

Yes, I close it.

Michael-Hennemann commented 1 year ago

Hi, I know this is already closed but I am still curious:

I got a HM-CC-RT-DN with an almost empty battery. CCU says "Battery empty" (not low) My old Redmatic detects a warning on the data point "FAULT_REPORTING" My HA still won't detect an issue. Are you sure this is an expected behavior ?

cheers Michael

SukramJ commented 1 year ago

Are you sure this is an expected behavior ?

Yes. FAULT_REPORTING is not LOWBAT

Michael-Hennemann commented 1 year ago

Hm, ok, but this is how HM-CC-RT-DN seems to report an empty battery:

grafik

Edit: If the datapoint FAULT_REPORTING is set to "6" it means that HM-CC-RT-DN reports an empty battery

Michael-Hennemann commented 1 year ago

Me again: Found it in the eq3 documentation. It's German, hope that is OK https://www.eq-3.com/downloads/download/homematic/hm_web_ui_doku/hm_devices_Endkunden.pdf

grafik

SukramJ commented 1 year ago

FAULT_REPORTING is for HM-CC-RT-DN only. To add FAULT_REPORTING use this.

killer0071234 commented 1 year ago

Many thanks for the infos.

killer0071234 commented 1 year ago

The LOWBAT from the fault reporting works like a charm. Many thanks!