# Bloated Battery in Tablet - Fire Hazard

**URL:** <https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821>\
**Category:** Off-Topic\
**Tags:** tablet\
**Created:** [April 5, 2023, 5:15am UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821 "2023-04-05T05:15:30Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![rpwong](https://community.openhab.org/user_avatar/community.openhab.org/rpwong/32/36036_2.png) [@rpwong](https://community.openhab.org/u/rpwong)\
**Post date:** [April 9, 2023, 5:36pm UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/21 "2023-04-09T17:36:46Z")

</div>

The device reduces the current it’s drawing from the charger as it approaches 100%. The voltage never changes at all, so this isn’t something I’d worry about. The danger with cheap chargers is less that they’ll harm your battery and more that they’ll be a fire hazard themselves (due to bad quality control).

---

<div class="post-metadata">

**Author:** ![Schrott.Micha](https://community.openhab.org/user_avatar/community.openhab.org/schrott.micha/32/22121_2.png) [@Schrott.Micha](https://community.openhab.org/u/Schrott.Micha)\
**Post date:** [April 10, 2023, 6:52pm UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/22 "2023-04-10T18:52:49Z")

</div>

Hi,

I had this with my previous tablet as well - as it was constantly charged.

After I bought a new one, I changed to HABPanel - there you nicely have a property you can use to read the charging level of your table.  
I used this to create a rule that discharges the table to 10% and then only loads it again to 95% - using a smart-plug.

With this so far it all looks good 🙂

---

<div class="post-metadata">

**Author:** ![Larsen](https://community.openhab.org/user_avatar/community.openhab.org/larsen/32/95475_2.png) [@Larsen](https://community.openhab.org/u/Larsen)\
**Post date:** [April 11, 2023, 4:52pm UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/23 "2023-04-11T16:52:12Z")

</div>

@Schrott.Micha For maximum lifespan charging should stop at 80% and start at 40% or 50%. Deep discharging and full charging reduces the lifespan of lithium-ion batteries. The sheer number of charging cycles is not relevant but the equivalent of full charges.

---

<div class="post-metadata">

**Author:** ![Schrott.Micha](https://community.openhab.org/user_avatar/community.openhab.org/schrott.micha/32/22121_2.png) [@Schrott.Micha](https://community.openhab.org/u/Schrott.Micha)\
**Post date:** [April 15, 2023, 2:45pm UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/24 "2023-04-15T14:45:27Z")

</div>

Hello @Larsen,

sorry for the late response - I was busy - and thanks for the hint.

I changed my “logic” - and hope for another 5 years of battery lifetime 🙂.

---

<div class="post-metadata">

**Author:** ![Schrott.Micha](https://community.openhab.org/user_avatar/community.openhab.org/schrott.micha/32/22121_2.png) [@Schrott.Micha](https://community.openhab.org/u/Schrott.Micha)\
**Post date:** [April 15, 2023, 2:50pm UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/25 "2023-04-15T14:50:57Z")

</div>

For anyone who is interrested:

```php
BATTERY_MAX_CHARGE = 80
BATTERY_MIN_CHARGE = 40

@rule("HABPanel: Charge state",
      description="start or stop charging of the HABPanel",
      tags=["itemchange", "habpanel"])
@when("Item HABPanel_Battery_Level changed")
@when("Time cron 15 2/5 * 1/1 * ? *")
def check_charging_state(event):
    """check if HABPanel needs charging"""

    if event:
        check_charging_state.log.info(
            "rule fired because of %s", event.itemName)

    batteryLevel = 0
    chargingState = False

    if items["HABPanel_Battery_Level"] != "NULL":
        batteryLevel = items["HABPanel_Battery_Level"]
    if items["HABPanelLadung_Betrieb"] != "NULL":
        chargingState = items["HABPanelLadung_Betrieb"] == "ON"

    check_charging_state.log.debug(
        "HABPanel_Battery_Level = %s", batteryLevel)

    check_charging_state.log.debug(
        "HABPanelLadung_Betrieb = %s", chargingState)

    if ((batteryLevel < BATTERY_MIN_CHARGE) and not chargingState):
        events.sendCommand("HABPanelLadung_Betrieb", "ON")
        check_charging_state.log.info("start charging")
    elif ((batteryLevel > BATTERY_MAX_CHARGE) and chargingState):
        events.sendCommand("HABPanelLadung_Betrieb", "OFF")
        check_charging_state.log.info("stop charging")
    else:
        check_charging_state.log.info(
            "No change: ChargeState=" + str(chargingState) + " ChargeLevel=" + str(batteryLevel))

```

---

<div class="post-metadata">

**Author:** ![system](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/6/6a52f2ac5d00e4c7b50471a354b3a9221188be90.png) [@system](https://community.openhab.org/u/system)\
**Post date:** [May 27, 2023, 6:51am UTC](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821/26 "2023-05-27T06:51:23Z")

</div>

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.

[Previous page](https://community.openhab.org/t/bloated-battery-in-tablet-fire-hazard/145821.md?page=1)
