Xiaomi smart home

check gearbest, banggood, and similar

ah, they are more or less the normal prices. once the hass component is finished, it’ll be easy to set up :slight_smile:

I’m testing something for magnet and proximity, the switch should be simple to implement.
To do this I changed the scan interval to 2 sec allowing HA to poll for data.
I think it should be possible to have a better way to do this if the gateway pushes data when the state changes.
I’ve to do some investigation and learn some basis about networking.
I will probably share the early code if some are interested.
It works even if sometimes it takes some second to respond.

@jon1012’s script seems to bind to a multicast address and converts everything that it recieves into MQTT. This will remove the requirement for polling, however, when over wifi there are chances to miss packets.

The MQTT posting is also very useful for debugging

(Note: i am yet to use your implementation, so i could be talking out of my ass…)

That’s right no need to do polling, the requests arrive as soon as the packet is sent from the Xiaomi HUB.
However, a big issue with the motion sensor is that it only seem to work once every minute. Once triggered, it will not work until the next minute. Anyone has experienced this 1 minute delay of motion or other kind of sensors?

proximity? How?

Here is a small sample of motion triggers from a motion sensor… i looked a bit funny pacing up and down…

/xiaomi/motion/158d0001292bd2/status motion
/xiaomi/motion/158d0001292bd2/time/ 2016-12-06 20:15:26.663724
/xiaomi/motion/158d0001292bd2/status motion
/xiaomi/motion/158d0001292bd2/time/ 2016-12-06 20:16:26.976874

yoou may be right :slight_smile:

That’s exactly what I was trying to explain! I also found that if you press the pair botton on the sensor quickly the sensor works again really fast but after some time it goes back to “1minute delay”

I would assume the c2032 coin battery doesn’t go far so it’s rate limited…

It does send out a cancellation “No Motion” Message when it hasnt had motion ofr a minute or two.

I dont think you will get really high resolution from a battery powered sensor, just too much power usage.

Sounds good and I was about to buy some, but the hub set/sensor suite is now out of stock on both Banggood and Gearbest so I suppose I should leave it for a month just in case there’s a new version coming out, rather than buying one from a random ebay/ali-express seller.

can you still buy them individually? I think it was more or less the same price. i bought individually anyway.

You can still buy the sensors individually (and I did), but unfortunately the hub seems to be only available in the non-stocked kit. [EDIT - just spotted an indiviual one, so will get that.]

Just went through the same thing after spotting this thread yesterday. I ended up ordering the hub from GeekBuying, a bit more expensive at $29 US. The Wifi button was a bit cheaper at $5 so I guess it balanced out.

Ha, same here. We all did the same

well - the more people we get on board and using it, the more it will be supported :smiley:

1 Like

Have anyone tried with the cube sensor?
http://xiaomi-mi.com/mi-smart-home/xiaomi-mi-smart-home-cube-white/

I’ve got one on the way, I’ll let you know when it arrives.

I mean motion, I’ve got something working in draft to catch data from the gateway for the magnet and motion sensor.
Hope to share it this friday even if it is not clean.

1 Like

that’ll be awesome. the script doesn’t have error catching so tends to fall over when the network drops, or other issues occur. Cheers @fooxy. I wish i could help, but python is not my strong suit.