Page 67 of 123

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

Posted: Friday 21 April 2017 12:51
by quack3d
Has anyone been able to make a script that lets you long click the wireless buttons to dim lamps up and down?

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

Posted: Friday 21 April 2017 14:25
by jjnj
You could do that by toggling a dummy switch. If dummy switch toggle on and light = on set lamp to 80% if switch toggle off set lamp to 20% . if you want to let the dim start when you long press and stop when release I cant help you

Verstuurd vanaf mijn LG-H870 met Tapatalk

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

Posted: Friday 21 April 2017 15:01
by quack3d
Already have that with a blockly script. One click 5 %, double click 30 % and long click 100 %. So yes, it's the latter you wrote I would like.

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

Posted: Friday 21 April 2017 15:04
by bing69
I read some opposing messages about the use of Xiaomi powerplugs (zigbee version).
Does this work now as a repeater or not. Who can give some clarity?

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

Posted: Saturday 22 April 2017 0:33
by pikapt
in theory yes, but most of us find it doesn't work very well..

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

Posted: Sunday 23 April 2017 13:54
by quack3d
What is the interval the temperature sensor reports in? Is there a way to modify it?

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

Posted: Sunday 23 April 2017 14:11
by bing69
Look in domoticz to Setup/Settings/Meters/Counters

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

Posted: Sunday 23 April 2017 14:46
by quack3d
Huh? The interval. How often it sends value to Domoticz.

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

Posted: Sunday 23 April 2017 14:47
by bing69
quack3d wrote:Huh? The interval. How often it sends value to Domoticz.
Sorry, i think only when a parameter change.

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

Posted: Sunday 23 April 2017 17:42
by Mooseknuckle
bertbigb wrote:
G3rard wrote:@bertbigb, the Xiaomi lux sensor is available in the latest beta, so no need to install corbins dev version.
Make sure you have new hardware enabled in the Domoticz settings (think it took some time before it was available) and consider a restart of Domoticz.
I did a restart and have had enabled new hardware all the evening and night over. Still no result.
I also checked for the firmware, at this moment it is on 1.4.1_145.0141

Does anyone has another suggestion / solution?
I had the same problem. After I enabled the "automatic gateway light" scene in the mi home app on my phone the lux sensor appeared in Domoticz. Maybe you can give it a try.

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

Posted: Sunday 23 April 2017 19:32
by delius
Great work you guys, I am very pleased with the Xiaomi plugin and all the working functionallity

After some trial and error I managed to use the Gateway sound devices in a Lua script. Since I could not find this information elsewhere I thought it would be nice to share it here.

Code: Select all

if (devicechanged['door_sensor'] == 'Open') then
--[[
    10 = Doorbell
    20 = knock on door
    30 = Hilarious
    40 = Alarm Clock
--]]
        sound = 10
        volume = 25
        commandArray['Xiaomi Gateway Volume']='Set Level '..tostring(volume)
        commandArray['Xiaomi Gateway Doorbell']='Set Level '..tostring(sound)
end
The other devices (XG Alarm Clock and XG Alarm Ringtone) work the same way. Adding 10 to the Level changes the sound.

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

Posted: Sunday 23 April 2017 21:38
by Derik
delius wrote:Great work you guys, I am very pleased with the Xiaomi plugin and all the working functionallity

After some trial and error I managed to use the Gateway sound devices in a Lua script. Since I could not find this information elsewhere I thought it would be nice to share it here.

Code: Select all

if (devicechanged['door_sensor'] == 'Open') then
--[[
    10 = Doorbell
    20 = knock on door
    30 = Hilarious
    40 = Alarm Clock
--]]
        sound = 10
        volume = 25
        commandArray['Xiaomi Gateway Volume']='Set Level '..tostring(volume)
        commandArray['Xiaomi Gateway Doorbell']='Set Level '..tostring(sound)
end
The other devices (XG Alarm Clock and XG Alarm Ringtone) work the same way. Adding 10 to the Level changes the sound.
Great job!!!!
Perhaps now possible to use a other internetstation or something like that.
Youtube playlist or.....

xxx

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

Posted: Monday 24 April 2017 10:21
by mikeoo
I am upgrading my old door sensors for the Xiaomi door sensors.

Door Sensor is working with Domoticz and now i try to change my LUA script for getting a telegram message when the door open or closes and nobody is at home.

With my old door sensors i used the same script and that is working fine for open and closing the door.

But with the Xiaomi sensors I can't get it to work when the door is closing again. When the door opens i get a telegram message and in the log a print command.
When the door is closed again no Telegram of Print line in the logfile.

For testing I removed the Nobody Home part for now and only testing for door open or close.

Door Sensor name in Domoticz = Achterdeur1 (straat)
Latest Beta 3.7377 is using
When i used Notification button on the sensor itself it is working fine but i want to use LUA for it.

Code: Select all

commandArray = {}

if devicechanged["Achterdeur1 (straat)"] then
	if (otherdevices["Achterdeur1 (straat)"] == 'Open') then
		print('<font color="blue">Er is niemand thuis en de Voordeur gaat open!!</font>')
		os.execute('/home/pi/tg/scripts/generic/telegram.sh msg Michel_Groen "Er is niemand thuis en de Voordeur gaat open!!"')
	elseif (otherdevices["Achterdeur1 (straat)"] == 'close') then
		print('<font color="blue">Er is niemand thuis en de Voordeur gaat dicht!!</font>')
		os.execute('/home/pi/tg/scripts/generic/telegram.sh msg Michel_Groen "Er is niemand thuis en de Voordeur gaat dicht!!"')
	end
end
return commandArray
Logfile when sensor is open or close

Code: Select all

2017-04-24 10:05:21.560 LUA: Er is niemand thuis en de Voordeur gaat open!!
2017-04-24 10:05:21.516 (Xiaomi Gateway) Light/Switch (Achterdeur1 (straat))
2017-04-24 10:05:21.608 {"cmd":"report","model":"magnet","sid":"158d00013edc43","short_id":40169,"data":"{\"status\":\"open\"}"}

2017-04-24 10:05:24.790 (Xiaomi Gateway) Light/Switch (Achterdeur1 (straat))
2017-04-24 10:05:24.840 {"cmd":"report","model":"magnet","sid":"158d00013edc43","short_id":40169,"data":"{\"status\":\"close\"}"} 
Note: In the Domoticz log I get Open and Close but in the logfile of the doorsensor itself it is giving On or Off.

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

Posted: Monday 24 April 2017 10:39
by corbin
Maybe yours is different due to the language, but in english it is "Closed" not "close".

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

Posted: Monday 24 April 2017 11:34
by mikeoo
corbin wrote:Maybe yours is different due to the language, but in english it is "Closed" not "close".

That is indeed true :lol: but the Sensor send "close' to the Domoticz log that's why i was thinking i need the use that part.

http://nl.tinypic.com/r/2v3mtxg/9

With Closed it is working :mrgreen:

Different values used
1. Domoticz Log = Close / Open
2. Log with sensor itself = On / Off
3. Lua script = Closed / Open

Maybe an idea to give 1 the same value as 3 if possible of course.
Logging with sensor I get. It depends what you kind you choose to use in Domoticz.

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

Posted: Monday 24 April 2017 19:29
by xxLeoxx93
claudioita wrote:Is it possible to use TWO Xiaomi Gateway in Domoticz?
I've two gateways, but I can't see or use the second one :(
Is there any way to get this done? With the additional functions it would be sweat to use two gateway.

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

Posted: Monday 24 April 2017 20:17
by mvveelen
corbin wrote:Maybe yours is different due to the language, but in english it is "Closed" not "close".
Strange thing happens: I had already 4 Xiaomi door sensors. They are all reporting Open / Closed. With the 2 new Xiaomi door sensors I got a few days ago, added in the latest Domoticz, it reports Unlocked / Locked.

Is this due to a change in the code? Do I have to add the "old" 4 sensors again? The type of switch is all the same.

Edit:

my bad. I selected door lock instead of door contact...... next !

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

Posted: Monday 24 April 2017 22:02
by gewoonandre
Hi All,
I'm using the Xiaomi gateway for several months already running on a windows machine to play with it as 'test' enviroment. Works really perfect!
Today I've installed the latest release (3.7377) on a RPI and would like to start from scratch.

When I try to add the gateway, the fields "Remote Address", "Port" and "Password" are not visible.
Result : not possible to add the gateway.

Is there anything changed with the procedure to add the gateway?
Screenshot : http://imageshack.com/a/img922/1541/umPf9Y.png

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

Posted: Monday 24 April 2017 22:12
by bing69
gewoonandre wrote:Hi All,
I'm using the Xiaomi gateway for several months already running on a windows machine to play with it as 'test' enviroment. Works really perfect!
Today I've installed the latest release (3.7377) on a RPI and would like to start from scratch.

When I try to add the gateway, the fields "Remote Address", "Port" and "Password" are not visible.
Result : not possible to add the gateway.

Is there anything changed with the procedure to add the gateway?
Screenshot : http://imageshack.com/a/img922/1541/umPf9Y.png
Clear de cache from the browser or try a other browser wil maybe help.

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

Posted: Monday 24 April 2017 22:15
by gewoonandre
Ah, thanks a lot!
Tried already to clear the cache, without improvements.
Another browser solved the problem :-)