Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.04k stars 1.67k forks source link

[Feature request]: Expose batteryType as property #10943

Closed bakman2 closed 2 years ago

bakman2 commented 2 years ago

Is your feature request related to a problem? Please describe

No.

Describe the solution you'd like

device topics report their battery types, eg:

{
        "battery": 35,
        "device":
        {
            "applicationVersion": 4,
            "batteryType": "CR2450",   <-------
            "dateCode": "20200526",
            "friendlyName": "rooms/kleine_kamer/sensor/temperature",
            "hardwareVersion": 1,
            "ieeeAddr": "0x00124b001b783e4d",
            "manufacturerID": 0,
            "manufacturerName": "eWeLink",
            "model": "SNZB-02",
            "networkAddress": 25656,
            "powerSource": "Battery",
            "type": "EndDevice",
            "zclVersion": 1
        },
        "humidity": 49.62,
        "linkquality": 80,
        "temperature": 19.01,
        "voltage": 2800
    }
{
        "action": "off",
        "battery": 74,
        "device":
        {
            "applicationVersion": 33,
            "batteryType": "CR2032",  <----
            "dateCode": "20190723",
            "friendlyName": "rooms/woonkamer/switch/ikea dimmer 1",
            "hardwareVersion": 1,
            "ieeeAddr": "0xb4e3f9fffeacb1d1",
            "manufacturerID": 4476,
            "manufacturerName": "IKEA of Sweden",
            "model": "E1743",
            "networkAddress": 2410,
            "powerSource": "Battery",
            "softwareBuildID": "2.2.010",
            "stackVersion": 98,
            "type": "EndDevice",
            "zclVersion": 3
        },
        "linkquality": 178,
        "update":
        {
            "state": "available"
        }
    }

and/or

{
        "battery": 35,
        "batteryType": "CR2450", <-------
        "device":
        {
            "applicationVersion": 4,
            "batteryType": "CR2450",   <-------
            "dateCode": "20200526",
            "friendlyName": "rooms/kleine_kamer/sensor/temperature",
            "hardwareVersion": 1,
            "ieeeAddr": "0x00124b001b783e4d",
            "manufacturerID": 0,
            "manufacturerName": "eWeLink",
            "model": "SNZB-02",
            "networkAddress": 25656,
            "powerSource": "Battery",
            "type": "EndDevice",
            "zclVersion": 1
        },
        "humidity": 49.62,
        "linkquality": 80,
        "temperature": 19.01,
        "voltage": 2800
    }

Describe alternatives you've considered

None, as none are available.

Additional context

Currently I need to manually keep track of the number and type of batteries - and as the number of devices usually increase (not decrease) it is getting harder to keep track.

This feature would provide the ability to query all devices at once and create/maintain an inventory of batteries, ie; what/when/which to buy.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days