Xiaomi switch and LED problem. Please help

Post Reply
Arczipl
Posts: 5
Joined: Friday 08 September 2017 23:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Xiaomi switch and LED problem. Please help

Post by Arczipl » Sunday 10 September 2017 12:03

Hello,
I have a problem with blockly event.
I have a xiaomi switch / selector and I would like to click on (one click) the switch lit up and after next click (one click) turned off the LED. It would be ideal if this click activated a group or scene. I did this event as in the photo and unfortunately, but after clicking on the LED turns on but after another it does not turn off permanently. Turns off for a moment and then lights up again.
Please help and tell me what is wrong. Maybe someone is able to translate this into dzVents?
Below the screen of the event, switch / selector settings and user variables

Image

User avatar
mrf68
Posts: 220
Joined: Monday 23 February 2015 13:45
Target OS: Windows
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by mrf68 » Sunday 10 September 2017 17:15

Hello,

Maybe when you press the switch you hear a "click" but I suppose it's not the status that it sends to Domoticz. Try "On" or "Off".
----------
3x RPi
1x W2k12 (vm)
3x RFXcom433e
1x Razberry board
KAKU: 9x APA3-1500R, 2x ACDB-7000C, 3x AMST-606, 1x APIR-2150, 1x AWS-3500, 1x ATMT-502
Z-wave: 8x Everspring AN145
Misc: 2x wireless doorbells

Arczipl
Posts: 5
Joined: Friday 08 September 2017 23:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by Arczipl » Sunday 10 September 2017 20:40

"ON" and "OFF" stats not working. Any more ideas?:(

User avatar
mrf68
Posts: 220
Joined: Monday 23 February 2015 13:45
Target OS: Windows
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by mrf68 » Monday 11 September 2017 22:28

Open Blockly editor and press "Show current states". Look for your switch and the status it has.
----------
3x RPi
1x W2k12 (vm)
3x RFXcom433e
1x Razberry board
KAKU: 9x APA3-1500R, 2x ACDB-7000C, 3x AMST-606, 1x APIR-2150, 1x AWS-3500, 1x ATMT-502
Z-wave: 8x Everspring AN145
Misc: 2x wireless doorbells

theo69
Posts: 70
Joined: Sunday 04 June 2017 12:57
Target OS: Raspberry Pi
Domoticz version: la. beta
Location: World
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by theo69 » Monday 11 September 2017 22:35

Arczipl wrote:
Sunday 10 September 2017 12:03
Hello,
I have a problem with blockly event.
I have a xiaomi switch / selector and I would like to click on (one click) the switch lit up and after next click (one click) turned off the LED. It would be ideal if this click activated a group or scene. I did this event as in the photo and unfortunately, but after clicking on the LED turns on but after another it does not turn off permanently. Turns off for a moment and then lights up again.
Please help and tell me what is wrong. Maybe someone is able to translate this into dzVents?
Below the screen of the event, switch / selector settings and user variables

Image
Try lua instead:

commandArray = {}
if devicechanged['Xiaomi Switch'] == 'Click' then
if otherdevices['Xiaomi Router LED'] == 'Off' then
commandArray['Xiaomi Router LED'] = 'On'
else
commandArray['Xiaomi Router LED'] = 'Off'
end
end
return commandArray
Love my Xiaomi Gateway in connection with homebridge and domoticz on my PI3
Xiaomi Gateway Domoticz Wiki

User avatar
mrf68
Posts: 220
Joined: Monday 23 February 2015 13:45
Target OS: Windows
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by mrf68 » Tuesday 12 September 2017 6:41

Sorry, my bad, these switches seem to send status "click". i assumed it to be "on" or "off".
----------
3x RPi
1x W2k12 (vm)
3x RFXcom433e
1x Razberry board
KAKU: 9x APA3-1500R, 2x ACDB-7000C, 3x AMST-606, 1x APIR-2150, 1x AWS-3500, 1x ATMT-502
Z-wave: 8x Everspring AN145
Misc: 2x wireless doorbells

Arczipl
Posts: 5
Joined: Friday 08 September 2017 23:44
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Xiaomi switch and LED problem. Please help

Post by Arczipl » Tuesday 12 September 2017 15:24

Try lua instead:

commandArray = {}
if devicechanged['Xiaomi Switch'] == 'Click' then
if otherdevices['Xiaomi Router LED'] == 'Off' then
commandArray['Xiaomi Router LED'] = 'On'
else
commandArray['Xiaomi Router LED'] = 'Off'
end
end
return commandArray
It'working :) Thank's my freinds:) Tell me, what I must change to working with scenes/group?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests