[SOLVED] Xiaomi Mi Smart Home Binding - Door/Window Sensor - Open Status

Hi there,

I’m a bit confused about how to integrate the xiaomi door sensor in my sitemap.

According to the log the reed contact recognised the change:

2018-08-18 22:46:36.074 [vent.ItemStateChangedEvent] - out_xiao_reed1_isopen changed from CLOSED to OPEN

2018-08-18 22:46:36.095 [vent.ItemStateChangedEvent] - out_xiao_reed1_lastopened changed from 2018-08-18T22:33:35.844+0200 to 2018-08-18T22:46:36.057+0200

But in the sitemap only the icon (window) changes from closed to open - there is no closed/open text right to the item name “Xiaomi Reed1 - Open Status” (see screenshot)

// ITEMS
// Xiaomi Reed1
Contact    out_xiao_reed1_isopen          	"Xiaomi Reed1 - Open Status"                                         (Gxiaomi,Greed)       {channel="mihome:sensor_magnet:zzzd0001xxxxxx:isOpen"}
DateTime   out_xiao_reed1_lastopened      	"Xiaomi Reed1 - Last Time Opened [%1$tY-%1$tm-%1$td  %1$tH:%1$tM]"   (Gxiaomi,Greed)       {channel="mihome:sensor_magnet:zzzd0001xxxxxx:lastOpened"}
Number     out_xiao_reed1_isopenalarmtimer	"Xiaomi Reed1 - Alarm Timer"                                         (Gxiaomi,Greed)       {channel="mihome:sensor_magnet:zzzd0001xxxxxx:isOpenAlarmTimer"}
Number     out_xiao_reed1_batterylevel    	"Xiaomi Reed1 - Batterieladung"                                      (Gxiaomi,Greed,Gbatt) {channel="mihome:sensor_magnet:zzzd0001xxxxxx:batteryLevel"}
Switch     out_xiao_reed1_lowbattery      	"Xiaomi Reed1 - Niedriger Batteriestatus"                            (Gxiaomi,Greed,Gbatt) {channel="mihome:sensor_magnet:zzzd0001xxxxxx:lowBattery"}

    // SITEMAP
    Frame label="Xiaomi" {
        Group item=Gxiaomi
        Switch item=out_xiao_reed1_isopen
    }    

I’m also not sure what/why the “Alarm Timer” always shows “-s”

It would be great if someone could help me.

Thanks…

Contact    out_xiao_reed1_isopen          	"Xiaomi Reed1 - Open Status [%s]"                                         (Gxiaomi,Greed)       {channel="mihome:sensor_magnet:zzzd0001xxxxxx:isOpen"}

Many thanks!

Quite obvious - I should go to bed now :wink:

I just copied the item from the binding documentation:
https://www.openhab.org/addons/bindings/mihome/#xiaomi-rules

Great… someone should update the documentation cause I did the same and just copied from the example :slight_smile:

Tommy, you can do that yourself, just follow the link at the bottom of the binding page.

It’s in there, in the general items section where it belongs to:

Or do you intend to edit all 330 bindings example pages? :grinning:

You have to cater for the lowest denominators like me who copy the examples provided and expect them to work.

In this particular binding docs there are no examples of item definitions with label parameters except one DateTime one.