I work with a Sonoff device, channel 1.
Faced misunderstanding of logic of work of ESPEasy c GPIO.
There is a firmware in the "Hardware" section of the WUI settings to set the GPIO type and its level when the device is loaded (Input, Output High, Output Low).
When the setting is "zero", when the devices are not yet defined in the" Devices " section, this setting works as it should.
For example, I install on GPIO 12 "Output High", i.e. when the device is rebooted, the relay always turns on. But when I create in the "Devices" section the description of this "device" as "Switch" (normal switch), then when I reboot the device, Reza turns on and immediately turns off, as if this setting overlaps the GPIO 12 output settings and sets it to the default value in LOW.
There is certainly a crutch in the form of rules under the "Rules" of the form
Code: Select all
on system#Wake do --Responding to device power-on event
timerSet, 1 ,1 -- Start the timer with 1C delay
endon
On Rules#Timer=1 do --we React to the timer event when it is triggered
gpio, 12 ,1 -- Set the output level to HIGH
endon
Please help me understand, maybe I do not understand something and do not, or to make where in the source code edit in the code level changes when setting up the device.
Thank you in advance.