-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RF Bridge sends multiple RfKey clicks #851
Comments
You might want to check out You can change the option in |
Thank you! The control of the blinds was perfect after I changed the RF_SEND_TIMES to 1. With RF_SEND_TIMES option set to an even number (4), a problem was caused for controlling my blinds which only uses one RF code to start, to stop, and to reverse direction. The RF receiver captured all 4 RF sends and caused the blinds to start, stop, reverse direction, and stop, all within a second...essentially a counter productive activity. One thing to note, though. I had a difficult time finding the boards.txt file where the -DUSE_CUSTOM_H needs to be placed for custom build settings in ArduinoIDE. Apparently, there are multiple boards.txt files, one for each board family. And although the boards.txt file for the AVR board family resides in the Arduino install folder (I believe this is because the AVR boards are native to Arduino), the ESP8266 boards.txt file is in a sub-folder in the user's AppData directory. For the problem at hand, I think this is an okay, educational, but time-consuming workaround, I'm wondering if RF_SEND_TIMES can be exposed in the Espurna webgui. Ideally it would be a separate value defaulted to an arbitrary odd number for each switch. However, if this is too difficult to implement, then it can be a single option for all the switches, defaulted to an odd number and user select-able in the RF tab. |
@law1964 It should not be necessary to change the RF_SEND_TIMES if the codes for both up & down, it should detect that the code is the same and only send the message once. Just make sure the input boxes for both ON and OFF codes contain the same code in the RFBRIDGE tab. |
BTW, I strongly recommend you (and anyone) to use PlatformIO instead of Arduino IDE. It might look a bit more complex but it gives you much more control over the build options. |
@xoseperez Thank you for the response. I will try platformio when I get the chance to install it and learn how to use it. I removed the -DUSE_CUSTOM_H build flag to change the RF_SEND_TIMES back to 4. and re-flashed the RF Bridge. I set Switch ON and Switch OFF both to 292C015404062DE832 and tested. No luck. I hear fewer clicks from the receiver for the blinds, but it still starts and stops when I activate the switch. Just for testing purposes, I set the RF_SEND_TIMES to 2, added the -DUSE_CUSTOM_H build flag, and recompiled. Still no luck. The blinds relay still clicks multiple times with 1) Switch ON filled in alone and 2) Switch ON and OFF both filled in with the code. I reverted back to RF_SEND_TIMES = 1 and it works! Something strange to note: each time I was uploading the firmware back to the RF Bridge, it re-sent the RF code to the blind automatically (ie. the RF receiver for the blinds clicked without user initiation). I'm back to RF_SEND_TIMES=1, Switch ON = code, Switch OFF = no code. This is the only configuration that works every single time. |
Apologies. I didn't mean to close this issue. From my viewpoint, this issue is fixed by modifying the RF_SEND_TIMES, but wasn't sure if anything else needed to be followed up on. I'll keep it open for a few more days and then close it. |
unfortunately the RF_SEND_TIMES has value greater than one because other devices don't pick reliably a single burst of pulses ... when ON and OFF code are distinct that is not a problem and in fact multiple sends increase the reliability (on RX side, the rc-switch library used in RFB_DIRECT always ignores the first burst of pulses ... go figure) |
If the codes for ON and OFF are the same it should only send it once to avoid this problem. If it's still sending it several times then there is a bug. |
Tested on two different versions of the RFBridge and it works OK. If the code for ON and OFF is the same the message is sent only once. Mind it has to be exactly the same. Do not learn both ON and OFF codes since each learn process might produce a slightly different code, that's normal. Instead just learn the ON and copy paste the ON value to the OFF text box and click save to store it. |
Thank you for testing this. I downloaded and installed the espurna-1.12.6-itead-sonoff-rfbridge.bin (I had deleted the non-working builds from arduinoIDE) from github and tested again, making certain that the both the ON and OFF codes were exactly the same. This still does not work for me. I am still getting multiple RF sends. I re-installed my build from Espurna with the RF_SEND_TIMES=1 and it works properly every time. You can't fix something that you can't reproduce. Therefore, if I am the only one experiencing this issue, please close this bug report. I will continue to use the RF_SEND_TIMES=1 in a custom build. |
@law1964 Can you open a debug window to the device via telnet and copy paste here the log while it sends the messages? |
These are the telnet debug messages for rfbridge firmware downloaded from github with ON and OFF set to 2918015403FC2DE832: [155245] [TELNET] Client #0 connected The first time, I was able to activate the switch, but I needed to reboot the device from the main menu to be able to activate the switch another time. I repeated this test several times. The debug messages are all the same. Each time I activated the switch, it sent the RF signal two times. For ON = 2918015403FC2DE832 and OFF = NULL, the signal was send 4 times, as expected because RF_SEND_TIMES defaults to 4 (see below): [565331] [TELNET] Client #0 connected For my customized build with RF_SEND_TIMES=1 and ON=2918015403FC2DE832 and OFF=NULL, the signal was sent only one time (see below): [115287] [TELNET] Client #0 connected |
Ah. You have pulse mode enabled, right? The first log is compatible with this. You manually turn it on, it enqueues the message once and then the pulse module turns it off again and enqueues the message a second time... just disable pulse ("Don't pulse") and you will have a normal behaviour. |
It works! I am glad you were able to figure it out. Unfortunately, now the switch representation is latched which is meaningless for an application that uses a momentary switch. |
I meant "toggled" not "latched". |
Yeah, there was a requests somewhere about having the option to use a simple button image in the web interface instead of switches when codes for ON and OFF are the same |
See #758, point 8. |
I have flashed 1.12.6 to my RF Bridge R2 V1.0. It is able to learn the key for the RF transmitter (raw code is 292C015404062DE832). The bridge is also able to transmit it. Unfortunately, it seems to send it multiple times. I can hear multiple clicks from the relay on the RF receiver.
My Switch settings are:
Boot Mode = Always OFF
Pulse mode = Normally OFF
Pulse time (s) = 0.1 <-- it doesn't matter. I've set this up to 0.5 seconds and it still sends multiple key clicks.
My RF settings are:
Switch ON = 292C015404062DE832
Switch OFF = (no code)
I've tested this with Tasmota too. Tasmota is able to reproduce the RfKey flawlessly. I hear only one click from the receiver relay. The json encapsulation from the Tasmota console is:
MQT:tele/sonoff/RESULT={"RfReceived":{"Sync":10560,"Low":340,"High":1030,"Data":"2DE832",RfKey":1}}
Please have a look and let me know how to fix this.
Jackson
The text was updated successfully, but these errors were encountered: