Page 10 of 123
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Saturday 31 December 2016 12:51
by jumping
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Saturday 31 December 2016 15:49
by murtadin
Hi folks. I need some help.
1st time i have installed beta DomoticzSetup_2_6277.exe about 2 weeks ago. I have added xiaomi gateway and detected all door sensors, 2 pir and some wireless switches. Today i upgraded to latest beta and for some reason all prevoious detected devices were duplicated + new devices such like temperature sensors. I deleted all devices and domoticz do not detect any attached device now.
Developer mode on gw enabled.
Help pls.
P.S. Happy new Year ))
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Sunday 01 January 2017 0:52
by corbin
levynger wrote:
the Long Press appears twice in logs (one for press and once for release i assume)
Currently mapped like this, could change long click release to another button or send the off command?
Code: Select all
else if ((status == "click")) {
level = 10;
}
else if ((status == "long_click_press") || (status == "long_click_release")) {
level = 20;
}
else if ((status == "double_click")) {
level = 30;
}
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Sunday 01 January 2017 0:53
by corbin
murtadin wrote:I deleted all devices and domoticz do not detect any attached device now.
Try deleting the hardware for Xiaomi Gateway, then add it back in.
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Sunday 01 January 2017 0:55
by corbin
vetalok wrote:Hah... problem fixed when I changed port on line
XiaomiGateway.cpp:
Code: Select all
XiaomiGateway::xiaomi_udp_server::xiaomi_udp_server(boost::asio::io_service& io_service, int m_HwdID, XiaomiGateway *parent)
: socket_(io_service, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 9898))
9898 to 9899
Thanks, have fixed in my repository too.
But then can no longer receive sensor events, so this needs to stay 9898
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Sunday 01 January 2017 22:46
by murtadin
corbin wrote:murtadin wrote:I deleted all devices and domoticz do not detect any attached device now.
Try deleting the hardware for Xiaomi Gateway, then add it back in.
tried yesterday 10 times. No luck. Today tried one more time, changed port to 54321and it works.
btw - support of xiaomi cube comtroller will be implemented?
Sent from my MI MAX using Tapatalk
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Monday 02 January 2017 4:01
by corbin
murtadin wrote:
tried yesterday 10 times. No luck. Today tried one more time, changed port to 54321and it works.
btw - support of xiaomi cube comtroller will be implemented?
There isn't an API for the cube known as yet - but if a way to interact with it is discovered support will be added.
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Monday 02 January 2017 23:55
by jelvs
Hi I'm new to this, but does anybody know if has support for the Xiaomi Universal IR Remote Controller, thanks and continue with the good work
Sent from my iPhone using Tapatalk
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 0:56
by Swifty
Very tempted to order a sample kit of the xaiomi sensors + gateway, but I have a few questions, if anyone who already owns could answer?
- Is the plug on the gateway available in UK spec? - the gateway looks a little big to be hanging off an adaptor socket..
- Is the motion sensor pet tolerant? - I have a cat and would like to use the motion sensors for alarm purpose without the cat tripping it.
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 1:47
by Coldman
Swifty wrote:Very tempted to order a sample kit of the xaiomi sensors + gateway, but I have a few questions, if anyone who already owns could answer?
- Is the plug on the gateway available in UK spec? - the gateway looks a little big to be hanging off an adaptor socket..
- Is the motion sensor pet tolerant? - I have a cat and would like to use the motion sensors for alarm purpose without the cat tripping it.
Hi, I can't to answer about plug/socket, I'm from Russia and I'm using a adapter, but I have a dog, 40kg, sometimes a sensor is alarming.
Отправлено с моего ONE A2001 через Tapatalk
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 3:51
by dcliff1
Hi Guys,
Firstly to answer the question above about the plugs, I believe its only a chinese/australian plug on the gateway units?
I've tried to setup the gateway on the latest beta for both Linux and Windows but I recieve two different errors:
On Windows:
XiaomiGateway: error in handle_receive
on Linux:
XiaomiGateway: invalid data received!
I've tried different ports etc, but I can't get it working. Any ideas on what I'm doing wrong? I've followed the Wiki article but no go.
Thanks!
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 7:39
by corbin
Hi dcliff1,
Try this in Windows,
Install Packet Sender
https://packetsender.com/
Enter packet settings as:
Code: Select all
Name: Test
ASCII: {"cmd":"whois"}
Address: IP Address of your gateway
Port: 4321
UDP
Click Send and see if you get an "iam" response from the gateway

- iam.PNG (33.71 KiB) Viewed 4579 times
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 7:47
by corbin
Swifty wrote:
- Is the motion sensor pet tolerant? - I have a cat and would like to use the motion sensors for alarm purpose without the cat tripping it.
I've tried a store purchased sensor, home made sensors, and now the Xiaomi sensor, and have found the Xiaomi to work best with less false-positives. Xiaomi call it a "Human Body Sensor", but as Coldman has replied, it will detect a large dog, and maybe a cat (I have neither)
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 10:45
by dcliff1
Hey Corbin.
Great utility, i've not seen it before. I've used it and am getting the same response as you.

- Capture.PNG (31.53 KiB) Viewed 4548 times
I tried resetting the gateway and cycling the password but same result.
Unfortunately the log doesn't tell me anything:
2017-01-03 20:39:18.531 XiaomiGateway: stopped
2017-01-03 20:39:37.810 XiaomiGateway: Worker started...
2017-01-03 20:39:37.844 Error: XiaomiGateway: error in handle_receive
Here is my config.

- Capture1.PNG (125.94 KiB) Viewed 4548 times
Thanks mate!
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 11:40
by corbin
try updating to the latest beta - I've just had a pull request accepted. I don't think it will fix your problem but just to get you on the latest release.
If that doesn't work, are you able to compile from source? I could then do some troubleshooting.
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 11:50
by dcliff1
No worries, i'll try the latest beta.. and will compile from source on the linux box tomorrow.
Thanks for helping out, its much appreciated. I'm excited to get this working

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 12:03
by corbin
cool! should be able to get it working - compile from
https://github.com/corbinmunce/domoticz, I've added output for what is received in the data buffer in handle_receive, might give us a clue.
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 18:59
by ben53252642
Wow! I currently pay $90 AU for motion sensors avg, I can get the Xiaomi motion sensor for $18 AU. Very tempted to buy a few sensors.
What is the delay like between a motion sensor being triggered and reporting to Domoticz compared to say a Z-Wave motion sensor?
Has anyone seen a battery level report yet?
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 19:28
by pavelbor
ben53252642 wrote:
What is the delay like between a motion sensor being triggered and reporting to Domoticz compared to say a Z-Wave motion sensor?
Notification from door sensor (telegram notification in my case) comes almost immediately after door was opened. There is practically no delay at all. Same with motion sensor.
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Posted: Tuesday 03 January 2017 22:59
by Coldman
ben53252642 wrote:Wow! I currently pay $90 AU for motion sensors avg, I can get the Xiaomi motion sensor for $18 AU. Very tempted to buy a few sensors.
What is the delay like between a motion sensor being triggered and reporting to Domoticz compared to say a Z-Wave motion sensor?
Has anyone seen a battery level report yet?
1 sec
Отправлено с моего MI PAD 2 через Tapatalk