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

Battery level of door/window sensor #203

Open
NeoBlack opened this issue Sep 28, 2024 · 4 comments
Open

Battery level of door/window sensor #203

NeoBlack opened this issue Sep 28, 2024 · 4 comments

Comments

@NeoBlack
Copy link

Can you get the battery level (percent of level) for the door/window sensors?
Free@Home self has no good battery level information. Most of the time, I don't recognize that the battery is low, and then I get a message from Free@Home that the device is offline. Yeah!!!

free@home shows the battery level and battery voltage in the device configuration:

Bildschirmfoto 2024-09-29 um 00 14 10

With the local API, I tried to get the value, but the response did not contain the battery data:

{
  "00000000-0000-0000-0000-000000000000": {
    "devices": {
      "ABBXXXXXXXXX": {
        "deviceReboots": "21",
        "floor": "01",
        "room": "03",
        "interface": "RF",
        "deviceId": "2042",
        "displayName": "Fenster Arbeitszimmer links",
        "unresponsive": false,
        "unresponsiveCounter": 0,
        "defect": false,
        "channels": {
          "ch0001": {
            "floor": "01",
            "room": "03",
            "displayName": "Fenster Arbeitszimmer links",
            "selectedIcon": "51",
            "functionID": "64",
            "inputs": {},
            "outputs": {
              "odp0000": {
                "pairingID": 53,
                "value": "0"
              },
              "odp0001": {
                "pairingID": 41,
                "value": "0"
              }
            },
            "parameters": {}
          }
        },
        "parameters": {
          "par0065": "0"
        }
      }
    }
  }
}

If this integration can provide this data, I could create automation to monitor and warn before the device goes offline.

@jheling
Copy link
Owner

jheling commented Oct 2, 2024

Hi, i looked at you initial issue with the wireless window sensor, I see a batteryVoltage attribute in the free@home dump. Maybe we can use this?

@NeoBlack
Copy link
Author

NeoBlack commented Oct 2, 2024

Yes, you are right. In the XML dump, I see the attributes batteryStatus="FF" batteryLow="false" and an attribute node:

<attribute name="batteryVoltage">2.98389</attribute>

I have no idea what the value FF means, and I can't find a percentage value for the battery in the XML dump. But at least two of the three values (batteryVoltage and batteryLow) are useful information.

@derjoerg
Copy link

derjoerg commented Oct 2, 2024

Just two possibilities to think about (only a shot in the dark):

  1. Battery Percentage might be just calculated from Battery Voltage (so e.g. 3 = 100%, 2,9 = 97%, ...)
  2. The Battery Status is a hex representation of the Battery Percentage (so FF = 100%, FA = 98%)

But these are just guesses. I don't have such devices to test

@NeoBlack
Copy link
Author

NeoBlack commented Oct 2, 2024

I tried to get a new dump from my door sensors, but with the new firmware, I can't find the monitor/dump view anymore.
Where can I find it in the current firmware? Then, I could check different devices and validate the hex representation theory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants