Xiaomi Smart Home Suite (very cheap) compatibilty?

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

Moderator: leecollings

ERRORR2
Posts: 10
Joined: Tuesday 20 December 2016 5:52
Target OS: Windows
Domoticz version:
Contact:

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

Post by ERRORR2 »

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.
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.
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 »

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)
arkoko
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?

Post by arkoko »

Can anybody else confirm that with last beta notifications does not work anymore?

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)
Or it related to the mentioned key encryption problem?
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 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"
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
arkoko
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?

Post by arkoko »

Open door sensor now detected fine. Thanks!
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\"}"}
But trying to control it get a unknown command and nothing hapened:

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)
pavelbor
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?

Post by pavelbor »

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).
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 »

arkoko wrote: But trying to control it get a unknown command and nothing hapened:
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.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
arkoko
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?

Post by arkoko »

After giving control command to the switch notifications becomes broken:

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\"}"}
And after domoticz daemon restart I have:

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]
Doing Raspberry restart helps to bring working notifications back.
corbin wrote:I'm doing some testing and should have a new pull request soon.
OK, we can wait :)
Thanks!
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 »

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 good ;) Believe, soon we'll get them used too...
Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
Attachments
xiaomi_temp.png
xiaomi_temp.png (28.59 KiB) Viewed 2280 times
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Coldman
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?

Post by Coldman »

Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
Cool, how it will look when you combine?
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 »

xiaomi_combined.png
xiaomi_combined.png (18.7 KiB) Viewed 2257 times
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)
ERRORR2
Posts: 10
Joined: Tuesday 20 December 2016 5:52
Target OS: Windows
Domoticz version:
Contact:

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

Post by ERRORR2 »

corbin wrote: Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
Separate looks good!
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 »

ERRORR2 wrote:
corbin wrote: Would you prefer separate devices for humidity and temperature, or a combined device? I currently have the devices seperate -
Separate looks good!
I've updated my pull request with temperature and humidity sensors handled.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
ERRORR2
Posts: 10
Joined: Tuesday 20 December 2016 5:52
Target OS: Windows
Domoticz version:
Contact:

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

Post by ERRORR2 »

corbin wrote: I've updated my pull request with temperature and humidity sensors handled.
Compiled new version. Now I can control socket and see temperature sensor! Great work! But can't see humidity.
tiboo86
Posts: 4
Joined: Friday 23 December 2016 15:08
Target OS: -
Domoticz version:
Contact:

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

Post by tiboo86 »

ERROR2, Wait a few minutes, they go up again.
ERRORR2
Posts: 10
Joined: Tuesday 20 December 2016 5:52
Target OS: Windows
Domoticz version:
Contact:

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

Post by ERRORR2 »

tiboo86 wrote:ERROR2, Wait a few minutes, they go up again.
Thanks! After some time I can see humidity sensor too.
arkoko
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?

Post by arkoko »

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.

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.
pavelbor
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?

Post by pavelbor »

Thank you,

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
tiboo86
Posts: 4
Joined: Friday 23 December 2016 15:08
Target OS: -
Domoticz version:
Contact:

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

Post by tiboo86 »

Corbin, you then planned to be able to retrieve the consumption information of the zigbee plugs?
pavelbor
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?

Post by pavelbor »

I have both splitted and combined Xiaomi temp/hum sensors listed in devices:

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 %	-	-	
And good news: looks like battery level is present (100), but only in splitted Temp device.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest