-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Can't enter RF learning mode on T1; press+hold button 1 resets unit #2268
Comments
so, I see that there is an unhandled race condition here.
and from this page https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-T1-UK-and-T1-EU
so the tasmota firmware leads to a race condition whereby you can never pair the primary button. I will look for a fix unless anyone has an explanation for this design and a known workaround. thanks |
If I were you I would take a look in the wiki regarding available commands. But then, I'm not.. |
nope. only i’m me.
i did take a look. I’m not talking about the serial or web console. there may be other routes - the issue i reported is the race condition on the button press for learning RF. I believe that the issue has its route around line 1860 of sonoff.ino.
… On 27 Mar 2018, at 22:15, Theo Arends ***@***.***> wrote:
If I were you I would take a look in the wiki regarding available commands.
But then, I'm not..
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgYrPlmRUPhaUMnLRsmT0ljL_VAY5ks5tip32gaJpZM4S9ERu>.
|
Long press button has special meaning in Tasmota. |
that's not a solution; it's an unattractive work-around. the issue should remain open, in my opinion. |
Why is it an "unattractive workaround"? Long press functionality in Tasmota firmware is fundamentally incompatible with the HW-controlled RF learning mode in the Sonoff T1. |
It is unattractive because the concept of ‘hold’ is a good one.
But key here is that either we must acknowledge that there is a bug, or that the wiki is wrong/misleading/incomplete in its statement as to how RF learning mode is entered.
on the device I’m testing the relay board is attached.
the button options are currently as follows:
{"SetOption11":"OFF"}
{"SetOption12":"OFF"}
{"SetOption13":"ON"}
{"SetOption14":"OFF"}
{"SetOption15":"ON"}
{"SetOption32":"100”}
{"SwitchMode1":0}
{"SwitchMode2”:1
a long press (until the double beep) no longer resets the board. So that’s a positive.
During a long (7 second) press until the double beep, the serial console shows that pubs are being sent for the press event. I suppose this is intended behaviour.
However the device does _not_ enter RF learning mode after the double bleep. I am testing with five different remotes all successfully paired to the same device before flashing with Tasmota.
… On 28 Mar 2018, at 19:06, emontnemery ***@***.***> wrote:
Why is it an "unattractive workaround"? Long press functionality in Tasmota firmware is fundamentally incompatible with the HW-controlled RF learning mode in the Sonoff T1.
Are you sure you sent command "setoption13 1" and it was stored?
You are not running the T1 without the relay board connected?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgSEFcjdBDRW7UFZwOjCE2ecmj9ptks5ti8L-gaJpZM4S9ERu>.
|
There is no way for Tasmota firmware to alter the behavior of the RF learning, as that's entirely handled by an external micro controller. Why do you set option15 to 1, that's for using PWM as LED dimmer. Sonoff T1 has no PWM function, only relay. Also, unless you did not set Module type to "Sonoff T1", SwitchMode has no meaning. Also, please read the manual, double beep means "unlearn", not "learn". |
i have not explicitly set option15. that is what came up when querying the interface. It is unexpected.
Please refer to the wiki - it explicitly states that the RF learn mode requires seven seconds and a double beep. If the wiki is wrong, then that further underlines my point.
As for your assertion - I understand what you are saying. I am surprised as well. I have just flashed another firmware (espurna) and that exhibited the same symptoms. Plugged into the mains (and disconnected from serial of course), the learn function appears to work - which suggests that the radio needs more than 3.6v to work.
However it does not toggle the switch or fire off a mqtt_pub. so is useless.
I am re-flashing back to tasmota to see what the behaviour is there.
… On 28 Mar 2018, at 20:31, emontnemery ***@***.***> wrote:
There is no way for Tasmota firmware to alter the behavior of the RF learning, as that's entirely handled by an external micro controller.
Why do you set option15 to 1, that's for using PWM as LED dimmer. Sonoff T1 has no PWM function, only relay.
Also, please read the manual, double beep means "unlearn", not "learn".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgYouWv9cA2TgLy1sQbonaZ7khf5Aks5ti9b_gaJpZM4S9ERu>.
|
Maybe I was unclear earlier: The Sonoff T1 does not work if not connected to mains and without relay board connected. I'll update the wiki to make it more clear, many users are hitting the same issues as you do. I also spent an entire evening trying to debug why my Sonoff T1 was resetting itself.. Edit: I updated the wiki to hopefully make it a bit more clear. |
the relay board was connected. I was powering it with a high-power supply to avoid brown outs.
… On 28 Mar 2018, at 20:47, emontnemery ***@***.***> wrote:
Maybe I was unclear earlier: The Sonoff T1 does not work if not connected to mains and without relay board connected. I'll update the wiki to make it more clear, many users are hitting the same issues as you do.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgUwUZXJ3heudDcYVgXRMFDdcbF40ks5ti9qpgaJpZM4S9ERu>.
|
Yeah, but the relay board supplies higher voltage than 3.3V to the main board, so just supplying power through the debug conenctor won't do it. |
not yet.
Just having supper then will finish flashing tasmota and check that it works.
… On 28 Mar 2018, at 21:07, emontnemery ***@***.***> wrote:
Yeah, but the relay board supplies higher voltage than 3.3V to the main board, so just supplying power through the debug conenctor won't do it.
Anyway, can you confirm your problem is solved when connecting to mains?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgbXUAhjAZSM9yWu3UPlzUMXACf5Jks5ti995gaJpZM4S9ERu>.
|
Am giving up for the day. Just getting garbage out of the device serial console after multiple reflashes trying to fix.
I will clean down the environment again, rebuild and reflash using a different machine. I will post back tomorrow evening when i next have time to work on this. |
that's fixed now. the build is clean and the RF pairing now works. I don't think the ability to reset via a long press of only a few seconds is sensible on a Touch device like this. I'd suggest that the build flags push that out to (say) 45 seconds for this class of device. thanks. |
Consider use of SetOption1 as soon as the device has been configured to your expectations. This options disables the restart on hold and more than 2 multi presses to select initial wifimanager. |
thanks.
i think i will need to set these in the firmware rather than via the interface.
… On 29 Mar 2018, at 14:32, Theo Arends ***@***.***> wrote:
Consider use of SetOption1 as soon as the device has been configured to your expectations. This options disables the restart on hold and more than 2 multi presses to select initial wifimanager.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AX4EgakQi35A573jp0lKSSxaW0-ECs6Tks5tjNRVgaJpZM4S9ERu>.
|
@arendst There have been so many questions/issues about Sonoff T1 resetting due to unintentional long press..
Also, maybe module template should default to Should I submit a PR? |
It can't be set to default 1 as initially users still have to be able to select wifi manager option as long as they do not understand to the use of the serial interface (as most do considering the amount of butten press issues they have). I was considering extending the hold time for the specific reset option but then the Dual R1 will fail as it has a fixed amount of time (4 seconds) before it's code changes from once pressed to hold. Being a one size fits all is just being a bitch to some. EDIT: What the heck! I'll change the reset option from P_HOLD_TIME * 0.1 second to P_HOLD_TIME * 8 * 0.1 second for all but the Sonoff Dual R1 resulting in 32 second default. |
5.12.0i * Change default Reset configuration time from 4 seconds to 40 seconds on Button hold (#2268)
5.12.0i * Change default Reset configuration time from 4 seconds to 40 seconds on Button hold (#2268)
Perhaps automatically defaulting to WiFi manager if no ap is found? On 29 Mar 2018 4:21 p.m., Theo Arends <[email protected]> wrote:It can't be set to default 1 as initially users still have to be able to select wifi manager option as long as they do not understand to the use of the serial interface (as most do considering the amount of butten press issues they have).
I was considering extending the hold time for the specific reset option but then the Dual R1 will fail as it has a fixed amount of time (4 seconds) before it's code changes from once pressed to hold.
Being a one size fits all is just being a bitch to some.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes, I've made bad experience after successfully installed Tasmota "Over The Air" on my Sonoff Pow, linked to my MQTT broker and controlled it via Homebridge. Now after, having hold too much time button, my Sonoff seems to be completely freezed. He doesn't connect to Wifi and doesn't awswer when pressing button (neither short or long press. Any idea to fix this without FTDI? |
Hi @jpadie If your issue is solved, please close it. Thanks! 👍 |
5.12.0i * Change default Reset configuration time from 4 seconds to 40 seconds on Button hold (arendst#2268)
5.12.0i * Change default Reset configuration time from 4 seconds to 40 seconds on Button hold (arendst#2268)
using 2Ch T1 EU (R2) sonoff with tasmota 5.12.0.i
with sonoff firmware the device learns the remote control buttons just fine. Flashed tasmota 5.12.0.i and I'm seeing a number of issues. To start with the configuration via the web page was not being properly saved or was being ignored on startup. hardcoding into settings.ino resolves this.
the rf learnings have been lost though. and press and hold of button 1 to enter learning mode results in a beep then a reset. here's the serial dump (some information redacted). the longpress occurs at 15:16:36:
is it intended behaviour that tasmota resets and restarts on a long press of button 1? If so how can RF learn mode be entered? If not, any tips on where to look in the source code for a bug?
The text was updated successfully, but these errors were encountered: