Page 121 of 123

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

Posted: Friday 04 January 2019 12:51
by Vomera
I have this same issue when i do this on one Domoticz server. I figured out one gatewAy couldn’t open the port 9898 or 4321 even when I activate the lan protocol several times. When I send a package with Whois on 9898 he doesn’t respond. The other 2 responds very good.

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

Posted: Thursday 10 January 2019 21:14
by Neokian
The gateway/app seems to support Tradfri lamps now. Can the lamps be imported in Domoticz?

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

Posted: Tuesday 15 January 2019 14:38
by rorie
Yesterday I succesfully paired my Ikea GU10 spot with the Xiaomi gateway v2. Controlling my GU 10 spot works perfect with the Mi Home app, switching lamps on and off and dimming. When I go to devices in Domoticz I don`t see my Ikea spot, so I was also wondering when this is implemented.

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

Posted: Tuesday 22 January 2019 23:18
by chatainsim
rorie wrote: Tuesday 15 January 2019 14:38 Yesterday I succesfully paired my Ikea GU10 spot with the Xiaomi gateway v2. Controlling my GU 10 spot works perfect with the Mi Home app, switching lamps on and off and dimming. When I go to devices in Domoticz I don`t see my Ikea spot, so I was also wondering when this is implemented.
Do you have something in the log ?
Did you update the gateway to the latest firmware?

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

Posted: Saturday 02 February 2019 18:44
by Derik
chatainsim wrote: Tuesday 22 January 2019 23:18
rorie wrote: Tuesday 15 January 2019 14:38 Yesterday I succesfully paired my Ikea GU10 spot with the Xiaomi gateway v2. Controlling my GU 10 spot works perfect with the Mi Home app, switching lamps on and off and dimming. When I go to devices in Domoticz I don`t see my Ikea spot, so I was also wondering when this is implemented.
Do you have something in the log ?
Did you update the gateway to the latest firmware?
How do i update the firmware??

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

Posted: Sunday 03 February 2019 17:30
by chatainsim
Derik wrote: Saturday 02 February 2019 18:44
chatainsim wrote: Tuesday 22 January 2019 23:18
rorie wrote: Tuesday 15 January 2019 14:38 Yesterday I succesfully paired my Ikea GU10 spot with the Xiaomi gateway v2. Controlling my GU 10 spot works perfect with the Mi Home app, switching lamps on and off and dimming. When I go to devices in Domoticz I don`t see my Ikea spot, so I was also wondering when this is implemented.
Do you have something in the log ?
Did you update the gateway to the latest firmware?
How do i update the firmware??
With the Mi Home app. Profil -> Settings -> Check for update

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

Posted: Monday 04 February 2019 20:18
by hoeby
Just found this
The Xiaomi-Zero-Intelligent doorbell
Looked in the Xiaomi app, it is possible to connect it with the app.
Sorry, my knowledge is not that great to add this device to the Xiaomi plug-in, but maybe there is somebody who could look at it, if there are possibilities

could it be a doorbell option for domoticz?

Image

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

Posted: Monday 04 February 2019 20:25
by Derik
hoeby wrote: Monday 04 February 2019 20:18 Just found this
The Xiaomi-Zero-Intelligent doorbell
Looked in the Xiaomi app, it is possible to connect it with the app.
Sorry, my knowledge is not that great to add this device to the Xiaomi plug-in, but maybe there is somebody who could look at it, if there are possibilities

could it be a doorbell option for domoticz?

Image
mmm looks a great camra and bell..
Perhaps this is going to work in Domoticz?

And is the camera adjustable.?

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

Posted: Tuesday 05 February 2019 21:26
by jjnj
For some time now my second gateway only shows the rgb selector of the gateway and lux sensor.
There are multiple devices connected to the second gateway however but they aren't visible. They are visible in the mi home app and react to changes correctly. I also see nothing in the logs or any devices that come from the second gateway.

Adding it again doesn't help. The first gateway doesn't show any issues and works as expected.
I do see Error: XiaomiGateway: received data from unregisted gateway! for both gateways.

Domoticz is able to control the ledring of the second (and first) gateway (so there isn't a connection issue between Domoticz and the gateways i guess?) but the issue is related to not showing devices connected to the second gateway.
Both gateways are on the same and latest firmware version and Domoticz on the most recent beta. Unfortunatelly i already have this issue for several weeks now that i cannot use my second gateway.
Anybody has a trick?

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

Posted: Saturday 09 February 2019 22:21
by salvacalatayud
chatainsim wrote:
Derik wrote: Saturday 02 February 2019 18:44
chatainsim wrote: Tuesday 22 January 2019 23:18 Do you have something in the log ?
Did you update the gateway to the latest firmware?
How do i update the firmware??
With the Mi Home app. Profil -> Settings -> Check for update
I have the same issue, ikea bulbs don't appear in domoticz when linked to xiaomi gateway

Enviado desde mi Mi A2 mediante Tapatalk


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

Posted: Saturday 09 February 2019 23:14
by DennisD
hoeby wrote: Monday 04 February 2019 20:18 Just found this
The Xiaomi-Zero-Intelligent doorbell
Looked in the Xiaomi app, it is possible to connect it with the app.
Sorry, my knowledge is not that great to add this device to the Xiaomi plug-in, but maybe there is somebody who could look at it, if there are possibilities

could it be a doorbell option for domoticz?

Image
Wait with ordering it. I had 2 on order on Alie and sellers won't send it because it's not in stock yet (do take your money but don't inform you about it) Seems like it will be in stock in early/mid March

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

Posted: Sunday 10 February 2019 16:02
by japster
Vomera wrote: Tuesday 01 January 2019 16:16
DAVIZINHO wrote: Saturday 22 December 2018 15:41 some gateways have problems and its imposible to add to domoticz because not detect trafic on por 9898. I dont know how, but its real :-(
I have this issue. I have 3 gateways. I could only one gateway on domoticz.
Yesterday i managed to run 3 domoticz servers on 1 linux server.
They run seperate.

- The main gateway runs very good on Domoticz server A

- The second gateway i added it on domoticz server B. I get only messages like
2019-01-01 16:09:39.428 Error: XiaomiGateway: received data from unregisted gateway!
But the devices showed up in domoticz and added them. Could turn on the light on the gateway.

- The thirth gatway i added on domoticz server C.
Get the same messages but the problem is i cannot see any devices.

Changed the gateway from server C to server B and server B to server C. And same problem on changed servers appears too.
One gateway doesn't send the devices.

Btw, all devices are made on a sepparate MI account. So i didnt add them in 1 account. Test it also on one account, but same issue.
Is there any solution for this problem?
I've got a new xiaomi gateway (mi control hub) with latest firmware but the port 9898 is closed on the device.
I got it in developer mode and checked the wireless comunication protocol checkbox and got a password but i'm unable to comunicate with the gateway

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

Posted: Sunday 10 February 2019 16:08
by Vomera
I had the same issue, got a new one and works perfectly

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

Posted: Tuesday 12 February 2019 8:26
by chatainsim
salvacalatayud wrote: Saturday 09 February 2019 22:21
chatainsim wrote:
Derik wrote: Saturday 02 February 2019 18:44

How do i update the firmware??
With the Mi Home app. Profil -> Settings -> Check for update
I have the same issue, ikea bulbs don't appear in domoticz when linked to xiaomi gateway

Enviado desde mi Mi A2 mediante Tapatalk
This is because the gateway doesn't expose the Ikea light on the API.
We should wait for a gateway update, if it's planned.

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

Posted: Tuesday 12 February 2019 10:30
by salvacalatayud
chatainsim wrote: Tuesday 12 February 2019 8:26
salvacalatayud wrote: Saturday 09 February 2019 22:21
chatainsim wrote: With the Mi Home app. Profil -> Settings -> Check for update
I have the same issue, ikea bulbs don't appear in domoticz when linked to xiaomi gateway

Enviado desde mi Mi A2 mediante Tapatalk
This is because the gateway doesn't expose the Ikea light on the API.
We should wait for a gateway update, if it's planned.
Thanks, we will wait

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

Posted: Sunday 24 February 2019 21:43
by joostnl
Got same issue with HUE light, 'Bedroom' any code expert that can tell me why?

Thank you

Error: EventSystem: in Cube light dimming: [string "commandArray = {}
..."]:13: bad argument #1 to 'find' (string expected, got nil)

Code: Select all

commandArray = {}

-- Run only if the cube has been rotated clockwise or anti-clockwise
if devicechanged['Xiaomi Cube'] == "clock_wise" or devicechanged['Xiaomi Cube'] == "anti_clock_wise" then
   -- Runs only if the light is already On
    if (otherdevices['Bedroom'] == "On" or otherdevices['Bedroom'] == "Set Level") then
	-- grab the actual dimming value 
    	actual_dimming = tonumber(otherdevices_svalues['Bedroom'])
        --if the cube has been rotated clockwise and dimming is below 100
        if ((otherdevices['Xiaomi Cube'] == "clock_wise") and actual_dimming < 100) then
            -- need to find only the integer value
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value to the actual dimming, and if is greater than 100, set it to 100
            new_dim_value = actual_dimming + tonumber(numero)
            if new_dim_value > 100 then
                new_dim_value = 100
            end    
            comando = "Set Level "..new_dim_value
            commandArray['Bedroom']=comando
        end

        --if the cube has been rotated anti-clockwise and dimming is above 1
        if (otherdevices['Xiaomi Cube'] == "anti_clock_wise" and actual_dimming > 1) then
            -- need to find only the integer value
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value (in this case is a negative value), to the actual dimming, and if is smaller than 1, set it to 1
            new_dim_value = actual_dimming + tonumber(numero)
            if new_dim_value < 1 then
                new_dim_value = 1
            end    
            comando = "Set Level "..new_dim_value
            commandArray['Bedroom']=comando
        end
    end
end


return commandArray
jlmb22 wrote: Friday 04 August 2017 15:01
levynger wrote:
woody4165 wrote:
Just wrote a small script, but since I'm not a coder, I'm sure it can be optimized... :roll:

In my case, I want that the dimming works only if the lamp is already On.

Code: Select all

commandArray = {}

-- Run only if the cube has been rotated clockwise or anti-clockwise
if devicechanged['Xiaomi Cube Switch'] == "clock_wise" or devicechanged['Xiaomi Cube Switch'] == "anti_clock_wise" then
   -- Runs only if the light is already On
    if (otherdevices['YeeLight Salone'] == "On" or otherdevices['YeeLight Salone'] == "Set Level") then
	-- grab the actual dimming value 
    	actual_dimming = tonumber(otherdevices_svalues['YeeLight Salone'])
        --if the cube has been rotated clockwise and dimming is below 100
        if ((otherdevices['Xiaomi Cube Switch'] == "clock_wise") and actual_dimming < 100) then
            -- need to find only the integer value
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value to the actual dimming, and if is greater than 100, set it to 100
            new_dim_value = actual_dimming + tonumber(numero)
            if new_dim_value > 100 then
                new_dim_value = 100
            end    
            comando = "Set Level "..new_dim_value
            commandArray['YeeLight Salone']=comando
        end

        --if the cube has been rotated anti-clockwise and dimming is above 1
        if (otherdevices['Xiaomi Cube Switch'] == "anti_clock_wise" and actual_dimming > 1) then
            -- need to find only the integer value
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value (in this case is a negative value), to the actual dimming, and if is smaller than 1, set it to 1
            new_dim_value = actual_dimming + tonumber(numero)
            if new_dim_value < 1 then
                new_dim_value = 1
            end    
            comando = "Set Level "..new_dim_value
            commandArray['YeeLight Salone']=comando
        end
    end
end


return commandArray

It seems to work, if you have any suggestion, please share it!
thanks, recieved my cube, and used your script, modified it abit to allow turning on/off as well based on rotation is someone interfested in:

Code: Select all

-- Run only if the cube has been rotated clockwise or anti-clockwise
if devicechanged['Xiaomi Cube'] == "clock_wise" or devicechanged['Xiaomi Cube'] == "anti_clock_wise" then
   -- Runs only if the light is already On
    --if (otherdevices['CorridorLight'] == "On" or otherdevices['CorridorLight'] == "Set Level") then
   -- grab the actual dimming value 
       actual_dimming = tonumber(otherdevices_svalues['CorridorLight'])
       print("the Current YeeeLightSvalue: " .. actual_dimming)
        --if the cube has been rotated clockwise and dimming is below 100
        if ((otherdevices['Xiaomi Cube'] == "clock_wise") and actual_dimming < 100) then
            -- need to find only the integer value
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value to the actual dimming, and if is greater than 100, set it to 100
            new_dim_value = actual_dimming + tonumber(numero)
            if new_dim_value > 100 then
                new_dim_value = 100
            end    
            comando = "Set Level "..new_dim_value
            commandArray['CorridorLight']=comando
        end

        --if the cube has been rotated anti-clockwise and dimming is above 1
        if (otherdevices['Xiaomi Cube'] == "anti_clock_wise" and actual_dimming > 1) then
            -- need to find only the integer value
            print("a test print")
            actual_rotation = otherdevices_svalues['Xiaomi Cube Text']
            virgola = string.find(actual_rotation, ",")
            numero = string.sub(actual_rotation, 1, virgola-1)
            -- Add the rotation value (in this case is a negative value), to the actual dimming, and if is smaller than 1, set it to 1
            new_dim_value = actual_dimming + tonumber(numero)
            print("the new value to reduce to: " .. new_dim_value)
            if new_dim_value <= 1 then
                new_dim_value = 0
            end    
            comando = "Set Level "..new_dim_value
            commandArray['CorridorLight']=comando
        end
    --end
end


return commandArray

Hi, I'm trying to use your script for the same purpose but I have that error:
/usr/local/domoticz/var/scripts/lua/script_device_onkyo.lua:14: bad argument #1 to 'find' (string expected, got nil)

I'm totally newbie with domoticz and script (if it needed to be said...)

Anyone can help me please?

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

Posted: Friday 08 March 2019 14:31
by jjnj
japster wrote: Sunday 10 February 2019 16:02
Vomera wrote: Tuesday 01 January 2019 16:16
DAVIZINHO wrote: Saturday 22 December 2018 15:41 some gateways have problems and its imposible to add to domoticz because not detect trafic on por 9898. I dont know how, but its real :-(
I have this issue. I have 3 gateways. I could only one gateway on domoticz.
Yesterday i managed to run 3 domoticz servers on 1 linux server.
They run seperate.

- The main gateway runs very good on Domoticz server A

- The second gateway i added it on domoticz server B. I get only messages like
2019-01-01 16:09:39.428 Error: XiaomiGateway: received data from unregisted gateway!
But the devices showed up in domoticz and added them. Could turn on the light on the gateway.

- The thirth gatway i added on domoticz server C.
Get the same messages but the problem is i cannot see any devices.

Changed the gateway from server C to server B and server B to server C. And same problem on changed servers appears too.
One gateway doesn't send the devices.

Btw, all devices are made on a sepparate MI account. So i didnt add them in 1 account. Test it also on one account, but same issue.
Is there any solution for this problem?
I've got a new xiaomi gateway (mi control hub) with latest firmware but the port 9898 is closed on the device.
I got it in developer mode and checked the wireless comunication protocol checkbox and got a password but i'm unable to comunicate with the gateway
Same issue here, i have two xiaomi hubs but even with only one hub in Domoticz active at the moment i get:
Error: XiaomiGateway: received data from unregisted gateway!

The second one was added but has been deleted for a while since it doesn't receive any devices (it used to).
Running Domoticz version 4.10541

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

Posted: Friday 08 March 2019 14:43
by Derik
Is there perhaps someone that can tell me ho i can simple replace the battery of a Xiaomi temperature sensor?

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

Posted: Friday 08 March 2019 16:23
by jjnj
Derik wrote: Friday 08 March 2019 14:43 Is there perhaps someone that can tell me ho i can simple replace the battery of a Xiaomi temperature sensor?
You can twist the bottom portion a bit and i comes off.

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

Posted: Friday 08 March 2019 17:34
by Derik
jjnj wrote: Friday 08 March 2019 16:23
Derik wrote: Friday 08 March 2019 14:43 Is there perhaps someone that can tell me ho i can simple replace the battery of a Xiaomi temperature sensor?
You can twist the bottom portion a bit and i comes off.

That is the problem...
That part is not working by me for 3 sensors... :oops: :oops: