cool - does it work with switches and motion sensors yet?
Another thing that i have come across. Every now and then i miss button presses, and i think that it is becuase the script (@jon1012’s) is connected over wifi, and since it is multicast trafffic, there are no ack’s or retries. So if there is a collision/lost packet, it will not work.
This thread excites me greatly!! I’ve been looking for cheap door sensors!
Let me know when they are confirmed working and I’ll buy a set
They have now very very low prices, like 60% off.
On one side I am tempted, on the other no, because:
- when products are 60% off usually because a new series is coming
- difficult integration, and another hub around …
where is this 60% off? any links?
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
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
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