Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified Initial WiFi Configuration #11693

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

ascillato
Copy link
Contributor

@ascillato ascillato commented Apr 12, 2021

Description:

In this PR, it is proposed a New Initial WiFi Configuration Menu and procedure.

In order to simplify the on-boarding to Tasmota, the first configuration step has been modified.

When powered up a blank device ( without any WiFi SSID stored in the firmware ), you will see in your Phone or PC a new WiFi Network named like tasmota_XXXXXX.

If you connect to it, you will see:

1

Clicking on any WiFi Network's name, that will be copied to the field called WiFi Network. And then, after you have completed the password, you will see:

2

Clicking on save, you will see the Testing Screen:

image

If the WiFi Credentials are wrong, few seconds later you will see:

6

If trying again but with correct password:

image

And if all WiFi Credentials are Ok, few seconds later you will see:

image

At this stage, Tasmota will turn off its own AP mode (its own WiFi Network will disappear) and your PC or Phone will automatically reconnect to its previous WiFi Network. If you wait few more seconds, the webpage will be redirected to the new IP of Tasmota in the Network it just connected and you will see the main page of Tasmota. So, you can continue using Tasmota in the same window, without the need of searching for your device in the Network:

5


OPTIONALS


If you do not want this redirecting feature, just define the following in your user_config_override.h:

#define AFTER_INITIAL_WIFI_CONFIG_GO_TO_NEW_IP    false

And After the successful connection, you will see:

image


On the first page, if clicking on SCAN FOR ALL WiFi NETWORKS, you will see the complete list of Networks Tasmota is reaching.

image


On the first page, if clicking on MORE OPTIONS, you will see the extra options:

7


The old WiFi Configuration Page that has the Alternative SSId, CORS and Hostname, is available AFTER the initial configuration has finished and from the main menu of Tasmota.

image


The RESTART_AFTER_INITIAL_WIFI_CONFIG option is enabled by Default. If you define it as false in user_config_override.h file, Tasmota won´t restart and will remain in both modes AP and STA, so it will stay connected to the WiFi Network and also it will be providing the AP until next restart. You can reach Tasmota from both Networks.

#define RESTART_AFTER_INITIAL_WIFI_CONFIG         false

This allows the user to continue the configuration.

In this mode, Tasmota shows the IP in both Networks the same as SO53 1

image


If after a successful WiFi configuration, the user wants to enter again in the AP mode by pressing button1 6 times or by wificonfig 2 command, the user will see the normal version of the wifimanager:

image


List of modifications

On Initial AP Mode (Blank Device):

  • Module Name is not Shown so as to simplify the page.
  • A new button called More Options is added, and the other config options are hidden.
  • The restart counter is not active in this mode, as there is no WiFi Configuration.

On AP Mode (Not a Blank Device):

  • The IP is shown in screen ( SO53 1 )

On all WiFi Configuration menus:

  • The strongest 3 WiFi Networks are shown.
  • If clicking on Show All Networks, all networks are shown with their BSSId and Channel. Also Networks with the same SSId are shown.

Tested on ESP8266 and ESP32. In both chips, it works as expected.
Tested on FIRMWARE-MINIMAL. The behaviour of that version is not modified and working as expected.
Tested on manual WIFIMANAGER mode after SSId Configured.
This PR adds 3KB of flash usage.

Related issue (if applicable): NA

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works on Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with core ESP32 V.1.0.6
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@Jason2866
Copy link
Collaborator

Jason2866 commented Apr 13, 2021

Nice!. The uncomfortabel searching for the associated IP address of the new Tasmota device in the user network is solved. This was imho the last hurdle for Tasmota beginners.
It is every 3 kbyte worth. Self compilers can disable so no code size increase here.

@arendst arendst merged commit 919437c into arendst:development Apr 13, 2021
@arendst
Copy link
Owner

arendst commented Apr 13, 2021

Thx! You did a great job!!

We both know where this came from.....

@blakadder
Copy link
Collaborator

i love the new feature, i hate the fact i need to rewrite the getting started docs

@ascillato ascillato deleted the New_WiFi_Config branch April 13, 2021 12:38
@discip
Copy link

discip commented Apr 21, 2021

Very nice!
Thank you!

@MacSass
Copy link

MacSass commented Apr 22, 2021

Great Update!
From my point of view that was one of the most challeging roadblocks for new Tasmota users, that this dialogue was too "nerdy" for a non technical user. This will make it way easier for them now and should help to increase Tasmota usage in general ...

Thanks for this nice commit!

Repository owner deleted a comment from frogale Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants