Hi, I need to use RX, TX pins as GPIO on TYWE2S (ESP-02S), but even though I turn off logging over UART something writes to those pins. Any idea? This is my configuration:
Thanks for reply mulcmu, I have already tryed GPIO1, GPIO3 instead of TX, RX, but the result is still the same, the relays are turning on and off because state of GPIO1 (TX) and GPIO3 (RX) changes. Something has to be writing there but I can not find what. I have to use these pins because I have retrofitted esp-02s to Aubess 2 gang switch which is using these pins as inputs for switch buttons.
I have also saw on YT that the function of the pin should be changed, to FUNCTION3, this was done in arduino code, not sure if this is possible in esphome.
pinMode(1, FUNCTION_3);
pinMode(3, FUNCTION_3);
Logs:
[08:37:35][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:35][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:36][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state ON
[08:37:37][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:37][D][light:046]: State: ON
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state OFF
[08:37:37][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:37][D][light:046]: State: OFF
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state ON
[08:37:37][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:37][D][light:046]: State: ON
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state OFF
[08:37:37][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:37][D][light:046]: State: OFF
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:37][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state ON
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 1': Sending state OFF
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state ON
[08:37:38][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:38][D][light:046]: State: ON
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state OFF
[08:37:38][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:38][D][light:046]: State: OFF
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state ON
[08:37:38][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:38][D][light:046]: State: ON
[08:37:38][D][binary_sensor:036]: 'esp-switch-2g-1 vypínač 2': Sending state OFF
[08:37:38][D][light:035]: 'esp-switch-2g-1 světlo 2' Setting:
[08:37:38][D][light:046]: State: OFF
Ok, it seems to be some HW problem, when I deployed the code on another Aubess 2 gang switch it works. Just to note, there was originally different board which I switched for esp-02s. The FL_MM99_V3 is the problematic one. Everything seams to be working there, it even registers the switch inputs on the RX and TX pins, but there is just noise on them as well causing lights flickering.
BTW it is strange that the FL_MM99_V3 has different pin out printed on it, but it corresponds to the another board when I measured it.
Just for completeness, the FL_MM99_V3 board seams to be in the wifi + bluetooth variant of this switch.