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
Xiaomi switch and LED problem. Please help
Moderator: leecollings
Re: Xiaomi switch and LED problem. Please help
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".
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".
-
- Posts: 6
- Joined: Friday 08 September 2017 23:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Xiaomi switch and LED problem. Please help
"ON" and "OFF" stats not working. Any more ideas?:(
Re: Xiaomi switch and LED problem. Please help
Open Blockly editor and press "Show current states". Look for your switch and the status it has.
-
- Posts: 60
- Joined: Sunday 04 June 2017 12:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: la. beta
- Location: World
- Contact:
Re: Xiaomi switch and LED problem. Please help
Try lua instead: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
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
Xiaomi Gateway Domoticz Wiki
Re: Xiaomi switch and LED problem. Please help
Sorry, my bad, these switches seem to send status "click". i assumed it to be "on" or "off".
-
- Posts: 6
- Joined: Friday 08 September 2017 23:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Xiaomi switch and LED problem. Please help
It'working Thank's my freinds:) Tell me, what I must change to working with scenes/group?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
-
- Posts: 2
- Joined: Wednesday 27 September 2017 9:30
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Xiaomi switch and LED problem. Please help
I have the following blocky and it works perfectly. I have two "If/do" instead of "if/do/else if/do".
Hope it helps.
Hope it helps.
- Attachments
-
- Captura.PNG (17.64 KiB) Viewed 2048 times
-
- Posts: 27
- Joined: Sunday 15 October 2017 6:13
- Target OS: Linux
- Domoticz version: 3.9224
- Location: Australia
- Contact:
Re: Xiaomi switch and LED problem. Please help
Thought I would post here rather than create a new thread.
Brand new to Domoticz and I have tried doing a similar thing.
If I use the same Blocky as the original post, the LED on the Gateway continually flicks on and off.
If I try apinyot solution, it does nothing at all.
If I try theo solution (LUA) it also does nothing.
The below works, but there is no way to turn off/toggle the light Anyone have any suggestions as to where the issue may be?
Thanks.
Brand new to Domoticz and I have tried doing a similar thing.
If I use the same Blocky as the original post, the LED on the Gateway continually flicks on and off.
If I try apinyot solution, it does nothing at all.
If I try theo solution (LUA) it also does nothing.
The below works, but there is no way to turn off/toggle the light Anyone have any suggestions as to where the issue may be?
Thanks.
Who is online
Users browsing this forum: No registered users and 0 guests