Having difficulties with Default State
Posted: 20 Jan 2018, 20:12
So, I have ESP-EASY mega running on a sonoff like clone.
GPIO4 is connected to the relay.
I would like it to always turn on when the board is powered on.
Openhab is controlling this switch via MQTT too.
I tried setting the GPIO 4 default state to Output High but it does not seem to do anything.
I also tried using rules and system#boot, but it also did not work.
If the last message I sent over MQTT was to turn it on, then it will turn on after a power cycle (and around 6 seconds).
If the last message I sent over MQTT was to turn it off, then it will turn off after a power cycle.
It is confusing me since Openhab is not really continuously sending MQTT messages.
Any ideas what am I doing wrong?
Additionally, it is a bit surprising for me, but inside Pin buffer state I find:
Plugin Index/Pin Mode Value/State
1 4 output 0
1 15 output 0
I do not actually use Pin 15....
GPIO4 is connected to the relay.
I would like it to always turn on when the board is powered on.
Openhab is controlling this switch via MQTT too.
I tried setting the GPIO 4 default state to Output High but it does not seem to do anything.
I also tried using rules and system#boot, but it also did not work.
If the last message I sent over MQTT was to turn it on, then it will turn on after a power cycle (and around 6 seconds).
If the last message I sent over MQTT was to turn it off, then it will turn off after a power cycle.
It is confusing me since Openhab is not really continuously sending MQTT messages.
Any ideas what am I doing wrong?
Additionally, it is a bit surprising for me, but inside Pin buffer state I find:
Plugin Index/Pin Mode Value/State
1 4 output 0
1 15 output 0
I do not actually use Pin 15....