Hi,
can I setup a rule with a paramater that check the wifi connection?
So, that I can light up a LED if the connection to the network is fine and set the GPIO to low if the connection is to the WLAN is lost and the ESP entering the AP mode.
Regards Martin
Check Wifi Connection and set GPIO
Moderators: grovkillen, Stuntteam, TD-er
Re: Check Wifi Connection and set GPIO
Why dont you use The wifi gpio feature in Hardware tab?
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Check Wifi Connection and set GPIO
Because I'd like to give more than 1 status with only 1 LED:
wifi status and functional status (for instance: if wifi KO blink fast elseif functional status KO blink slow else ON)
Could it be possible with the feature in Hardware? If not, how to do it?
Re: Check Wifi Connection and set GPIO
1) This is a very old post you are reacting to
2) Don't think a hardware solution could help you, other than using a multi-colored LED or NeoPixel.
Blinking fast/slow/steady can be controlled from rules, just making choices based on the status of multiple inputs and setting it up using f.e. a loopTimerSet.
/Ton (PayPal.me)
Re: Check Wifi Connection and set GPIO
it was the only post near to what I was looking for...
ok for the rules, but I'm stuck with the variable to use...
I thought I could use
but it is empty
ok for the rules, but I'm stuck with the variable to use...
I thought I could use
Code: Select all
LogEntry, %WiFi#Connected%
Re: Check Wifi Connection and set GPIO
You can try %iswifi%
If it is < 7, you don't have a fully initialized WiFi.
See the system variables page (button on the Tools tab)
If it is < 7, you don't have a fully initialized WiFi.
See the system variables page (button on the Tools tab)
Re: Check Wifi Connection and set GPIO
Thanks for the info
I did it like this
(code updated on 01-July)
I did it like this
Code: Select all
on Rules#Timer=4 do // status LED
timerSet,4,2
if %iswifi% < 7 do // wifi KO
LongPulse_ms,13,0,300
elseif [TankLevel#Level_OK0_KO1]=1 do // level KO
LongPulse_ms,13,0,1300
else
gpio,13,0
endif
endon
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 131 guests