Xiaomi Doorbell

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.
Post Reply
BarryT
Posts: 282
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: beta
Location: east netherlands
Contact:

Xiaomi Doorbell

Post by BarryT » Saturday 17 February 2018 13:45

Hi everyone,

i have some troubles with the usage of the doorbell / light in xiaomi..
I have a switch, wich been pressed at the front door.
This is just a "chime", with an on button.
That is working, but when i want to use it with the doorbell in the xiaomi, i dont get any sound.
I use the blocky for this, like mentioned in the wiki, but when i switch on my light scenes the doorbell is ringing?? :(
What is going on here?
I just want to use the doorbell when i pressed on the button, and the rgb led without the sound!

Thanks!
6x Raspberry 3
2x VPS Server
2x Active VPN
A lot of scripts, switches and sensors :)

dcanogar
Posts: 2
Joined: Saturday 10 March 2018 15:21
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Xiaomi Doorbell

Post by dcanogar » Saturday 10 March 2018 15:24

Hi,


I found this Lua code that works for me:

Code: Select all

commandArray = {}

-- sound values:
-- 10 = Doorbell
-- 20 = Knock
-- 30 = Hilarious
-- 40 = Alarm clock

sound = 10
volume = 80

if devicechanged['Timbre'] == 'Group On' then
	commandArray['Xiaomi Gateway Volume']='Set Level '..tostring(volume)
	commandArray['Xiaomi Gateway Doorbell']='Set Level '..tostring(sound)
end

return commandArray

BarryT
Posts: 282
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: beta
Location: east netherlands
Contact:

Re: Xiaomi Doorbell

Post by BarryT » Sunday 18 March 2018 22:13

dcanogar wrote:
Saturday 10 March 2018 15:24
Hi,


I found this Lua code that works for me:

Code: Select all

commandArray = {}

-- sound values:
-- 10 = Doorbell
-- 20 = Knock
-- 30 = Hilarious
-- 40 = Alarm clock

sound = 10
volume = 80

if devicechanged['Timbre'] == 'Group On' then
	commandArray['Xiaomi Gateway Volume']='Set Level '..tostring(volume)
	commandArray['Xiaomi Gateway Doorbell']='Set Level '..tostring(sound)
end

return commandArray
thanks!
i've done it with a blocky script now, as simple as it is, it works perfectly :)
if button doorbell=on set gateway volume 10 and doorbell level 10

button doorbell = push on button
the led is done by a json when pressed on the doorbell button:
ON: http://IP:PORT/json.htm?type=command&param=setcolbrightnessvalue&idx=GATEWAYIDX&hex=27024E&brightness=100&iswhite=false
OFF: http://IP:PORT/json.htm?type=command&param=setcolbrightnessvalue&idx=GATEWAYIDX&hex=0000&brightness=100&iswhite=false

:)
6x Raspberry 3
2x VPS Server
2x Active VPN
A lot of scripts, switches and sensors :)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests