Page 1 of 1

configure espeasy settings through http url

Posted: 26 May 2017, 09:53
by rakeshl
hello Everyone
Is it possible to configure espeasy settings like network configration(ssid and password) through http url.

Re: configure espeasy settings through http url

Posted: 26 May 2017, 10:40
by Shardan
Hello,

well, that is what the initial setup does.

To be honest, i hope there are not too much possibilities to set such parameters from outside.

It is a point not discussed much yet: Sooner or later ESPEasy will have to face the question: Is it secure?
The more ESPEasy gets spread in the wild the more security will inevitably come into focus.

The possibility to set SSID/Password via an URL for more then the Initial setup procedure would be
a bad security hole in my opinion.

Regards
Shardan

Re: configure espeasy settings through http url

Posted: 26 May 2017, 11:11
by vojtishek
If you mean to administrate your devices through the internet, then I would not recommend that.
At least in situations, when you are not using strong firewall and vpn tunnel connection.

In a better situation your server for controlling sensors can be misused by netbots. But there are so many worst risks nowadays you should put in consideration, when your home automation should be controlled remotely.

Re: configure espeasy settings through http url

Posted: 26 May 2017, 11:24
by rakeshl
its not about updating device over the internet, my concern is whether it can be updated through url when device is connected to easy easy access point, so that we can use that url in application to make http request locally(only espeasy device and application connected not over internet).

Re: configure espeasy settings through http url

Posted: 26 May 2017, 11:57
by vojtishek
If I understand correctly and sorry if not, then so far I know following http command rules available.
I'm using one for switching GPIO's

https://www.letscontrolit.com/wiki/inde ... _Reference

Re: configure espeasy settings through http url

Posted: 28 May 2017, 15:35
by psy0rz
I use this shell script (in linux) to quickly connect my ESPEasy to the wifi, without using the wizard:

Code: Select all

#!/bin/bash

echo "
wifissid YourSSID
wifikey YourWIFIpassword
ip 192.168.1.123
save
reboot
" > /dev/ttyUSB0


Re: configure espeasy settings through http url

Posted: 28 May 2017, 16:34
by Shardan
psy0rz wrote: 28 May 2017, 15:35 I use this shell script (in linux) to quickly connect my ESPEasy to the wifi, without using the wizard:

Code: Select all

#!/bin/bash

echo "
wifissid YourSSID
wifikey YourWIFIpassword
ip 192.168.1.123
save
reboot
" > /dev/ttyUSB0

For those who use windows it is possible to quick-set via a batchfile.
You need 2 files.
First create a file SetWifi.bat:

Code: Select all

mode com6:115200,n,8,1
copy /b SetWifi.txt COM6:
Remeber to set the correct com-number for your progger device.

Second create a file SetWifi.txt:

Code: Select all

wifissid yourSSID
wifikey yourpassword
ip 192.168.1.123
save
reboot

Important: There must be a CR (Enter) after the last command!

Again remember to set your SSID, password and a ip adress.
You may use DHCP for setting ip, just ommit the "IP 192......" line.

Both files should reside in the same directory.

A click on the .bat sets the parameter.

Have fun :)

Regards
Shardan

Re: configure espeasy settings through http url

Posted: 28 May 2017, 17:02
by grovkillen
Is it possible to set UnitName and UnitNumber the same way?

Great solution by the way! :o :D

Re: configure espeasy settings through http url

Posted: 28 May 2017, 17:47
by Shardan
grovkillen wrote: 28 May 2017, 17:02 Is it possible to set UnitName and UnitNumber the same way?

Great solution by the way! :o :D
Hello,

if the command reference https://letscontrolit.com/wiki/index.ph ... _Reference is on the latest status - sorry no.
You may send the commands from the reference as you would do from a serial terminal.
The "copy /b" just sends the text as a terminal would do.
Setting unit name/number sadly is not an availlable command atm.

Anyways - you have to edit the .txt file on linux and windows for every setting of a new device so the web gui might be easier :)

Regards
Shardan

Re: configure espeasy settings through http url

Posted: 28 May 2017, 17:50
by grovkillen
Shardan wrote: 28 May 2017, 17:47 ...

Anyways - you have to edit the .txt file on linux and windows for every setting of a new device so the web gui might be easier :)

Regards
Shardan
I plan to make a Windows GUI for the flasher so I thought it'd be a great way of doing this automatically (no problem creating new txt files on the fly).

Re: configure espeasy settings through http url

Posted: 28 May 2017, 17:57
by Shardan
grovkillen wrote: 28 May 2017, 17:50 I plan to make a Windows GUI for the flasher so I thought it'd be a great way of doing this automatically (no problem creating new txt files on the fly).
+1 for that

But as long as the commands are not implemented there's no way.

Regards
Shardan

Re: configure espeasy settings through http url

Posted: 28 May 2017, 18:08
by grovkillen
Shardan wrote: 28 May 2017, 17:57
grovkillen wrote: 28 May 2017, 17:50 I plan to make a Windows GUI for the flasher so I thought it'd be a great way of doing this automatically (no problem creating new txt files on the fly).
+1 for that

But as long as the commands are not implemented there's no way.

Regards
Shardan
I hope we get that possibility in the future. It would make my GUI do more. It wont let me down yet though :)

Re: configure espeasy settings through http url

Posted: 28 May 2017, 23:25
by psy0rz
those serial commands are easy to implement. can you create a feature request for it?

also we already have a windows flasher gui. maybe you extent it and make a pull request. sources should be somewhere i think.

Re: configure espeasy settings through http url

Posted: 29 May 2017, 06:15
by grovkillen
psy0rz wrote: 28 May 2017, 23:25 those serial commands are easy to implement. can you create a feature request for it?

also we already have a windows flasher gui. maybe you extent it and make a pull request. sources should be somewhere i think.
#317 started.

Didn't find the source for the new GUI. But I plan to do mine anyhow, for personal purpose. :)