Homekit, Does the Home app display low battery status for a Motion Sensor?

Does the Home app display low battery status for a Motion Sensor?

This is from my item file

Group gMasterBathroomMotionSensor "Master Bathroom Motion Sensor" {homekit = "MotionSensor"}
Switch MasterBathroomMotionSensor_MotionStatus "Motion Detected" (gMasterBathroomMotionSensor) {homekit = "MotionSensor.MotionDetectedState"}
Switch MasterBathroomMotionSensor_LowBattery "Low Battery" (gMasterBathroomMotionSensor) {homekit = "MotionSensor.BatteryLowStatus"}

I don’t see any battery indication in the home app

it looks like this (it is contact sensor, but motion looks the same)
small icon top right
image

and “low battery” text

and how do you pass the battery level to homekit ? looks like that is missing from the binding

Hi Rohnny,

we do support battery level, charging state and low alert.
here is an example

That’s great news. There are not included in the documentation of the binding on the Openhab website hence the question.

Thanks

OK but if I understand you have to make a group item of a motion sensor and a battery in order to pass over battery level to the battery within the group rather than the motion sensor

So in essence I need to do below just to get the battery level into the motion sensor?
@yfre Can you please also check the last battery low line, since it’s a parameter of both motion sensor as well as battery I need to have 2 homekit metadata is that correct ? one for the sensor and one for the battery as below.

Group gMotionSensor_3_gang "Motion sensor gang (living)" {homekit = "MotionSensor,Battery"}
Switch MotionSensor_3_gang_MotionStatus "Gang (living)" <motion>  (gMotion, gMotionStatusDownstairs, gMotionSensor_3_gang) { channel="mihome:sensor_motion_aq2:7811dcb26db8:158d0001ddac6a:motion", homekit="MotionSensor.MotionDetectedState" }
Number MotionSensor_3_gang_Battery <battery> (gMotion, gMotionSensor_3_gang) { channel="mihome:sensor_motion_aq2:7811dcb26db8:158d0001ddac6a:batteryLevel", homekit="Battery.BatteryLevel" }
Switch MotionSensor_3_gang_BatteryLow <energy> (gMotion, gXiaomiBatteryLow, gMotionSensor_3_gang) { channel="mihome:sensor_motion_aq2:7811dcb26db8:158d0001ddac6a:lowBattery", homekit="MotionSensor.BatteryLowStatus, Battery.BatteryLowStatus" }

yes, correct, it need to have a group. it maybe sound a little be strange, but we follow here the concept defined by Apple. According to Apple, batteryLowStatus is part of sensor accessory, but battery level is separate accessory that can be combined with any other accessory.
we trying to unify this concept and to make it fit better openHAB concepts, but we will still some Apple “specifics”.

the group looks correct. if it does not work, i would maybe remove “MotionSensor.BatteryLowStatus” as it is optional for MotionSensor but mandatory for Battery.

1 Like