Xiaomi Smart Home Suite (very cheap) compatibilty?
Moderator: leecollings
-
- Posts: 62
- Joined: Saturday 31 December 2016 15:33
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
@Corbin
Compiled binaries from your sources - can't control zigbee sockets too.
Compiled binaries from your sources - can't control zigbee sockets too.
- 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?
Cool!deennoo wrote: Xiaomi Cube + Yeelight : Rotative dimmer !
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
- 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?
the other issue was it could overflow the maximum int value, eg:levynger wrote: I though removing it before sending to HW again..
shortened sid hex: 012932CF
add 1 to the front to signify switch type: 1012932CF
convert 1012932CF to int: 4314444495
maximum int value: 2147483647
but if we reduced the hex string to 7 chars it could work. That would be assuming that the first number is always going to be 0 when shortened to 8 chars.
did you want to have 2 devices for the same switch?levynger wrote: UPDATE: found how to make 2 on/off type for the same HW.. had to change the xcmd.unitnumber before providing it to mainworker!
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Whether it is possible to bind domoticz(Xiaomi gateway) to network interface?
It looks like, right now, it can not be started on router.
When I start it like this, Raspberry Pi-Domoticz can see the gateway.
But when i start domoticz on router 192.168.1.1, Domoticz can't see the gateway
It looks like, right now, it can not be started on router.
When I start it like this, Raspberry Pi-Domoticz can see the gateway.
Code: Select all
router
192.168.1.1
|
____________________________
| |
Xiaomi Gateway Raspberry Pi-Domoticz
192.168.1.11 192.168.1.190
Code: Select all
router
192.168.1.1 Domoticz
|
____________________________
| |
Xiaomi Gateway Raspberry Pi
192.168.1.11 192.168.1.190
-
- Posts: 87
- Joined: Wednesday 21 December 2016 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Israel
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
yes, at certian point i have figured this one out, and dripped all changes andnreverted back to your original code, now using array strings, as you have suggested, and adding the ID of the ctrl2 devices there.corbin wrote:the other issue was it could overflow the maximum int value, eg:levynger wrote: I though removing it before sending to HW again..
shortened sid hex: 012932CF
add 1 to the front to signify switch type: 1012932CF
convert 1012932CF to int: 4314444495
maximum int value: 2147483647
but if we reduced the hex string to 7 chars it could work. That would be assuming that the first number is always going to be 0 when shortened to 8 chars.
and in writetohardware function, i can identify this device by matching the xcmd id with the strings array.
did you want to have 2 devices for the same switch?levynger wrote: UPDATE: found how to make 2 on/off type for the same HW.. had to change the xcmd.unitnumber before providing it to mainworker!
indeed, seems more logical to have 2 seperated on/off switches for the ctrl2 and a single on/off for the ctrl1
for the wireless switch (sw086) it should remain slector , as there is additonal trigger i have missed (both pressed).
-
- 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?
Sw086 simple switch wireless only send 'click' for the moment
For ctrl2 (wired dual switch) send on/off for each button and click both for when click both.
For ctrl2 need 3 devices : on/off for each button and one push on for click both
For ctrl2 (wired dual switch) send on/off for each button and click both for when click both.
For ctrl2 need 3 devices : on/off for each button and one push on for click both
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 87
- Joined: Wednesday 21 December 2016 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Israel
- Contact:
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Ctrl2 doesn't have both click option.deennoo wrote:Sw086 simple switch wireless only send 'click' for the moment
For ctrl2 (wired dual switch) send on/off for each button and click both for when click both.
For ctrl2 need 3 devices : on/off for each button and one push on for click both
It's only for the wireless.
You can always create group switch to turn both off/on..
Sent from my SM-N920C using Tapatalk
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: RE: Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Your right, i made inverssion with wireless onelevynger wrote:Ctrl2 doesn't have both click option.deennoo wrote:Sw086 simple switch wireless only send 'click' for the moment
For ctrl2 (wired dual switch) send on/off for each button and click both for when click both.
For ctrl2 need 3 devices : on/off for each button and one push on for click both
It's only for the wireless.
You can always create group switch to turn both off/on..
Sent from my SM-N920C using Tapatalk
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 37
- Joined: Wednesday 25 January 2017 20:54
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
@corbin i'm having random errors: "2017-01-28 15:11:05.873 Error: XiaomiGateway: unable to write command - Invalid Key"
They come and go very randomly i'm not sure if it's due to the device that is trying to be triggered is too far away from router (zigbee switch, which is around 8 m from router). Anyway we can debug this?
They come and go very randomly i'm not sure if it's due to the device that is trying to be triggered is too far away from router (zigbee switch, which is around 8 m from router). Anyway we can debug this?
-
- Posts: 87
- Joined: Wednesday 21 December 2016 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Israel
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
@corbin, added 2 new patches to your github for the cpp and the header file.
its a big change, as discuss previously in in this thread:
1) added string array to store all ID of the ctrl_neutral (1+2), so can be identified when creating them in Database, using "Unit Field" (for the dual switch), and when using from UI as well.
1) changed the ctrl_neutrals to on/off switches (i think upgrades will have to change it manually, or clean their deviceStatus table from ther database, as it wont change an exiting ID in this table
seems to work nicely here on my ctrl_neutral2 device, this time, kept in mind to deal with ctrl_neutral1 device, eventhough i dont have it.
happy weekend..
its a big change, as discuss previously in in this thread:
1) added string array to store all ID of the ctrl_neutral (1+2), so can be identified when creating them in Database, using "Unit Field" (for the dual switch), and when using from UI as well.
1) changed the ctrl_neutrals to on/off switches (i think upgrades will have to change it manually, or clean their deviceStatus table from ther database, as it wont change an exiting ID in this table
seems to work nicely here on my ctrl_neutral2 device, this time, kept in mind to deal with ctrl_neutral1 device, eventhough i dont have it.
happy weekend..
-
- Posts: 87
- Joined: Wednesday 21 December 2016 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Israel
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
not sureits related to the fact its far, this is the gateway answer, probably before even trying to reach your device..pikapt wrote:@corbin i'm having random errors: "2017-01-28 15:11:05.873 Error: XiaomiGateway: unable to write command - Invalid Key"
They come and go very randomly i'm not sure if it's due to the device that is trying to be triggered is too far away from router (zigbee switch, which is around 8 m from router). Anyway we can debug this?
does it happen after some command sent fine? is it for specific device? which one?
it may happen when starting the server, and the gateway didnt send the key for the first time.
- 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 seen this too. What could be happening is the encryption token changes on the gateway and Domoticz sends the control message before the new token has been processed.pikapt wrote:@corbin i'm having random errors: "2017-01-28 15:11:05.873 Error: XiaomiGateway: unable to write command - Invalid Key"
They come and go very randomly i'm not sure if it's due to the device that is trying to be triggered is too far away from router (zigbee switch, which is around 8 m from router). Anyway we can debug this?
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
- 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?
Thank you, I would have had much trouble doing it since I don't have these switches.levynger wrote:@corbin, added 2 new patches to your github for the cpp and the header file.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 87
- Joined: Wednesday 21 December 2016 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Israel
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
corbin wrote:Thank you, I would have had much trouble doing it since I don't have these switches.levynger wrote:@corbin, added 2 new patches to your github for the cpp and the header file.
Thanks, updated from your git & compiled - seems to be working fine..
-
- Posts: 37
- Joined: Wednesday 25 January 2017 20:54
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
@corbin i have a suggestion to make regarding the xiaomi switch: if we press the switch (one,twice etc), domoticz is able to get that from xiaomi hub but the state is not updated to off after that. That means that in every script we should include an update to the switch status itself to turn it off otherwise domoticz will be triggering the script until the status is changed. Can we include a logic on the switch itself to set it to off everytime a new event is received from the hub? or, does it make sense to do that?
Re: RE: Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
I think if changing the current behaviour, it should be optional. In my case its nice to see which action is preformed last for example.pikapt wrote:@corbin i have a suggestion to make regarding the xiaomi switch: if we press the switch (one,twice etc), domoticz is able to get that from xiaomi hub but the state is not updated to off after that. That means that in every script we should include an update to the switch status itself to turn it off otherwise domoticz will be triggering the script until the status is changed. Can we include a logic on the switch itself to set it to off everytime a new event is received from the hub? or, does it make sense to do that?
-
- 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?
I remove this fonction, i think it's not usefull to set a switch to Off as we can't do it by our self (by clicking i mean).pikapt wrote:@corbin i have a suggestion to make regarding the xiaomi switch: if we press the switch (one,twice etc), domoticz is able to get that from xiaomi hub but the state is not updated to off after that. That means that in every script we should include an update to the switch status itself to turn it off otherwise domoticz will be triggering the script until the status is changed. Can we include a logic on the switch itself to set it to off everytime a new event is received from the hub? or, does it make sense to do that?
You can set a returne to off by your self using : turn to off timer.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 37
- Joined: Wednesday 25 January 2017 20:54
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
Yeah domoticz its actually reacting to changes, so even if status is currently at "click", scripts are only triggered if a "new click" is found so i'll just set to off in the scripts! Thanks!
-
- Posts: 37
- Joined: Wednesday 25 January 2017 20:54
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Xiaomi Smart Home Suite (very cheap) compatibilty?
pretty cool! cheers corbinif (result == false) {
//send the message again
_log.Log(LOG_STATUS, "XiaomiGateway: SendMessageToGateway failed on first attempt, will try again");
sleep_milliseconds(100);
result = SendMessageToGateway(message);
- 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?
To clarify what deennoo said above, you can actually set it to turn off after x seconds in the Domoticz web GUI.pikapt wrote:Yeah domoticz its actually reacting to changes, so even if status is currently at "click", scripts are only triggered if a "new click" is found so i'll just set to off in the scripts! Thanks!
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Who is online
Users browsing this forum: No registered users and 1 guest