-
Notifications
You must be signed in to change notification settings - Fork 636
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
Button press doesn't turn on/off #1031
Comments
Hello. Can you share that debug log? |
@mcspr Sure! 1st button press
2nd button press
First time I pressed the button it received it just fine, but didn't turn on the switch. Second time it did, and it sent out the correct MQTT message. |
This time it took 11 button presses to get the switch to turn on, but this time it didn't send out a MQTT message.
|
Check the Just guessing, but I had similar issue with rfbridge when it was placed near wifi router. Codes produced by it were scrambled most of the time and moving it to a different spot helped with that. |
Maybe it's a faulty remote then. I'm testing about 5 meters from my AP, so it should be ok - also considering how far apart those wireless frequencies are. Looking at the received codes, many of them are consistently wrong. Many are "2788014A03CA11555F". Interference wouldn't be consistent like that. But it doesn't explain the issue where it turns on the switch, but doesn't publish MQTT. |
Well, 114551 is the rf code it knows (27C4 012C 03E8 114551). It does not match other ones => does not switch the relay => no mqtt relay/0 status change. It still sends codes to rfin topic judging by the log. |
At the end of debug you can see it setting relay #0 to ON, but it doesn't publish to MQTT (other than the rfin). Testing the remote it seems to often output random codes. New remotes are still in the mail.. |
Several things:
|
@xoseperez Sounds great. |
@SirJMD Can you flash the latest version in |
Sure thing @xoseperez, I'll get right on it. |
1.13.1:
First i manually set relay 0 in off-state via the web GUI. I then press the button on the remote and the RF bridge receives the correct code and turns on relay 0 - but doesn't publish MQTT. |
1.13.1 from releases:
Edit: some dropped logs... Settings of relays <-> rf (via send command)
I am not seeing OFF match in your logs. |
Observing the MQTT telegrams with MQTTlens, I actually do get a "1" for relay 0, even though the debugger doesn't say it published anything. I just tested with a "door open" sensor and it works 100% of the time, out of 20 tries. The debugger shows no MQTT publishes, but I get them anyway. |
The second log (1.13.1 from releases) looks perfectly normal. You are using the same code for ON and OFF , the firmware detects that (it matches both) and toggles the device sending only one RF packet. Both RFIN and relay status MQTT messages are sent. The first one is normal expect for the missing MQTT message. Is it the same device but a different remote? |
@xoseperez Yes, same exact device. I've tried the same remote as well as a door sensor - both work fine, but no MQTT message in the debug log. I do however receive a MQTT message, so it does get published. |
Well, the codes are different so the remote or the button you are pressing is a different one. Still, no reason why it would send the MQTT message but not print it to the debug log... |
Same remote, different button :) Via MQTTlens I can see every single MQTT message, with 100% success rate, so it does indeed publish it as it should. Are you able to replicate the bug? |
No. It works fine for me. The "relay/#" MQTT message is printed in the debug log and sent to the broker if the relays status changes. |
Just got a new remote in the mail today. 100% accuracy on button presses. Same code every time, so it's just my old remote that's nearing its end of life. The only issue new is the web gui being mostly inaccessible from computer (Win7), but always working from my phone (OnePlus 5T). |
Testing a bit more and I've encountered a new weird thing..
The message it received and the message it published to rfin, are different. It also turned on and the right after turned off again. Why does it only try to match a partial of the received message? My RF setting is:
|
The actual code is the 3 last bytes (55550C). The previous bytes are times (sync, high, low), they are required but not critical. ESPurna tries to match the latest 3 bytes to the codes it has stored and uses the stored code instead of the received one (hence the difference between the codes in the "received" and "matched" lines. On the other hand, ESPurna expects the exact same code (9 bytes) for toggle buttons (same button for ON and OFF). Since your codes are not the same ESPurna gets puzzled and triggers both actions. Change either of the two codes to match the other one and your issue will be gone. |
Finally had a few minutes to test a bit more. With only a code in the ON for switch #1, I still get the ON relay #1 and the right after it turns it off again. Now it says (new remote):
Where did that Scheduling relay #0 back in 1000ms (pulse) suddenly come from? Is that due to not having an off code set? (feel free to tell me to read the documentation if it's that obvious :D ) |
@SirJMD Rogue switch pulse settings? Check the Switches or these settings:
|
So somehow it has set relayPulse0 to 1? I used set relayPulse0 0 and tested the remote again:
I guess that wasn't the way to combat the issue? EDIT: In the switch settings I found that "Pulse mode" was set to "Normally OFF", somehow. After changing that back to "Don't pulse", it's back to working as before. Would be nice with a toggle option actually.. |
Sorry, I cannot reproduce the problem. Just don't see why it turns off immediately... |
It's back to behaving normally again.. Nothing has been touched in between it not working and now. Nothing. I'll continue to do some testing. |
I've paired my remote with my Sonoff RF bridge (R2 v1.0). From the debug log I can see every single button press is being received - not a single one is lost. However, only very few of the button presses changes the state of the switch #0 (I've assigned both on and off to this switch).
Am I missing something or is there a bug?
The text was updated successfully, but these errors were encountered: