Error in Log with Battery-Group

Running OH2 on Raspi 3

Just wanted to get Informed via Telegram whan my Batterylevel is low (in this case i use Homematic-Devices).

Group i created

Group:Switch:OR(ON,OFF)  Batterie_HM   "Batterie Homematic [%d]"       <batterylevel>  (Batterie_HM)     


Switch Heizung_WZ_LowBat "Wohnbereich Thermostat" <batterylevel>   (Batterie_HM){channel="homematic:HM-TC-IT-WM-xxxxxxxxxx:2#LOWBAT"}
Switch Helena_Battery_Wand_Rep "Helena Thermosat"              <batterylevel>   (Batterie_HM) {channel="homematic:HM-TC-IT-WM-W-EU:xxxxxxxxxxxxxxxx#LOWBAT"}

I can see the Group as expected in my Sitemap

Group item=Batterie_HM

I created a rule to get an Message via Telegram when my Battery is low.

rule "Alarm Batterie Homematic"
    Member of Batterie_HM received update
      if(triggeringItem.state == ON)
         {sendTelegram("BotExampelt", "Die Batterie von " + triggeringItem.label + " hat nur noch   wenig Leistung.")}

I can see my Group in the Sitemap and it also shows me the LowBattery Switch is on (Helena_Battery_Wand_Rep).
Now my Problem:

I expected to get 1 Message via Telegram when the Swtich turns on, but instead Telegram is sending me every Minute a Message with the LowBatteryReport :frowning:
Also i can see maybe a Problem is detected in the log

2018-08-05 12:23:02.672 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener 'Batterie_HM (Type=GroupItem, BaseType=SwitchItem, Members=0, State=ON, Label=Sensorbatterien, Category=batterylevel, Groups=[Batterie_HM])' about state update of item Batterie_HM: null

java.lang.NullPointerException: null

	at org.eclipse.smarthome.core.items.GroupItem.stateUpdated( [101:org.eclipse.smarthome.core:0.10.0.oh230]

	at org.eclipse.smarthome.core.items.GenericItem$ [101:org.eclipse.smarthome.core:0.10.0.oh230]

	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]

	at java.util.concurrent.ThreadPoolExecutor$ [?:?]

	at [?:?]

Can someone pls help ?

As you used received update as trigger, the rule will be triggered once per item per update. As the battery will not magically recharge, once it is low, every update will be ON. Maybe you can use changed to ON as trigger (you won’t need the if() statement anymore)

1 Like

Thx - this fixed my issue - changed to ON solved my Problem.
Is working as expected now :wink: