I thought it would be rather easy, but it does not seem to work for me.
My rule:
Code: Select all
On startup_NAS do
logentry,"The power button is now virtually hit. Pin is powered "
Publish %sysname%/startup_NAS=1
GPIO,D1,1
timerSet,1,10 //timer 1 set for 1 sec
endon
On hardreset_NAS do
logentry,"The power button is now virtually hit for longer time. Pin is powered"
Publish %sysname%/hardreset_NAS=1
GPIO,D1,1
timerSet,1,10 //timer 1 set for 1 sec
endon
on Rules#Timer=1 do
GPIO,D1,0
logentry,"The power button is now released"
endon
This is the log:
Code: Select all
299739: HTTP: event,startup_NAS
299837: EVENT: startup_NAS
299841: ACT : logentry,'The power button is now virtually hit. Pin is powered '
299843: The power button is now virtually hit. Pin is powered
299849: ACT : Publish ESP8266_NAS/startup_NAS=1
299872: ACT : GPIO,1,1
299874: GPIO : port#1: set to 1
299876: ACT : timerSet,1,10
303228: ADC : Analog value: 0 = 0.00
303241: EVENT: send2#Analog=2.00
304597: WD : Uptime 5 ConnectFailures 0 FreeMem 20128 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
309878: EVENT: Rules#Timer=1,1
309884: ACT : GPIO,1,0
309886: GPIO : port#1: set to 0
309888: ACT : logentry,'The power button is now released'
309890: The power button is now released
D4 had a voltage of 3,35V to ground.
What does the line GPIO : port#1: set to 1 mean? Which one is port#1 ?