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

Difficulties getting a virgin board up and working #212

Closed
smadds opened this issue Mar 16, 2017 · 21 comments
Closed

Difficulties getting a virgin board up and working #212

smadds opened this issue Mar 16, 2017 · 21 comments
Labels
help needed Action - Asking for help from the community

Comments

@smadds
Copy link

smadds commented Mar 16, 2017

Is anyone else finding it tricky to get a brand new board up and running? I've got a batch of Wemos D1 minis and the sequence goes as this:-

  1. Pull the latest code
  2. Use Arduino IDE to compile & upload code
  3. System reboot, serial monitor showing the board is trying to connect to the 2 unknown wifi networks
  4. 1min in WiFi AP mode - quick grab phone and try to switch wifi network to connect in time
  5. AP not showing in phone - out of time, WDT reset
  6. Loop back to 3 ad nausium....

Is there a better way of getting connected? I have tried sending commands over the serial link, but get no response.

Could the default code be SSID-less and put boards in AP mode until set (without a timeout)?

@davidelang
Copy link
Collaborator

davidelang commented Mar 16, 2017 via email

@smadds
Copy link
Author

smadds commented Mar 17, 2017

Yes, I understand I can do that, David, but it's about having standard code and operational modes that are useful. I wonder if it would be better to start with no wifi, logging or mqtt servers in the code by default and for the devices to go to AP mode & accept serial interface commands when first started - not just for a minute.

@khcnz
Copy link

khcnz commented Mar 17, 2017

Surely for most people the easiest way would be to go into local AP mode when the button is held down? that's the way most similar commerical devices ship out of the box (and in fact the way the sonoff does with stock firmware). I think this mode would make the most sense if you were to for example want to resell pre-flashed devices (i.e. to people who don't know how to solder and flash)

Having said that the "default" AP and mqtt/syslog domains could be removed I think from user-config (and default to off) as they will never be right for anyone else (other than @arendst :)).

MQTT is actually quite annoying when not configured correctly but on as it tries to connect every 10 seconds and the portal device lags/hangs significantly while it trys to look up mDNS and then also when trying to connect.

@davidelang
Copy link
Collaborator

davidelang commented Mar 17, 2017 via email

@davidelang
Copy link
Collaborator

davidelang commented Mar 17, 2017 via email

@khcnz
Copy link

khcnz commented Mar 17, 2017

you are ignoring the instructions that tell people to edit that file and set
them to what's appropriate for their network.

It's a small side note at the bottom of one page, and one of the other pages implies the wifi mode from the button multi-press is the right way. Easy to miss if you are a first timer. My point was more so that those defaults could never be right - so IMO they just add a bit of confusion when first starting out (whats MQTT? whats this wifi network? whats domus? why does the UI keep hanging?) :)

Sonoff-Tasmota is not designed for a vendor mass-producing modules and
installing this on all of them. If it were to be used for that, the defaults
would need to be changed.

Agreed, bad choice of words, and anyone distributing them in such a manner would be able to cope with updating the config as such

It's designed for people setting up their own devices, in which case setting the
defaults in a file (either user_default.h or user_default_override.h) is very
reasonable.

I think this is where we differ (and remember I am new to the project :)) with members providing statically hosted compiled versions and most options being in the webui all someone now would need is a soldering iron and run a command line - no coding ability needed.

What if itead even let you enter a URL in their app to configure a custom flash path for example - then even a soldering iron wouldn't be needed

@arendst
Copy link
Owner

arendst commented Mar 17, 2017

@Smads (Simon) you were starting off on the right track only your step 4 won't work for the default compile as it won't provide Wifi AP mode as you expected but it will start in WPS mode as defined on line 29 in the user_config.h file (WIFI_CONFIG_TOOL).

This value is the result of earlier requests where people thought that WPS would be a more logical approach to initial installation... It's just a matter of deciding which of three ways to choose from. For one WPS is the holy grail, for others Wifi AP and for me initially it was Wifi Smartconfig (using an app on your phone).

All three options can be selected by button presses on the sonoff as I hoped to explain in the wiki - button section but I agree it tend to be trial and error.

As David suggested you should be able to enter your Wifi parameters via serial too as SSID1 and PASSWORD1 commands during the 10 seconds or so before sonoff will retry the other AP....

I honesty thought I had provided more than enough possibilities to get the thing going but as there are so many unique people I can't satisfy them all.

