SmartThings Community

$9 Zigbee Xiaomi Door/Window Sensors (works for some people)


(Patrick Stuart [@pstuart]) #53

I don’t know any more tricks. First ZigBee device that didn’t report endpoints.


#54

Okay sir. It is unfortunate but at least we tried.

Do you think it would be worth it if i tried with the motion sensor as well?


(Patrick Stuart [@pstuart]) #55

Can’t hurt. Your time.


#56

Okay my friend. Will do that tomorrow and report back here.


#57

Hi all! Hello @pstuart my friend.

i have tried the motion sensor and it DOES WORK!

See bellow:


(Patrick Stuart [@pstuart]) #58

Yes, but it doesn’t give endpoints which makes it difficult to know anything.

Since it is a motion sensor, see if it checks in with and without motion with a catchall.


#59

Hi @pstuart!

I am not sure i understand what you mean it does not give endpoints.In my second screenshot above i think i see smh about endpoints in the log.

Here is what i have seen:

  1. I pair the motion sensor and it appears as a thing
  2. I define the device to be “Smartsense motion sensor”
  3. I see it in the iPhone app
  4. The device does work (only once - you can see that in the screenshot above)

When i am refreshing again i get this error in the logs:

05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:12 AM GMT+2: debug Parse returned [name:motion, value:active, descriptionText:Thing detected motion]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:12 AM GMT+2: debug motion
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:12 AM GMT+2: debug Desc Map: [raw:D9DC0104060800001801, dni:D9DC, endpoint:01, cluster:0406, size:08, attrId:0000, encoding:18, value:01]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:12 AM GMT+2: debug description: read attr - raw: D9DC0104060800001801, dni: D9DC, endpoint: 01, cluster: 0406, size: 08, attrId: 0000, encoding: 18, value: 01
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:04 AM GMT+2: debug Parse returned [name:motion, value:active, descriptionText:Thing detected motion]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:04 AM GMT+2: debug motion
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:04 AM GMT+2: debug Desc Map: [raw:D9DC0104060800001801, dni:D9DC, endpoint:01, cluster:0406, size:08, attrId:0000, encoding:18, value:01]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:37:04 AM GMT+2: debug description: read attr - raw: D9DC0104060800001801, dni: D9DC, endpoint: 01, cluster: 0406, size: 08, attrId: 0000, encoding: 18, value: 01
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:51 AM GMT+2: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigInteger#.
Cannot resolve which method to invoke for [null, class java.lang.Integer] due to overlapping prototypes between:
[class [I, int]
[class [B, int]
[class java.lang.String, int] @ line 321
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:51 AM GMT+2: debug Sending enroll response
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:51 AM GMT+2: debug refresh called
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:49 AM GMT+2: debug Parse returned [name:motion, value:active, descriptionText:Thing detected motion]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:49 AM GMT+2: debug motion
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:49 AM GMT+2: debug Desc Map: [raw:D9DC0104060800001801, dni:D9DC, endpoint:01, cluster:0406, size:08, attrId:0000, encoding:18, value:01]
05d65540-b5c9-4c32-ad2b-7028c0fadbf0 12:36:49 AM GMT+2: debug description: read attr - raw: D9DC0104060800001801, dni: D9DC, endpoint: 01, cluster: 0406, size: 08, attrId: 0000, encoding: 18, value: 01

  • 12:36:57 AM GMT+2: info Waiting on events…*
  • 12:36:57 AM GMT+2: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.*
  • 12:36:57 AM GMT+2: info This console provides live logging of your SmartThings.*

In the logs it seems to be catching motion every time but the event “motion” registers only once. At least that is what i understand.

This is the full log of the only event that actually registered:

Thing detected motion
Name Value
*data *
{

  • “microDeviceTile”: {*
  •    "type": "standard",*
    
  •    "icon": "st.motion.motion.active",*
    
  •    "backgroundColor": "#53a7c0"*
    
  • }*
    }
    date 2015-11-23 12:21:38.341 AM EET (2015-11-22T22:21:38.341Z)
    description Thing detected motion
    deviceId 05d65540-b5c9-4c32-ad2b-7028c0fadbf0
    deviceTypeId 821425e6-b305-468a-9a27-db0e4852ce3a
    displayed true
    eventSource DEVICE
    hubId MASKED by me
    id 65fd1ee2-9167-11e5-bfb4-0a588c3c57cb
    isStateChange true
    isVirtualHub false
    linkText Thing
    locationId MASKED by me
    name motion
    rawDescription read attr - raw: D9DC0104060800001801, dni: D9DC, endpoint: 01, cluster: 0406, size: 08, attrId: 0000, encoding: 18, value: 01
    translatable false
    unixTime 1448230898341
    value active
    viewed false

What do you think is happening?

Thanks a lot


(Patrick Stuart [@pstuart]) #60

I appreciate your tenacity… But clearly you are not getting what I am telling you. These devices do not advertise their join endpoints, without that, there is no way to fingerprint them in ST.

Something is binding Endpoint 01 to cluster 0406 which is not a standard zigbee HA cluster, it is a custom cluster.

However, it appears to be translating to the value 01 which might mean motion detected. It could also just be a heartbeat / checkin.

Without proper docs, it would be just guessing as to how to program up this sensor on that cluster (or even other clusters it isn’t responding to)

The error you are getting above is because there is no endpoint fingerprint.

Unfortunately, I can’t do anything more based on the information above. The device is a custom zigbee device and doesn’t appear to conform to zigbee ha standards for the type of device it advertises to be.


#61

Hello all!

I have run some more tests with the Door sensor.
I have defined it as Tyco Door/Window sensor.

Look at the logs as i move the two pieces together and then separate them:

1fee41f4-f292-414e-8c25-377b1a5f1c76 1:12:00 μ.μ. EET: debug Parse returned [:]
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:12:00 μ.μ. EET: debug description: on/off: 0
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:59 μ.μ. EET: debug Parse returned [:]
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:59 μ.μ. EET: debug description: on/off: 1
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:56 μ.μ. EET: debug Parse returned [:]
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:56 μ.μ. EET: debug description: on/off: 0
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:50 μ.μ. EET: debug Parse returned [:]
1fee41f4-f292-414e-8c25-377b1a5f1c76 1:11:50 μ.μ. EET: debug description: on/off: 1

  • 1:11:46 μ.μ. EET: info Waiting on events…*
  • 1:11:46 μ.μ. EET: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.*
  • 1:11:46 μ.μ. EET: info This console provides live logging of your SmartThings.*

Still the event does not actually catch. In the event list of the device there are no records.

Unfortunately i am no dev and i cannot make this work.

Hopefully someone (@pstuart i am not pointing at you :smiley:) might get interested in this and work it out eventually.


(Chris) #62

Hey,

@pstuart: Excuse my ignorance, how important is the fingerprinting? Is it so ST can identify devices as well as know how to send commands?

I received my sensors today. It looks like as long as you are happy to assign the device type manually they can be of use as sensors at least. Anything that would require commands being sent to it might not be possible without documentation though.

So far I’ve made the tiny Zigbee button work with a simple device type.

Once I’ve written some device handlers I may buy more if they’ll do what I want even if it means not being able to use everything they can do. For the price, you can’t complain.

I’ll try setting up something for the contact sensor next.


(Patrick Stuart [@pstuart]) #63

If you can get it to work for you. Good. If you want to submit it for approval, fingerprinting is absolutely a requirement.

If you can find all the config settings, etc. cool. Don’t be surprised if the battery just dies, since you probably can’t get that without docs.

If you want to write and share a devicetype that you can just install in ide and change the thing to it manually, then it should work.

I have a lot of custom zigbee devices, but if you don’t submit it for approval, it will never run locally, and will have to run in the cloud… However, that may change someday, I’m not holding my breath.


(Chris) #64

Ok, thanks for the info :smile:

I’ll have a mess around :slight_smile:


#65

@Kriskit

Hi there,

Do you think you can make the sensors work with ST?

What I would love is to be able to utilize the door sensor within security rules. Is that possible?

Can you share your code for the button? What does it do?

Please keep us posted.

Thanks a lot

@pstuart

What you wrote about the impossibility of running locally custom Zigbee devices (not approved) is bad news. But for the price of the Xiaomi door sensor one should not expect much. Here in Europe the smart sense door sensor costs 39 GBP whereas the Xiaomi one costs 9 USD!


(Chris) #66

I have made them work to an extent. They can be used with the system and was using them last night.

HOWEVER after a period of inactivity, they go to sleep or disconnect. I suspect they need regular communication (heartbeat, poll or something) to keep them alive but without knowing any commands for the device it’s difficult to know what to do. I may try setting up a poll to poke it with just a command I know won’t work but it might be enough for the device to stay awake.

I won’t have time today probably so I will try when I can.


#67

@Kriskit my friend, i am eagerly waiting for the results of your test.

Thank you very much


(Chris) #68

:frowning:

It’s not looking good. I added polling but it still stops doing anything after a period of time. Though what I find strange is that even the poll method doesn’t seem to get called after a certain amount of time (according to the live logs). As if the device type isn’t executing anymore.

Haven’t had much time to investigate further but it’s not looking good at the moment.


#69

This is bad news indeed.

Thanks for letting us know.

My problem is, my house has 15 (yes, fifteen!) doors and windows that all require an open/close sensor each.
Appart from the price tag, I would love to use the Xiaomi sensor because of it’s small size.


#70

Hey @Kriskit do you think this could help you with polling?


(Eric M) #71

Anyone want to try it out and let me know how it goes? I’ve only had the devices in had for a couple hours so I can’t tell whether they disconnect from the hub after a while.

@ktsi I have created a device type for the door sensor as well.


#72

I am going to check this out asap.
Hopefully you can make it work, even though I bit the bullet and have already ( :frowning: ) ordered a bunch of 30 GBP a piece door sensors from smartthings.