Rules command/loop/any to switch off wifi

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mgear
New user
Posts: 2
Joined: 03 Dec 2019, 19:20
Location: Russia

Rules command/loop/any to switch off wifi

#1 Post by mgear » 03 Dec 2019, 20:18

Hi!

Unfortunatelly, could not google the exact recipe and registered specially to ask the question: is there any way to completely off the radio by the rules command or, maybe, timer loop?

I use the Sonoff Basic as the simple cyclic timer. Yes, it works, but I need no runtime control nor reports, all I need is as dumb as possible "old-fashioned" self-sufficient timer relay, not the additional security hole in my home net nor the addidional air pollution station.

The worse, the signal is poor at the device's place so it falls back to AP mode. As the dirty (temporary?) solution, I changed the default password. But I need no wifi at all, no station nor client, so, how could it be switched down? I know that it's possible AT ALL. say, by this way, but it is pure C and I don't want to study the ESP programming at such a low level.

The snippet below doesn't solve my task

Code: Select all

on System#Boot do
  TimerSet,4,600 // sufficient radio on timeout to adjust the settings, if needed
endon

on Rules#Timer=4 do
  wifimode,off
endon
Now the firmware is 20181110 normal. I don't know why, but I couldn't connect to one of the latest 201911xx, maybe I was doing something wrong, maybe SW/HW issue. It was my first experience with the platform, so after the number of failures I took the same firmware that found in the random internet topic and it finally worked.

I hope now I have the skills to reflash the more late firmware and tune it, if it's needed. But of course I'd prefer to stay with 20181110 if it's not TOO bad and the wifi can be off within it :)

P.S. There's the WiFiMan plugin being discussed here. Is it still actual or not? What about the FW/SDK version compatibility? Could the task be done without it, with the "pure" ESP Easy?
-- Mike

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Rules command/loop/any to switch off wifi

#2 Post by ThomasB » 03 Dec 2019, 21:39

I use the Sonoff Basic as the simple cyclic timer. Yes, it works, but I need no runtime control nor reports, all I need is as dumb as possible "old-fashioned" self-sufficient timer relay, not the additional security hole in my home net nor the addidional air pollution station.
Currently this is not supported in the official releases. Keep in mind that ESPEasy is targeted to WiFi IoT applications. So it's the wrong solution for your basic timer application.

I recommend using a low cost programmable timer delay relay instead. They will avoid your WiFi security concerns. Cost is under $4 USD from China suppliers.

- Thomas

mgear
New user
Posts: 2
Joined: 03 Dec 2019, 19:20
Location: Russia

Re: Rules command/loop/any to switch off wifi

#3 Post by mgear » 03 Dec 2019, 23:24

Agree, not the best solution, but it is and it works already. Could not find the specialized alike device in the local stores in reasonable terms (am not joking!!! the simpliest cyclic timer!!!) and bought the Sonoff, thought it could work as-is but it wasn't (server's inaccessibility), so should reflash. Then the battle with the rules. And, finally, non-off wifi. Not a big deal about security, more the annoyance. Waaaaaaay toooooooooo complex. Though, now i familiar with IoT at last :)

Maybe anyone has the ready to use 1Mb FW with the modem off feature?
-- Mike

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests