Page 6 of 6

Re: SONOFF

Posted: Thu Jul 12, 2018 9:09 am
by gaurav
How do I check it if BTN is BISTABLE?

Re: SONOFF

Posted: Thu Jul 12, 2018 9:13 am
by pzygmunt
Check your config

Re: SONOFF

Posted: Thu Jul 12, 2018 10:45 am
by gaurav
I am sorry but I am unable to understand which config?
BTW I was trying to achieve the Switch input on Sonoff basic. So I changed "supla_input_cfg[0].type = INPUT_TYPE_BUTTON;" to "supla_input_cfg[0].type = INPUT_TYPE_SWITCH;" and Switch input was achieved but now I am stucked at enabling the config mode in 5 presses.

Let me know if it is done right or is there anything that I need to change in order to achieve Switch input and config mode(5 press).

Thank you.

Re: SONOFF

Posted: Thu Jul 12, 2018 10:47 am
by pzygmunt
supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;

Re: SONOFF

Posted: Thu Jul 12, 2018 11:15 am
by gaurav
It is showing error

error: 'INPUT_TYPE_BTN_BISTABLE' undeclared(first use in this function)
supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;

Re: SONOFF

Posted: Thu Jul 12, 2018 11:17 am
by pzygmunt

Re: SONOFF

Posted: Fri Jul 13, 2018 7:07 am
by gaurav
I updated to "supla_input_cfg[0].type = INPUT_TYPE_BTN_BISTABLE;" and "#define CFG_BTN_PRESS_COUNT 5".Still it takes 10 presses to enter config mode.
On fifth press the indication led blink slowly for two to three time if I press continuously then on tenth press it enters enter the config mode