Push on/off impuls switch (teleruptor) light in blockly

Moderator: leecollings

Post Reply
stedew
Posts: 3
Joined: Tuesday 24 November 2015 8:19
Target OS: Windows
Domoticz version:
Contact:

Push on/off impuls switch (teleruptor) light in blockly

Post by stedew »

Hello,
I have searched the forum and didn't find a easy solution for this:
You know this things: teleruptors you connect a (group off) lamps on it and a (bunch off )switches. Then you push on the button the lamp goes "ON", push again lamp goes "OFF"
Problem is that it is not easy to implement this ( for non-guru as i ;) )
But then comes in blockly: you can read in "events" and do same graphical configuration/programmation to make a "teleruptor"
For the example i use:
-two "on buttons" (ONBUTTON & ONBUTTON2 )
-one LED/light switch (10_LED_16)
- A register "user Variable" type integer (REGISTER_10_16)


You can see that there are two "strange" things in the script:
>>First the off action off the buttons. i tested this with mysensor hw and the button(s) stays one without this, cuasing race conditions,
>>second the "Register value" this is completly redundant as you could use the 10_LED_16 state. Unfortunatly the script does not work without this User variable.

Hope it helps someone
Regards,
Stefan.
Attachments
corrected bloky (2° time %/6)
corrected bloky (2° time %/6)
Teleruptor puls_on puls_off.png (60.99 KiB) Viewed 1312 times
Last edited by stedew on Sunday 29 November 2015 21:29, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest