Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Xiaomi Lumi motion sensor #369

Merged
merged 1 commit into from
Jan 19, 2019

Conversation

jonathanchristison
Copy link
Contributor

Thanks to @puzzle-star suggestion on the forums I've added an override for the Xiaomi Lumi motion sensor.

Before -

21:39:42.891 [DEBUG] [531.network.impl.CommandInterfaceImpl] - <-- AF_INCOMING_MSG (FE 1B 44 81 00 00 06 04 D2 C1 01 01 00 7E 00 11 E1 4C 00 00 07 18 04 0A 00 00 18 01 D2 C1 1D 0B)
21:39:42.891 [DEBUG] [531.network.impl.CommandInterfaceImpl] - Received Async Cmd: Packet: subsystem=null, length=27, apiId=44 81, data=FE 1B 44 81 00 00 06 04 D2 C1 01 01 00 7E 00 11 E1 4C 00 00 07 18 04 0A 00 00 18 01 D2 C1 1D 0B, checksum=0B, error=false
21:39:42.891 [DEBUG] [rtsystems.zigbee.ZigBeeNetworkManager] - RX APS: ZigBeeApsFrame [sourceAddress=49618/1, destinationAddress=0/1, profile=0104, cluster=1030, addressMode=null, radius=0, apsSecurity=false, apsCounter=0, payload=18 04 0A 00 00 18 01]
21:39:42.891 [DEBUG] [rtsystems.zigbee.ZigBeeNetworkManager] - RX ZCL: ZclHeader [frameType=ENTIRE_PROFILE_COMMAND, manufacturerSpecific=false, direction=SERVER_TO_CLIENT, disableDefaultResponse=true, manufacturerCode=0, sequenceNumber=4, commandId=10]
21:39:42.892 [DEBUG] [rtsystems.zigbee.ZigBeeNetworkManager] - RX CMD: ReportAttributesCommand [Occupancy sensing: 49618/1 -> 0/1, cluster=0406, TID=04, reports=[Attribute Report: attributeDataType=BITMAP_8_BIT, attributeIdentifier=0, attributeValue=1]]
21:39:42.892 [DEBUG] [m.zsmartsystems.zigbee.ZigBeeEndpoint] - 49618/1: Cluster 1030 not found for attribute response

After

21:05:04.505 [DEBUG] [al.converter.ZigBeeConverterOccupancy] - 00158D00020B3D32: ZigBee attribute reports ZclAttribute [cluster=OCCUPANCY_SENSING, id=0, name=Occupancy, dataType=BITMAP_8_BIT, lastValue=1, lastReportTime=Sat Jan 19 21:05:04 GMT 2019]
21:05:04.505 [DEBUG] [.converter.ZigBeeBaseChannelConverter] - 00158D00020B3D32: Channel zigbee:xiaomi_lumisensor-motion:686111d4:00158d00020b3d32:occupancy updated to ON
21:05:04.505 [DEBUG] [ing.zigbee.handler.ZigBeeThingHandler] - 00158D00020B3D32: Updating ZigBee channel state zigbee:xiaomi_lumisensor-motion:686111d4:00158d00020b3d32:occupancy to ON

The only thing i think is confusing is it sticks on the ON state, there is no method to set a timeout on the ZED AFIK so it only ever triggers on motion, it does not report lack of motion, so its not treating motion as a toggle, I can work around this with a rule that fires on change but i suspect it should probably return to the OFF state?

Copy link
Contributor

@cdjackson cdjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks.

@cdjackson cdjackson merged commit 8b10676 into openhab:master Jan 19, 2019
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/zigbee-binding/15763/2123

@cdjackson cdjackson added this to the 2.5 milestone Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants