OH3: Getting a batterylevel-card on properties-tab?

  • Platform information:
    • openHAB version:OH3-RC1

I have a lot of battery-powered sensors, that report back batterylevel in percent.

Is it possible to create a custom smantic-property (in this case: batterylevel) that would result in an automatic card on the properties-tab on the homepage of OH3?

Right now I tag them as Measurement:Voltage but that seems not 100% right because it is not what the value means.

And I have energy-meters that reports back the measured voltage, too. So mixing them with the battery-levels seems not right even more.

I think you need to use ElectricPotential as the Item type.

I think the plan for batteries in the ontology is that they would not be Points but sub-Equipment of an existing Equipment.
That way if you have both a “low battery” point and a “battery level” you have them in the battery equipment.

Something like:

Sensor (Equipment_Sensor)
 |- Temperature (Point_Measurement, Property_Temperature)
 |- ... whatever the sensor measures
 \- Battery (Equipment_Battery)
    |- Battery Level (Point_Status)
    \- Battery Low (Point_LowBattery)

I remember complaining at the time that it was too complex, but the thing is that if you only have one Point, the battery level, you can directly link the Equipment to the battery channel of your sensor. An equipment doesn’t have to be a group item.

Sensor (Equipment_Sensor)
 |- Temperature (Point_Measurement, Property_Temperature)
 |- ... whatever the sensor measures
 \- Battery Level (Equipment_Battery)

To change a type of semantic class (from Point to Equipment), you have to select None first to get rid of the filter, then you can select Battery under Equipment.

Then you will have a Batteries card in the Equipment tab (not the Property tab).

4 Likes

That is indeed working as I expected, thank you very much for the clarification.

4 Likes

The header picture’s a nice touch :slight_smile:

1 Like

I am puzzled here as well.
In Model it looks ok:

So, please allow one question:
Should the Battery (Group Equipment) containing “level” and “lowbattery” (see above) show up on the location → corridor → Fibaro sensor?
Because I don’t see the battery there (it shows up under equipment / battery though)

That is the correct behaviour.
The battery-properties will only be shown under the equipment-tab and not as sub-channels under locations.

Hi Christian,

thanks for the clarification.
And I thought I still have some mistakes in my tagging (I might have anyway ;-).

Is this behaviour true for locks as well - means will Locks always be “hidden” (not present in locations as sub-equipment)?
Because I don’t see my car’s lock under outdoor -> Car even though it’s in the model tree.

I was looking for the same thing! Looks much better in my setup now.

My battery devices are also reporting the quality of the signal (Zigbee LinkQuality), which point or equipment can be used for this purpose? I didn’t found any suitable yet.