Writing a Zigbee device handler for Xfinity Motion Sensor (XHS1-TY)


#1

Like many others, I’ve found myself in possession of some devices that were part of Xfinity Home. This one in particular is the XHS1-TY (https://fccid.io/pdf.php?id=2971697). I’m trying to write a device handler for it and need some guidance.

Here is the raw description of the device:
01 0104 0402 00 07 0000 0001 0003 0020 0402 0500 0B05 01 0019

I’ve done the following:
zigbee.writeAttribute(0x0500, 0x0010, 0xf0, device.hub.getZigbeeEui())

and receive the message:
catchall: 0104 0500 01 01 0140 00 DD4D 00 00 0000 04 01 00

Now what?


#2

Here’s some debug spew. It pretty much stops sending any data once I put it back onto the mount.

  10:30:01 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:57 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:53 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:53 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:50 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:50 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:45 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:45 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:41 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:41 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:37 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:37 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:33 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:33 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:29 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:25 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:25 PM: debug parse description: catchall: 0104 0000 01 01 0140 00 0614 00 00 0000 00 01 0000
  10:29:05 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:29:05 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:29:03 PM: debug parse description: zone status 0x0024 -- extended status 0x00
  10:29:03 PM: debug parse description: zone status 0x0024 -- extended status 0x00
  10:29:02 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:29:02 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:29:01 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:29:01 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:29:01 PM: debug parse description: zone status 0x0024 -- extended status 0x00
  10:29:00 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:29:00 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:29:00 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:29:00 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:28:59 PM: debug parse description: zone status 0x0020 -- extended status 0x00
  10:28:58 PM: debug parse description: zone status 0x8024 -- extended status 0x00
  10:28:47 PM: debug parse description: catchall: 0104 0500 01 01 0140 00 0614 00 00 0000 0B 01 0000
  10:28:47 PM: debug parse description: catchall: 0104 0500 01 01 0140 00 0614 00 00 0000 0B 01 0000
  10:28:47 PM: debug parse description: zone status 0x0024 -- extended status 0x00
  10:28:47 PM: debug Sending Zone Enroll Response
  10:28:47 PM: debug parse description: enroll request endpoint 0x01 : data 0x000D
  10:28:46 PM: debug parse description: catchall: 0104 0500 01 01 0140 00 0614 00 00 0000 04 01 00
  10:28:46 PM: debug parse description: catchall: 0104 0500 01 01 0140 00 0614 00 00 0000 04 01 00

(Eric) #3

since it’s listed Zigbee HA 1.2 then it seems likely you can integrate it.

I know almost nothing about the process, but this is the prime example thread that I think of, for developing zigbee custom device handlers.


(Steve ) #4

Have you tried crediting a new device handler in the IDE?
Log onto the IDE and then device handlers and click to create a new device handler from Zigbee fingerprint code.
Fill in the details and see if it works , I’ve never tried it but if you have all the fingerprint info and it’s standard zigbee I’m guessing it will.


#5

Thanks! This is where I started - but it doesn’t have enough information.


#6

Thanks. I haven’t tried it before.

I just looked at it and it only supports a small selection of ZigBee devices. Motion sensor is not one of them. I tried filling out the details anyway and got an error.


#7

The SmartThings branded devices are all zigbee (ZHA). They will be listed in the IDE under “SmartSense,” so for a zigbee motion sensor most people just start with that.

If you’d like to find other community created device types for motion sensors, you can look on the quick browse lists in the community – created wiki on the DTH list for motion sensors.

Don’t use the Xiaomi ones, they aren’t fully certified and have a lot of quirks. Iris or Orvibo should be standard zigbee motion sensors but with some optional advanced features.

http://thingsthataresmart.wiki/index.php?title=How_to_Quick_Browse_the_Community-Created_SmartApps_Forum_Section


#8

Thanks! I briefly scanned through the code there and it seems like they’re all more straightforward than this particular sensor.

It looks like there is probably some enrollment dance that needs to be done besides the one for standard Zigbee IAS Zone sensors. In which case:

  • suggestions on how to reverse this protocol?
  • does anyone have an active Xfinity Home subscription with said sensor on which they can snoop on the traffic?