Xiaomi Smart Home Suite (very cheap) compatibilty?

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

User avatar
corbin
Posts: 463
Joined: Saturday 20 August 2016 22:57
Target OS: Windows
Domoticz version: Beta
Location: Brisbane, Australia
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by corbin »

Do you have VIMAGE enabled on the jail?
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
zorroar
Posts: 4
Joined: Sunday 22 January 2017 19:03
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by zorroar »

corbin wrote:Do you have VIMAGE enabled on the jail?
No, I uncheck VIMAGE and add on Sysctls: allow.raw_sockets=1
User avatar
corbin
Posts: 463
Joined: Saturday 20 August 2016 22:57
Target OS: Windows
Domoticz version: Beta
Location: Brisbane, Australia
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by corbin »

I fired up a test system under vmware in hopes of duplicating your problem, but it worked for me with those settings. If you don't mind modifying the source code, you could try manually adding in your local IP address to XiaomiGateway.cpp, line 573:

Code: Select all

m_LocalIp = "192.168.0.x";
EDIT - Try with VIMAGE enabled, that is what worked for me.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by Derik »

corbin wrote:and your Gateway plays radio, and has 'mi' on the front, not the the logo? to confirm it is a gateway v2...

how many taps have your tried? could try the apk in an emulator as others have done.
Yes i do have radio.
And i do not understand what you mean with teh mi logo..
Emulate is not i thing i understand.
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

Hi All,

Today I received finally my Xiaomi Smart Home kit. Beautiful product.

So I installed the app, put the Gateway in developer mode.
I add the hardware to domoticz (V3.6886). So Ip nr, port, password everything as described in the wiki. I cleared out the cache (already a few times by now) uses several browsers. But there are no DEVICES showing up in domoticz.

What can I do to check where the problem is.

(By the way in the MI-app all devices are visible and can be managed, it has a radio)
I hope for answers
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by Derik »

Grrr a android?? How did you set the gateway in develop ?? Perhaps in domoticz new devices and hardware active??
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by Jumper3126 »

Received my set last week. First the gateway and temp sensor. Was able to install them. Could receive the temp and humidity, but not control the light via domoticz. Few days later received more sensors, like IR. Could install those as well, but no couldn't get more data then the temp/hum.
Then I started to see these "Error sending switch command, check device/hardware !" messages when I tried to turn on the gateway light. I'm not the only one with this issue, but couldnt find a clear solution.

Today installed domoticz also on my new raspi zero w (very nice). Installed the latest beta and right away got the gateway and all sensors/plugs to work! No hassle at all (@Berth, perhaps you need to have accept new hardware devices turned on. Just a thought).

