Page 1 of 1

SOLVED! how do i change my wifi ssid/password in espeasy url interface

Posted: 14 Aug 2018, 23:14
by ufumes
Hi guys, pls i need help with updating my ssid/password settings in espeasy. I was able to change it manually through <espeasyip>/config, but i am wondering if it is possible to specify the values of my my ssid/password directly and dynamically through URL in a way similar to "http://192.168.50.111/control?cmd=GPIO,12,1" so that i can encode it programatically into my application, without my users having to start learning the details of configuring the esp8622 by themselves. Pls i appreciate your advice and help. thanks

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 15 Aug 2018, 06:19
by grovkillen
You need to do that over serial. BUT you might be able to do it with an event call together with %eventvalue%.... haven't tested it myself but I figured I give you a pointer on what to test.

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 15 Aug 2018, 12:03
by TD-er
It is a bit tricky to update those settings via http.
Rules could work. like Grovkillen suggested, but I don't see yet how, so I am also curious to how he thinks to do that :)

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 15 Aug 2018, 13:12
by grovkillen
Given a integer password and integer ssid name it would work using %eventvalue% ;)

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 15 Aug 2018, 23:56
by ufumes
thanks for the heads-up, i was able to get the list of system variables from https://www.letscontrolit.com/wiki/inde ... _Variables , there i saw ssid, but the is there a way to access the password variable?
Thanks in advance

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 16 Aug 2018, 08:52
by grovkillen
As the current code base. No only integer/float values are possible to use "all over the place". We hope to be able to bring string values into this later down the line but that's something for 2019 ;)

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 16 Aug 2018, 10:43
by ufumes
Hi, I was finally able to figure it out and got it working! so here is how i achieved it (this is just for future easpeasy users who wishes to be able to change their wifi ssid and wifi key through a http command)

First create rules (from the espeasy interface go to Tools/advanced, then enable rules. A new tab called rule appears, open and type the following inside it , then click on SUBMIT

Code: Select all

on wifissid do
  WifiSSID %eventvalue%
endon

on wifikey do
  WifiKey %eventvalue%
endon

on saveit do
  save
endon

on RebootS do
  Reboot
endon
access the following url in this succession

Code: Select all

http://192.168.50.184/control?cmd=event,wifissid=mywifiName
http://192.168.50.184/control?cmd=event,wifikey=mywifiKey
http://192.168.50.184/control?cmd=event,saveit
http://192.168.50.184/control?cmd=event,RebootS
NB: Replace the IP address to your IP address.
thats it. Note that the wifi name and password can contain only alphabet and numbers.

Re: SOLVED! how do i change my wifi ssid/password in espeasy url interface

Posted: 16 Aug 2018, 12:50
by grovkillen
Ah great, I didn't know that event value accepted alphanumerical (not only numerical). Thanks for that heads up!

Re: how do i change my wifi ssid/password in espeasy url interface

Posted: 16 Aug 2018, 12:51
by grovkillen
ufumes wrote: 16 Aug 2018, 10:43 Hi, I was finally able to figure it out and got it working! so here is how i achieved it (this is just for future easpeasy users who wishes to be able to change their wifi ssid and wifi key through a http command)

First create rules (from the espeasy interface go to Tools/advanced, then enable rules. A new tab called rule appears, open and type the following inside it , then click on SUBMIT

Code: Select all

on wifissid do
  WifiSSID %eventvalue%
endon

on wifikey do
  WifiKey %eventvalue%
endon

on saveit do
  save
endon

on RebootS do
  Reboot
endon
access the following url in this succession

Code: Select all

http://192.168.50.184/control?cmd=event,wifissid=mywifiName
http://192.168.50.184/control?cmd=event,wifikey=mywifiKey
http://192.168.50.184/control?cmd=event,saveit
http://192.168.50.184/control?cmd=event,RebootS
NB: Replace the IP address to your IP address.
thats it. Note that the wifi name and password can contain only alphabet and numbers.
You could simplify this by:

Code: Select all

on wifissid do
  WifiSSID %eventvalue%
endon

on wifikey do
  WifiKey %eventvalue%
endon

on saveit do
  Save
  Reboot
endon

Re: SOLVED! how do i change my wifi ssid/password in espeasy url interface

Posted: 16 Aug 2018, 16:34
by ufumes
Ok, thanks