@arendst
Copy link
Owner

arendst commented Mar 17, 2017

@khcnz Ah two souls one mind

@arendst arendst added the help needed Action - Asking for help from the community label Mar 17, 2017
@davidelang
Copy link
Collaborator

davidelang commented Mar 17, 2017 via email

@smadds
Copy link
Author

smadds commented Mar 17, 2017

Maybe just extend the default time in AP mode after failing the 2 stored SSIDs from 1 to 3 minutes to give phones a chance to catch the AP?

Theo - I agree you have done a huge amount, and I'm very grateful. I felt guilty suggesting removing your own profile details from the defaults. But then again, I would not expect to see Microsoft's in-house wifi credentials when I first start Windows ;)

@arendst
Copy link
Owner

arendst commented Mar 17, 2017

Just checked but it seems the timeout for SmartConfig (using the phone App) is 60 seconds. Wifi Config (using the AccessPoint) timeout is 120 seconds.

Perhaps I have to add some kind of age multiplier to it ;;;---))).

@davidelang
Copy link
Collaborator

@arendst what is the status of this? is it a wontfix or are you going to increase the timeouts?

@davidelang
Copy link
Collaborator

@arendst ping about the timeouts question.

@arendst
Copy link
Owner

arendst commented May 4, 2017

Change WifiConfig timeout from 60 seconds to 180 seconds in next release

@smadds
Copy link
Author

smadds commented May 4, 2017

That's great - thanks Theo

arendst added a commit that referenced this issue May 4, 2017
5.0.3 20170504
* Add command SensorRetain on|off to enable retaining of mqtt message
tele/sonoff/SENSOR (#74)
* Change WifiConfig timeout from 60 seconds to 180 seconds (#212)
* Change Sonoff Touch command Ledstate functionality by turning led on
if power is off (#214)
* Add 4 seconds delay after power on before enabling button to
workaround Wemos D1 mini RTS circuit (#380)
@arendst arendst closed this as completed Aug 9, 2017
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
5.0.3 20170504
* Add command SensorRetain on|off to enable retaining of mqtt message
tele/sonoff/SENSOR (arendst#74)
* Change WifiConfig timeout from 60 seconds to 180 seconds (arendst#212)
* Change Sonoff Touch command Ledstate functionality by turning led on
if power is off (arendst#214)
* Add 4 seconds delay after power on before enabling button to
workaround Wemos D1 mini RTS circuit (arendst#380)
@billyrudi
Copy link

Hi,
i have need to use my devices in WIFI_AP_STA always. how i can do it?
Regads

@ascillato
Copy link
Contributor

Sorry, Tasmota is not meant for what you want. Tasmota is meant for home automation to be used with mqtt broker. Please, see readme

@billyrudi
Copy link

It is not correct , you can send also http command to tasmota without an mqtt broker!!
https://github.com/arendst/Sonoff-Tasmota/wiki/Commands
Web
Commands can be executed via HTTP requests, for example:

http://sonoff/cm?cmnd=Power%20TOGGLE
http://sonoff/cm?cmnd=Power%20On
http://sonoff/cm?cmnd=Power%20off
http://sonoff/cm?user=admin&password=joker&cmnd=Power%20Toggle
If you have set a password for web user interface access, this must be included (in plaintext) in the URL of the HTTP request, like so:

http://sonoff/cm?&user=put_username_here&password=put_password_here&cmnd=Power%20On

@ascillato
Copy link
Contributor

Hi, sorry. Tasmota is not a Stand Alone device. Sorry.

Please see readme for actual scope of Tasmota: Home Automation

@AndreKR
Copy link

AndreKR commented Nov 25, 2021

The rules system and sensor integrations make Tasmota ideal for standalone operation. I have a dozen devices out there that only connect to my phone's hotspot for configuration and otherwise do their job autonomously using rules. Device groups would even allow them to communicate with each other if they just had an access point.

I understand that this is not the main use case for Tasmota, but would the core team be willing to review a pull request for a WifiConfig mode that keeps the access point open?

@barbudor
Copy link
Contributor

@AndreKR Don't hijack an old Issue with an off-topic message
Issues should remains for qualified bug. Any other discussions goes to ... Discusssions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed Action - Asking for help from the community
Projects
None yet
Development

No branches or pull requests

8 participants