So.. I thought it all is related to latest beta update. So I removed the gateway hardware from my original raspi. restarted it. cleared cache, etc. Reinstalled the gateway. all sensors showed up, but..... still the error message :? :(

No idea what the problem is. Solution might be just a complete new installation. For now I'll just tinker around with my zero. Like the idea of having a stably running main system, with a small satellite for tinkering.
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

Derik wrote:Grrr a android?? How did you set the gateway in develop ?? Perhaps in domoticz new devices and hardware active??
I used an iPhone. When you have a look at the wiki you see between all the chinese how to put the switch. (in the picture) it was a bit challaging to get the iphone so far but i managed by just a lot of tapping where the software info should be. :roll:

And yes I activated looking for new hardware in domoticz
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

bertbigb wrote:
Derik wrote:Grrr a android?? How did you set the gateway in develop ?? Perhaps in domoticz new devices and hardware active??
I used an iPhone. When you have a look at the wiki you see between all the chinese how to put the switch. (in the picture) it was a bit challaging to get the iphone so far but i managed by just a lot of tapping where the software info should be. :roll:

And yes I activated looking for new hardware in domoticz
I found out how to read the log file - this is all what i could find about Xiaomi:

2017-03-09 22:14:18.218 XiaomiGateway: will listen on 9898 for hardware id 26
2017-03-09 22:14:18.218 XiaomiGateway: Worker started...
2017-03-09 22:14:18.218 XiaomiGateway: Using 192.168.2.210 for local IP address.

Is this a good or bad sign?
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by Jumper3126 »

@bertbigb, Perhaps you can try to disable and then enable the hardware (having the "'detect devices" on, just in case). I discovered that tweaks like this might help. Its a beautiful device, but its not yet running as smooth as we all would like it to be, despite the great work done by Corbin and others.
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

Jumper3126 wrote:@bertbigb, Perhaps you can try to disable and then enable the hardware (having the "'detect devices" on, just in case). I discovered that tweaks like this might help. Its a beautiful device, but its not yet running as smooth as we all would like it to be, despite the great work done by Corbin and others.
Hi thanks for your suggestion:

Indeed everybody did a great job! So from this stage thanks to all of you who made this possible.

I did as you suggested, but still no luck in finding the devices:

2017-03-09 22:14:18.218 XiaomiGateway: will listen on 9898 for hardware id 26
2017-03-09 22:14:18.218 XiaomiGateway: Worker started...
2017-03-09 22:14:18.218 XiaomiGateway: Using 192.168.2.210 for local IP address.
2017-03-10 07:22:23.609 XiaomiGateway: stopped
2017-03-10 07:22:34.366 XiaomiGateway: will listen on 9898 for hardware id 26
2017-03-10 07:22:34.366 XiaomiGateway: Worker started...
2017-03-10 07:22:34.366 XiaomiGateway: Using 192.168.2.210 for local IP address.

I did everything over and over, but it seems I can't get it to work. So if someone can help me with suggestions. You are more then welcome. :D
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by deennoo »

bertbigb wrote:
Jumper3126 wrote:@bertbigb, Perhaps you can try to disable and then enable the hardware (having the "'detect devices" on, just in case). I discovered that tweaks like this might help. Its a beautiful device, but its not yet running as smooth as we all would like it to be, despite the great work done by Corbin and others.
Hi thanks for your suggestion:

Indeed everybody did a great job! So from this stage thanks to all of you who made this possible.

I did as you suggested, but still no luck in finding the devices:

2017-03-09 22:14:18.218 XiaomiGateway: will listen on 9898 for hardware id 26
2017-03-09 22:14:18.218 XiaomiGateway: Worker started...
2017-03-09 22:14:18.218 XiaomiGateway: Using 192.168.2.210 for local IP address.
2017-03-10 07:22:23.609 XiaomiGateway: stopped
2017-03-10 07:22:34.366 XiaomiGateway: will listen on 9898 for hardware id 26
2017-03-10 07:22:34.366 XiaomiGateway: Worker started...
2017-03-10 07:22:34.366 XiaomiGateway: Using 192.168.2.210 for local IP address.

I did everything over and over, but it seems I can't get it to work. So if someone can help me with suggestions. You are more then welcome. :D
Which os did you use on domoticz ? Linux Windows

On Windows have you unlock 9898 firewall ?

Have set your dev password ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
robertje221
Posts: 14
Joined: Friday 18 November 2016 8:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by robertje221 »

Xiaomi smart home is running flawlessly for a week now:) i am very happy with it. Thanks Corbin for getting Xiaomi home working in Domoticz!

I have ordered a few more sensors to add in my home automation system and i am planning to replace some 443 mhz sensors.

Is there a maximum of devices i can afd to the xiaomi home hub?


Verzonden vanaf mijn iPhone met Tapatalk
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

deennoo wrote: Which os did you use on domoticz ? Linux Windows

On Windows have you unlock 9898 firewall ?

Have set your dev password ?
Hi deennoo,

My domoticz is running on a Synology DS1515+ - version Domoticz is latest beta available ( V3.6886, build time 2017-03-08 19:38:55)
I also have set my dev. password. Found it in the tab (with the lot of tapping :lol: )
I also reset my password already a few times (by changing it in the app, note it down and re-use it in Domoticz)

My firewall is not blocking 9898. But this brings up another question, do I have to open port 9898 on my router and connect it to the IP of the Xiaomi gateway? --> Because that I didn't.

By the way - the Xiaomi is working very well from my iphone (in and outside my local network) and on the app I also see all devices connected to the gateway. So I expect there is something between the Gateway and Domoticz what is not going smooth.
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by deennoo »

i didn't test xiaomi home with my syno yet real ds1515+ or xpenology ?

wil have a look and give feedback
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
murtadin
Posts: 62
Joined: Saturday 31 December 2016 15:33
Target OS: Linux
Domoticz version: beta
Contact:

Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by murtadin »

bertbigb wrote: My domoticz is running on a Synology DS1515+ - version Domoticz is latest beta available ( V3.6886, build time 2017-03-08 19:38:55)
How do you install it on NAS? U used preocmpiled binaries - or compiled from sources? Have you checked syslog or /var/log messages on your system fo errors? May be some libs are missed.
User avatar
corbin
Posts: 463
Joined: Saturday 20 August 2016 22:57
Target OS: Windows
Domoticz version: Beta
Location: Brisbane, Australia
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by corbin »

I think the current problems can be summed up as:
  • 1. Cannot enable developer mode (this problem is external to Domoticz). - > I don't have a solution but hope other uses can help with this.
    2. Cannot detect any devices in Domoticz -> This can occur regardless of what you enter in the Domoticz hardware settings. I would suspect firewall/router or local hardware settings to be the cause.
    3. Devices detect, but do not update state in Domoticz -> this could also be due to firewall/router restrictions, but we have found that some systems need the local Domoticz IP address to be used when binding to the socket. But this still fails on some systems.
    4. Cannot control devices (password error) -> This could be related to devices not updated as in point 3, but could also be simply mistyping the password into Domoticz.
Please feel free to expand the above list or ask questions.

I am willing to help troubleshoot if you can provide a Domoticz install I can remote into (PM me the details)
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
vetalok
Posts: 22
Joined: Friday 30 December 2016 12:40
Target OS: Linux
Domoticz version: 3.6273
Location: Lviv, Ukraine
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by vetalok »

Hello. I have a problem :(
My motion sensor and door sensor always "on".
Spoiler: show
1489138309778screensave.png
1489138309778screensave.png (149.22 KiB) Viewed 2109 times
Why?
In logs all good:

Code: Select all

2017-03-10 11:20:20.274 {"cmd":"report","model":"magnet","sid":"158d0001067c44","short_id":43290,"data":"{\"status\":\"open\"}"}
2017-03-10 11:20:31.471 XiaomiGateway: not updating Domoticz for switch as no change from last state
2017-03-10 11:20:31.471 {"cmd":"report","model":"magnet","sid":"158d0001067c44","short_id":43290,"data":"{\"status\":\"close\"}"}
2017-03-10 11:21:35.752 XiaomiGateway: not updating Domoticz for switch as no change from last state
2017-03-10 11:21:35.752 {"cmd":"report","model":"motion","sid":"158d00010ecca5","short_id":4134,"data":"{\"no_motion\":\"300\"}"}
User avatar
corbin
Posts: 463
Joined: Saturday 20 August 2016 22:57
Target OS: Windows
Domoticz version: Beta
Location: Brisbane, Australia
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by corbin »

can you compile my github repo again and post the log output? looking at the log output here

Code: Select all

if ((((bIsOn) && (nvalue == 0)) || ((bIsOn == false) && (nvalue == 1))) || (messagetype != "heartbeat" && bIsOn == true)) {
			m_mainworker.PushAndWaitRxMessage(this, (const unsigned char *)&xcmd, NULL, -1);
		}
		else {
			_log.Log(LOG_STATUS, "XiaomiGateway: not updating Domoticz for switch as no change from last state");
			if (bIsOn) {
				_log.Log(LOG_STATUS, "bIsOn = true");
			}
			else {
				_log.Log(LOG_STATUS, "bIsOn = false");
			}
			_log.Log(LOG_STATUS, "nvalue = %d", nvalue);
			_log.Log(LOG_STATUS, "messagetype = %s", messagetype.c_str());
		}
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Xiaomi Smart Home Suite (very cheap) compatibilty?

Post by bertbigb »

deennoo wrote:i didn't test xiaomi home with my syno yet real ds1515+ or xpenology ?

wil have a look and give feedback

I'm running on a real ds1515+ and I'm using the pre compiled package from http://www.jadahl.com/domoticz_beta_6.1/
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests