Repeat button push multiple times preventing loops
Moderator: leecollings
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Repeat button push multiple times preventing loops
I've a garage door opener, remote control, which sends a signal to the main system to open the door.
Many times one push is not enough, I believe the RF signal is not strong enough and therefore I need to push the button multiple times.
Because of this I want to repeat the button push multiple times within the script, but how can I prevent that Domoticz is getting into an end-less loop?
Would something like:
Garagedeur.switchOn().checkFirst().repeatAfterSec(4, 3).silent()
be the solution?
Many times one push is not enough, I believe the RF signal is not strong enough and therefore I need to push the button multiple times.
Because of this I want to repeat the button push multiple times within the script, but how can I prevent that Domoticz is getting into an end-less loop?
Would something like:
Garagedeur.switchOn().checkFirst().repeatAfterSec(4, 3).silent()
be the solution?
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Repeat button push multiple times preventing loops
Any suggestions on how to fix this? Even with the silent() option I end up in an end less loop.
-
rrozema
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Repeat button push multiple times preventing loops
Would choosing a more reliable technology for your switches be an option? Because repeating the button push is only a workaround and your results may vary: for example, how many pushes is enough: if the 1st push doesn't arrive is there any guarantee the 2nd or even a 3rd will? May be you can replace the RF switch by an inplant module with a relay or something similar?
-
rrozema
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Repeat button push multiple times preventing loops
Code: Select all
Garagedeur.switchOn().checkFirst().repeatAfterSec(4, 3).silent()-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Repeat button push multiple times preventing loops
Thanks for the good suggestion, I wish this was possible. The garagedoor/system is not owned by me, it is a centralised controlled system, I only have the remote controls. And I cannot place the remote control at a location closer by unfortunately. No the family are pushing the open button many times and after 4 to 5 times the door opens, don't understand why it doesn't work in one go. But I want to see if I can repeat it automatically 4 or 5 times, hence the question.rrozema wrote: Sunday 09 January 2022 23:58 Would choosing a more reliable technology for your switches be an option? Because repeating the button push is only a workaround and your results may vary: for example, how many pushes is enough: if the 1st push doesn't arrive is there any guarantee the 2nd or even a 3rd will? May be you can replace the RF switch by an inplant module with a relay or something similar?
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Repeat button push multiple times preventing loops
Should I remove the checkFirst?rrozema wrote: Monday 10 January 2022 0:10You've probably already tried it and found that checkFirst() is only executed once before the repeatAfterSec is executed. I.e. checkFirst is only used once and not for every repeat as you seem to think. As I wrote above, better fix the cause instead of trying to find a work around.Code: Select all
Garagedeur.switchOn().checkFirst().repeatAfterSec(4, 3).silent()
My experience at the moment is that the silent() option is not working as expected. It is still triggering the DZvent script to be executed. I expect that with the silent option the script is not triggered anymore. Of course this could be due to the fact I'm also using the checkFirst option. I can remove that of course. Any suggestions?
-
rrozema
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Repeat button push multiple times preventing loops
Maybe you can improve your remote control's antenna? You could try holding/taping a piece of wire to it while you operate it, as an experimentrgroothuis wrote: Tuesday 11 January 2022 10:18Thanks for the good suggestion, I wish this was possible. The garagedoor/system is not owned by me, it is a centralised controlled system, I only have the remote controls. And I cannot place the remote control at a location closer by unfortunately. No the family are pushing the open button many times and after 4 to 5 times the door opens, don't understand why it doesn't work in one go. But I want to see if I can repeat it automatically 4 or 5 times, hence the question.rrozema wrote: Sunday 09 January 2022 23:58 Would choosing a more reliable technology for your switches be an option? Because repeating the button push is only a workaround and your results may vary: for example, how many pushes is enough: if the 1st push doesn't arrive is there any guarantee the 2nd or even a 3rd will? May be you can replace the RF switch by an inplant module with a relay or something similar?
-
rrozema
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: Repeat button push multiple times preventing loops
Removing the .checkFirst() is worth a try: it doesn't do you any good anyway. I am not sure if the combination repeatAfterSec(...).silent() can be expected to work though. I wouldn't know where to look this up even, other than in the code, which I gave a short try, but gave up quickly...rgroothuis wrote: Tuesday 11 January 2022 10:20Should I remove the checkFirst?rrozema wrote: Monday 10 January 2022 0:10You've probably already tried it and found that checkFirst() is only executed once before the repeatAfterSec is executed. I.e. checkFirst is only used once and not for every repeat as you seem to think. As I wrote above, better fix the cause instead of trying to find a work around.Code: Select all
Garagedeur.switchOn().checkFirst().repeatAfterSec(4, 3).silent()
My experience at the moment is that the silent() option is not working as expected. It is still triggering the DZvent script to be executed. I expect that with the silent option the script is not triggered anymore. Of course this could be due to the fact I'm also using the checkFirst option. I can remove that of course. Any suggestions?
-
rgroothuis
- Posts: 347
- Joined: Friday 03 April 2015 17:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Repeat button push multiple times preventing loops
Thanks rrozema for your response, indeed creating an better antenna is a good suggestion, will check this and give it a try. Need to understand the frequency first to be able to determine the size/format of the antenna, next challenge 
Yes, I will give it a try by removing the .checkFirst(). I will share the outcome when the test is done. Thanks.
Yes, I will give it a try by removing the .checkFirst(). I will share the outcome when the test is done. Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest