Compiled again) After clearing browser cache, added gateway with correct password and ip and random port 777. Now I can see my socket, but still can not control it. Nothing happens after switching on/off.corbin wrote: Cool! Please compile from https://github.com/corbinmunce/domoticz again and you (hopefully) will have control of your socket. As usual you will need to fully refresh your browser cache, and then add the Xiaomi Gateway again with the gateway settings (password, ip, port - only the password needs to be correct).
Also door sensors should now continue to detect as open, when they are left open.
Temp and battery sensors are not quite done yet.
Xiaomi Smart Home Suite (very cheap) compatibilty?
Moderator: leecollings
-
- Posts: 10
- Joined: Tuesday 20 December 2016 5:52
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
- 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?
There is a problem with the key encryption in my code, have confirmed by using another system. Was working well on my development system
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 34
- Joined: Saturday 17 December 2016 12:13
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Can anybody else confirm that with last beta notifications does not work anymore?
Or it related to the mentioned key encryption problem?
Code: Select all
2016-12-27 18:35:50.540 Error: Pushover:
2016-12-27 18:35:50.541 Error: Notification sent (pushover) => Failed
2016-12-27 18:35:50.560 Active notification Subsystems: email, http, pushover (3/12)
2016-12-27 18:35:55.279 Error: HTTP:
2016-12-27 18:35:55.280 Error: Notification sent (http) => Failed
2016-12-27 18:35:55.299 Active notification Subsystems: email, http, pushover (3/12)
- 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?
I hadn't saved the key properly! so the smart plug is working on my Windows system, using the latest beta.
double check your key, should be like "v4ld4aq908mg77tb"
double check your key, should be like "v4ld4aq908mg77tb"
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 34
- Joined: Saturday 17 December 2016 12:13
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Open door sensor now detected fine. Thanks!
Problem with wall plug control remains. They visible and they reports own status:
But trying to control it get a unknown command and nothing hapened:
Problem with wall plug control remains. They visible and they reports own status:
Code: Select all
2016-12-27 19:38:32.525 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug)
2016-12-27 19:38:32.529 {"cmd":"report","model":"plug","sid":"158d00010*****","short_id":59987,"data":"{\"status\":\"off\"}"}
Code: Select all
2016-12-27 19:53:58.503 User: Admin initiated a switch command (2/Xiaomi Smart Plug/Off)
2016-12-27 19:53:58.504 010C577E
2016-12-27 19:53:58.656 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug)
2016-12-27 19:54:14.991 User: Admin initiated a switch command (2/Xiaomi Smart Plug/On)
2016-12-27 19:54:14.992 010C577E
2016-12-27 19:54:14.992 Unknown command 1
2016-12-27 19:54:15.143 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug)
-
- Posts: 35
- Joined: Sunday 18 December 2016 12:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Tallinn / Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Hello, i also have something to add, now in log-file i see my Xiaomi temp/hum sensors:
2016-12-27 22:29:53.824 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.824 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"temperature\":\"1886\"}"}
2016-12-27 22:29:53.845 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.845 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"humidity\":\"4366\"}"}
That's looks good
Believe, soon we'll get them used too...
I think, for control of ZigBee power socket's we have to set somewhere in Gateway's settings encryption key, given by MiHome apps (developer mode).
2016-12-27 22:29:53.824 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.824 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"temperature\":\"1886\"}"}
2016-12-27 22:29:53.845 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.845 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"humidity\":\"4366\"}"}
That's looks good

I think, for control of ZigBee power socket's we have to set somewhere in Gateway's settings encryption key, given by MiHome apps (developer mode).
- 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?
I see the problem - still had the my own IP address in my code, sorry! I'm doing some testing and should have a new pull request soon.arkoko wrote: But trying to control it get a unknown command and nothing hapened:
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 34
- Joined: Saturday 17 December 2016 12:13
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
After giving control command to the switch notifications becomes broken:
And after domoticz daemon restart I have:
Doing Raspberry restart helps to bring working notifications back.

Thanks!
Code: Select all
2016-12-27 21:56:32.738 Notification sent (email) => Success
2016-12-27 21:56:32.750 Active notification Subsystems: email, http, pushover (3/12)
2016-12-27 21:57:42.209 Notification sent (http) => Success
2016-12-27 21:57:41.707 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 21:57:42.214 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"open\"}"}
2016-12-27 21:57:48.201 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 21:57:48.211 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"close\"}"}
2016-12-27 21:59:01.855 Notification sent (http) => Success
2016-12-27 21:59:01.571 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 21:59:01.858 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"open\"}"}
2016-12-27 21:59:06.315 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 21:59:06.326 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"close\"}"}
2016-12-27 22:01:43.686 User: Admin initiated a switch command (6/Xiaomi Smart Plug Z3/On)
2016-12-27 22:01:43.687 010DD669
2016-12-27 22:01:43.688 Unknown command 1
2016-12-27 22:01:43.841 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug Z3)
2016-12-27 22:01:55.901 User: Admin initiated a switch command (6/Xiaomi Smart Plug Z3/Off)
2016-12-27 22:01:55.902 010DD669
2016-12-27 22:01:56.053 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug Z3)
2016-12-27 22:02:08.443 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 22:02:08.452 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"open\"}"}
2016-12-27 22:02:14.180 Error: HTTP:
2016-12-27 22:02:14.181 Error: Notification sent (http) => Failed
2016-12-27 22:02:14.551 Error: Pushover:
2016-12-27 22:02:14.551 Error: Notification sent (pushover) => Failed
2016-12-27 22:02:14.127 (Xiaomi GW) Light/Switch (Xiaomi Door Sensor (test))
2016-12-27 22:02:14.556 {"cmd":"report","model":"magnet","sid":"158d00011*****","short_id":1082,"data":"{\"status\":\"close\"}"}
Code: Select all
2016-12-27 22:03:22.149 Wunderground: Worker started...
2016-12-27 22:03:22.150 EventSystem: reset all events...
2016-12-27 22:03:22.151 EventSystem: reset all device statuses...
2016-12-27 22:03:22.153 EventSystem: Started
2016-12-27 22:03:22.191 Error: Domoticz received fatal signal 6 !...
2016-12-27 22:03:22.194 Error: /home/pi/domoticz/domoticz() [0x1a8330]
2016-12-27 22:03:22.195 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1a83e8]
2016-12-27 22:03:22.195 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76a7e180]
OK, we can waitcorbin wrote:I'm doing some testing and should have a new pull request soon.

Thanks!
- 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?
Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -pavelbor wrote:Hello, i also have something to add, now in log-file i see my Xiaomi temp/hum sensors:
2016-12-27 22:29:53.824 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.824 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"temperature\":\"1886\"}"}
2016-12-27 22:29:53.845 XiaomiGateway: unhandled model: sensor_ht
2016-12-27 22:29:53.845 {"cmd":"report","model":"sensor_ht","sid":"158d0001xxxxxx","short_id":37795,"data":"{\"humidity\":\"4366\"}"}
That's looks goodBelieve, soon we'll get them used too...
- Attachments
-
- xiaomi_temp.png (28.59 KiB) Viewed 2279 times
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 61
- Joined: Saturday 17 December 2016 11:51
- Target OS: Linux
- Domoticz version: Beta
- Location: Moscow, Russia
- Contact:
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Cool, how it will look when you combine?Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
- 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?
This is how it would look, however as the temperature and humidity are reported from the gateway in separate messages, I don't see a good way to combine them. It would be possible by querying the database, but I prefer to keep things simple.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 10
- Joined: Tuesday 20 December 2016 5:52
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Separate looks good!corbin wrote: Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
- 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?
I've updated my pull request with temperature and humidity sensors handled.ERRORR2 wrote:Separate looks good!corbin wrote: Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 10
- Joined: Tuesday 20 December 2016 5:52
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Compiled new version. Now I can control socket and see temperature sensor! Great work! But can't see humidity.corbin wrote: I've updated my pull request with temperature and humidity sensors handled.
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
ERROR2, Wait a few minutes, they go up again.
-
- Posts: 10
- Joined: Tuesday 20 December 2016 5:52
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Thanks! After some time I can see humidity sensor too.tiboo86 wrote:ERROR2, Wait a few minutes, they go up again.
-
- Posts: 34
- Joined: Saturday 17 December 2016 12:13
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Perfect!
Temperature and huminidy sensors works. Power socket control works. Big thanks.
But still something wrong with notifications. After sending control command to the power socket futher notifications (any of them, including e-mail) failed.
Temperature and huminidy sensors works. Power socket control works. Big thanks.
But still something wrong with notifications. After sending control command to the power socket futher notifications (any of them, including e-mail) failed.
Code: Select all
2016-12-28 13:28:59.151 Domoticz V3.6258 (c)2012-2016 GizMoCuz
2016-12-28 13:28:59.151 Build Hash: 91f4555, Date: 2016-12-28 11:38:47
2016-12-28 13:28:59.152 System: Raspberry Pi
2016-12-28 13:28:59.152 Startup Path: /home/pi/domoticz/
2016-12-28 13:30:09.157 Incoming connection from: 192.168.1.1
2016-12-28 13:30:19.051 Notification sent (http) => Success
2016-12-28 13:30:19.070 Active notification Subsystems: email, http, pushover (3/12)
2016-12-28 13:30:51.400 User: Admin initiated a switch command (6/Xiaomi Smart Plug Z3/On)
2016-12-28 13:30:51.401 010DD669
2016-12-28 13:30:51.469 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug Z3)
2016-12-28 13:30:51.477 {"cmd":"report","model":"plug","sid":"158d00010*","short_id":42960,"data":"{\"status\":\"on\"}"}
2016-12-28 13:30:51.490 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug Z3)
2016-12-28 13:30:51.498 {"cmd":"report","model":"plug","sid":"158d00010*","short_id":42960,"data":"{\"status\":\"on\"}"}
2016-12-28 13:30:51.554 XiaomiGateway: response {"cmd":"write_ack","model":"plug","sid":"158d00010*","short_id":42960,"data":"{\"status\":\"off\"}"}
2016-12-28 13:30:51.555 (Xiaomi GW) Light/Switch (Xiaomi Smart Plug Z3)
2016-12-28 13:31:03.183 Error: HTTP:
2016-12-28 13:31:03.183 Error: Notification sent (http) => Failed
2016-12-28 13:31:03.202 Active notification Subsystems: email, http, pushover (3/12)
Last edited by arkoko on Wednesday 28 December 2016 12:50, edited 1 time in total.
-
- Posts: 35
- Joined: Sunday 18 December 2016 12:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Tallinn / Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Thank you,
had to refresh cache, and then updated Gateway settings with ip address and key.
But now i have problem with notification too:
had to refresh cache, and then updated Gateway settings with ip address and key.
But now i have problem with notification too:
Code: Select all
2016-12-28 14:00:19.376 Error: HTTP:
2016-12-28 14:00:19.377 Error: Notification sent (http) => Failed
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Corbin, you then planned to be able to retrieve the consumption information of the zigbee plugs?
-
- Posts: 35
- Joined: Sunday 18 December 2016 12:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Tallinn / Estonia
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
I have both splitted and combined Xiaomi temp/hum sensors listed in devices:
And good news: looks like battery level is present (100), but only in splitted Temp device.
Code: Select all
93 Gateway 804D 77 Xiaomi Temperature Temp LaCrosse TX3 21.7 C - 100
97 Gateway 804D 1 Xiaomi Humidity Humidity LaCrosse TX3 Humidity 42 % - -
102 Gateway 804D 2 Xiaomi Temperature Temp + Humidity LaCrosse TX3 21.7 C, 43 % - -
Who is online
Users browsing this forum: No registered users and 1 guest