Xiaomi Smart Home Suite (very cheap) compatibilty?

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

Moderator: leecollings

StefanoA
Posts: 15
Joined: Thursday 29 December 2016 7:29
Target OS: Windows
Domoticz version:
Contact:

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

Post by StefanoA »

After updating to latest beta V3.7320 I can detect all devices correctly

temperatures are read correctly,
but when I try to switch ON/OFF a Xiaomi Smart Plug nothing happens (no error, no switching on the plug)

I tried to follow troubleshooting guide by corbin and issue iptable commands but got following errors

Image[/url]

can the problem be related to some kernel/system version or configuration ?

I tried already several times to remove and add again the gateway after changing its LAN password and checking IP address

I'm running domoticz on raspberry pi 3 b updated to latest version of system

Code: Select all

2017-04-14 06:35:16.594 PROXY: Authenticate result: success.
2017-04-14 06:35:24.188 PROXY: Incoming connection from: 27.102.101.11
2017-04-14 06:39:35.803 User: Admin initiated a switch command (55/fancoil zona ufficio/On)
2017-04-14 06:39:35.954 (Gateway_negozio) Light/Switch (fancoil zona ufficio)
2017-04-14 06:40:30.249 User: Admin initiated a switch command (55/fancoil zona ufficio/Off)
2017-04-14 06:40:30.400 (Gateway_negozio) Light/Switch (fancoil zona ufficio)
2017-04-14 06:41:01.127 XiaomiGateway: stopped
2017-04-14 06:42:37.157 XiaomiGateway: will listen on 9898 for hardware id 11
2017-04-14 06:42:37.157 XiaomiGateway: Worker started...
2017-04-14 06:42:37.158 XiaomiGateway: Using 192.168.1.5 for local IP address.
2017-04-14 06:42:37.163 XiaomiGateway: RGB Gateway Detected
2017-04-14 06:42:37.163 XiaomiGateway: New Gateway Found (29b426a4/Xiaomi RGB Gateway)
2017-04-14 06:42:37.164 (Gwy_negozio) Lighting Limitless/Applamp (Unknown)
2017-04-14 06:42:37.167 XiaomiGateway: New Switch Device Found (29b426a4)
2017-04-14 06:42:37.167 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.171 XiaomiGateway: New Switch Device Found (29b426a4)
2017-04-14 06:42:37.171 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.175 XiaomiGateway: New Switch Device Found (29b426a4)
2017-04-14 06:42:37.175 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.179 XiaomiGateway: New Switch Device Found (29b426a4)
2017-04-14 06:42:37.180 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.183 XiaomiGateway: New Switch Device Found (29b426a4)
2017-04-14 06:42:37.183 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.593 {"cmd":"read_ack","model":"sensor_ht","sid":"158d00010f2abd","short_id":212,"data":"{\"voltage\":3035,\"temperature\":\"2064\",\"humidity\":\"4843\"}"}
2017-04-14 06:42:37.593 (Gwy_negozio) Temp (Xiaomi Temperature)
2017-04-14 06:42:37.595 (Gwy_negozio) Humidity (Xiaomi Humidity)
2017-04-14 06:42:37.693 XiaomiGateway: New Switch Device Found (010c5930)
2017-04-14 06:42:37.693 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.697 {"cmd":"read_ack","model":"plug","sid":"158d00010c5930","short_id":43823,"data":"{\"voltage\":3600,\"status\":\"off\",\"inuse\":\"0\",\"power_consumed\":\"83964\",\"load_power\":\"0\"}"}
2017-04-14 06:42:37.798 XiaomiGateway: New Switch Device Found (0125938d)
2017-04-14 06:42:37.798 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.801 {"cmd":"read_ack","model":"plug","sid":"158d000125938d","short_id":62008,"data":"{\"voltage\":3600,\"status\":\"off\",\"inuse\":\"0\",\"power_consumed\":\"14732\",\"load_power\":\"0\"}"}
2017-04-14 06:42:37.902 XiaomiGateway: New Switch Device Found (01104c2a)
2017-04-14 06:42:37.902 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:37.905 {"cmd":"read_ack","model":"plug","sid":"158d0001104c2a","short_id":25300,"data":"{\"voltage\":3600,\"status\":\"off\",\"inuse\":\"0\",\"power_consumed\":\"31895\",\"load_power\":\"0\"}"}
2017-04-14 06:42:37.906 {"cmd":"read_ack","model":"sensor_ht","sid":"158d00015b2ef7","short_id":42729,"data":"{\"voltage\":2985,\"temperature\":\"2067\",\"humidity\":\"4896\"}"}
2017-04-14 06:42:37.905 (Gwy_negozio) Temp (Xiaomi Temperature)
2017-04-14 06:42:37.908 (Gwy_negozio) Humidity (Xiaomi Humidity)
2017-04-14 06:42:38.006 XiaomiGateway: New Switch Device Found (010dd9e8)
2017-04-14 06:42:38.006 (Gwy_negozio) Light/Switch (Unknown)
2017-04-14 06:42:38.010 {"cmd":"read_ack","model":"plug","sid":"158d00010dd9e8","short_id":34536,"data":"{\"voltage\":3600,\"status\":\"off\",\"inuse\":\"0\",\"power_consumed\":\"79632\",\"load_power\":\"0\"}"}
2017-04-14 06:59:49.045 User: Admin initiated a switch command (55/fancoil zona ufficio/On)
2017-04-14 06:59:49.196 (Gwy_negozio) Light/Switch (fancoil zona ufficio)
2017-04-14 07:00:06.827 User: Admin initiated a switch command (55/fancoil zona ufficio/Off)
2017-04-14 07:00:06.978 (Gwy_negozio) Light/Switch (fancoil zona ufficio)
bing69
Posts: 139
Joined: Thursday 05 June 2014 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: 's-Hertogenbosch, NL
Contact:

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

Post by bing69 »

Try "sudo" before the command
jjnj

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

Post by jjnj »

Swifty wrote:Has anyone tried to connect more than one Xiaomi gateway to Domoticz?

I'm thinking of buying a second one, just to use for a hallway night light (that can be switched on via presence sensor).. but don't want to buy another if it will interfere with my current one (or won't work in Domoticz at all)
I would also like to know. Not only is it cheap but also multipurpose. After the addition of the sounds (thanks a lot to the devs!!!) I'm using it to trigger sounds (and in some cases simultaneous with light efects) for:
- doorbell
- arm/disarm alarm
- alarm
- rain is coming and windows are open
- etc

The sounds and definatelly the light aren't noticeable everywhere in the house.
StefanoA
Posts: 15
Joined: Thursday 29 December 2016 7:29
Target OS: Windows
Domoticz version:
Contact:

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

Post by StefanoA »

bing69 wrote:Try "sudo" before the command
using sudo I didn't get any error (nor successful execution, nothing)
then I restarted the raspberry and tried again but seems still same problem

there is no real connection between domoticz status and status I can control from MiHome app directly of switches

any advice? what can I do?
some weeks ago I tried already and at that time everything was working like a charm :)
evographics
Posts: 4
Joined: Wednesday 12 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by evographics »

corbin wrote:
evographics wrote:Hi, I just configured a raspberry pi with domoticz. I want to add the Xiaomi Gateway, but it is not in the Hardware list. I already cleared the browser cache. Can you help me?
Did you install the beta version of Domoticz?
I was able to install the beta version. I just replaced the domoticz folder on my raspberry pi with the beta one. The Xiaomi Gateway is on the list now, and I was able to add it in the Domoticz.
After enabling the UDP, domoticz shows the Xiaomi Gateway services, the motion sensors, but the Temperature-Humidity and Window/Door sensors are not listed. I already paired them on the Mi Home app, and they work great.
I already tried to reboot the respberry.

Any suggestions? Thank you!
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

evographics wrote:
corbin wrote:
evographics wrote:Hi, I just configured a raspberry pi with domoticz. I want to add the Xiaomi Gateway, but it is not in the Hardware list. I already cleared the browser cache. Can you help me?
Did you install the beta version of Domoticz?
I was able to install the beta version. I just replaced the domoticz folder on my raspberry pi with the beta one. The Xiaomi Gateway is on the list now, and I was able to add it in the Domoticz.
After enabling the UDP, domoticz shows the Xiaomi Gateway services, the motion sensors, but the Temperature-Humidity and Window/Door sensors are not listed. I already paired them on the Mi Home app, and they work great.
I already tried to reboot the respberry.

Any suggestions? Thank you!
For me it took patience. After a while the sensors where added.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

@corbin:

Are the issues with the voltage values for the doorsensors addressed? Do you (and others) recognise the problem that the values aren't read anymore and, if you deleted them, they are not coming back?

I just updated to the latest Domoticz and see no changes, hence the reason I ask :)
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
bing69
Posts: 139
Joined: Thursday 05 June 2014 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: 's-Hertogenbosch, NL
Contact:

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

Post by bing69 »

mvveelen wrote:@corbin:

Are the issues with the voltage values for the doorsensors addressed? Do you (and others) recognise the problem that the values aren't read anymore and, if you deleted them, they are not coming back?

I just updated to the latest Domoticz and see no changes, hence the reason I ask :)
+1
Swifty
Posts: 76
Joined: Saturday 31 December 2016 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Swifty »

murtadin wrote:
Swifty wrote:Has anyone tried to connect more than one Xiaomi gateway to Domoticz?

I'm thinking of buying a second one, just to use for a hallway night light (that can be switched on via presence sensor).. but don't want to buy another if it will interfere with my current one (or won't work in Domoticz at all)
Just buy xiaomi socket + any source of light you like.

Sent from my MI MAX using Tapatalk
Not a bad idea, but as they don't have UK sockets it means adaptors both sides, which I don't like the idea of. Plus I like the fact the light is built into the socket (ie. No having to place lights, cables everywhere etc..)
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

@corbin:

Another issue I mentioned: after a new update of Domoticz, and while all doors where closed, the statuses of the door sensors where wrong. In Domoticz the status was 'open' and that's not the last status Domoticz received from the sensors, so there might be something wrong there too.

Would be nice if other users could check this so you know where to look for the bug :) ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 »

@mvveelen I can confirm that deleting a door sensor, and waiting for it to be added again will result in no battery level being present.

If you delete the sensor, then restart the Xiaomi Gateway in Domoticz, it will be added in again with the battery level. So that is a work around until I get that bug fixed.

I'm not seeing the wrong status for the door sensors however. Could you send me a test domoticz.db database that has the door sensors not updating the status correctly?
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
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 »

@evographics

Can you check your Domoticz log for messages containing "sensor_ht" and "magnet", and report back here?

Code: Select all

{"cmd":"read_ack","model":"sensor_ht","sid":"158d000153725c","short_id":61488,"data":"{\"humidity\":6678,\"temperature\":\"2333\"}"}
{"cmd":"report","model":"sensor_ht","sid":"158d000153725c","short_id":61488,"data":"{\" humidity \":"6678"}" }
{"cmd":"report","model":"sensor_ht","sid":"158d000153725c","short_id":61488,"data":"{\" temperature \":"2333"}" }
{"cmd":"read_ack","model":"magnet","sid":"158d0001102269","short_id":15984,"data":"{\"voltage\":3045,\"status\":\"open\"}"}
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
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 »

StefanoA wrote:
Image[/url]

can the problem be related to some kernel/system version or configuration ?
Very likely it is your Raspberry Pi configuration. I don't know why iptables would not be available on your system... my stock install on Pi3:

Code: Select all

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
pi@raspberrypi:~ $ iptables
iptables v1.4.21: no command specified
Try `iptables -h' or 'iptables --help' for more information.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

corbin wrote:@mvveelen I can confirm that deleting a door sensor, and waiting for it to be added again will result in no battery level being present.

If you delete the sensor, then restart the Xiaomi Gateway in Domoticz, it will be added in again with the battery level. So that is a work around until I get that bug fixed.

I'm not seeing the wrong status for the door sensors however. Could you send me a test domoticz.db database that has the door sensors not updating the status correctly?
About the sensor-issue: what steps do I have to take exactly? Because, I only deleted the battery statuses. Not the sensors. Do I have to delete them from Domoticz completely and then restart the gateway in Domoticz? Or is there another way to accomplish it?

About the statuses of the door sensors: when I stop and start Domoticz, now 2 of the sensors remain 'open' while in fact they are closed. Do you need to have my complete .db to check? If zo, where can I send it?

Edit:

deleted one of the sensors. Disabled the Xiaomi gateway and re-enabled it again. Now the sensor is back (and added), but still no battery status. Perhaps I have to wait for a while, but I'm not sure if this is the way to fix it.....
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 are no longer separate battery voltage devices. you should be seeing the battery level as a percentage, viewable on the device page:
devices.PNG
devices.PNG (273.24 KiB) Viewed 2067 times
With your domoticz.db database, you can delete entries if you have passwords etc stored in there - I only want to see the Xiaomi device entries. Host it on a file sharing service eg https://www.hightail.com/
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

Ah, good to know !

I see the status of the battery on 2 of the 4 sensors. So I'll try to fix it with the ones that don't give the status tomorrow by deleting them, restarting the gateway and then re-adding them. Maybe (because of the 2 out of 4) this is also the reason that 2 out of 4 give the wrong status after restarting Domoticz....

To be continued

Oh, one question though: is it possible to show the battery status in the Switch view? I'd like to see it there AND would like to use the status to warn me if the level reaches a certain low level so I can switch the battery.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 »

mvveelen wrote: Oh, one question though: is it possible to show the battery status in the Switch view? I'd like to see it there AND would like to use the status to warn me if the level reaches a certain low level so I can switch the battery.
That is a Domoticz specific question which I don't have the answer to, but would like to know for myself so can get alerts on battery low level. There is a 'battery low level' setting in Domoticz which I would assume can be used to trigger alerts.

Also, we don't actually know what the minimum operating voltage of the devices are yet, so the battery level is only an approximation at this stage.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
joebar
Posts: 35
Joined: Tuesday 24 January 2017 12:19
Target OS: -
Domoticz version:
Contact:

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

Post by joebar »

corbin wrote:
StefanoA wrote:
Image[/url]

can the problem be related to some kernel/system version or configuration ?
Very likely it is your Raspberry Pi configuration. I don't know why iptables would not be available on your system... my stock install on Pi3:

Code: Select all

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
pi@raspberrypi:~ $ iptables
iptables v1.4.21: no command specified
Try `iptables -h' or 'iptables --help' for more information.
I had the same, but simply raise the permissions: using sudo iptables did it for me..
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 »

mvveelen wrote:@corbin:

Another issue I mentioned: after a new update of Domoticz, and while all doors where closed, the statuses of the door sensors where wrong. In Domoticz the status was 'open' and that's not the last status Domoticz received from the sensors, so there might be something wrong there too.

Would be nice if other users could check this so you know where to look for the bug :) ?
Hi, I have checked this and I confirm that the status after an update is open although the physical state is closed.
I hope this can be changed since many actions in my automationplan are depending on door states and it would be lot of alarm and lights when after a update all the states will be open :-)
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
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

Is there a specific reason why you don't have the separate battery statuses under "Utility" ? I was happy with that solution, but somehow you deleted it. Maybe you have good reasons so I can understand why :) ?
All battery statuses are back now. Don't know if that closed/open status will be OK next time I update Domoticz, but if it's not, I will send you my domoticz.db 8-)

Oops, I just read bertigb's reply and see that I'm not the only one with wrong closed/open statuses after restarting Domoticz. Perhaps some small bug in the code?

Edit:

I see this in my log:

Code: Select all

2017-04-15 11:45:58.200 {"cmd":"heartbeat","model":"magnet","sid":"158d0001191a13","short_id":2787,"data":"{\"voltage\":3065,\"status\":\"open\"}"}
Status open ?? The sensor is closed and also the status in Domoticz remains closed. Is this normal behaviour or a lead to the bug in the code :) ?
Last edited by mvveelen on Saturday 15 April 2017 11:48, edited 1 time in total.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Post Reply

Who is online

Users browsing this forum: kniazio and 0 guests