configure espeasy settings through http url

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rakeshl
New user
Posts: 2
Joined: 26 May 2017, 09:42

configure espeasy settings through http url

#1 Post by rakeshl » 26 May 2017, 09:53

hello Everyone
Is it possible to configure espeasy settings like network configration(ssid and password) through http url.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: configure espeasy settings through http url

#2 Post by Shardan » 26 May 2017, 10:40

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
Regards
Shardan

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: configure espeasy settings through http url

#3 Post by vojtishek » 26 May 2017, 11:11

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.

rakeshl
New user
Posts: 2
Joined: 26 May 2017, 09:42

Re: configure espeasy settings through http url

#4 Post by rakeshl » 26 May 2017, 11:24

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).

vojtishek
Normal user
Posts: 70
Joined: 12 Jan 2017, 08:00

Re: configure espeasy settings through http url

#5 Post by vojtishek » 26 May 2017, 11:57

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

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: configure espeasy settings through http url

#6 Post by psy0rz » 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

Please support ESPEasy development via Patreon or buy us a coffee.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: configure espeasy settings through http url

#7 Post by Shardan » 28 May 2017, 16:34

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
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: configure espeasy settings through http url

#8 Post by grovkillen » 28 May 2017, 17:02

Is it possible to set UnitName and UnitNumber the same way?

Great solution by the way! :o :D
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: configure espeasy settings through http url

#9 Post by Shardan » 28 May 2017, 17:47

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
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: configure espeasy settings through http url

#10 Post by grovkillen » 28 May 2017, 17:50

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).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: configure espeasy settings through http url

#11 Post by Shardan » 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
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: configure espeasy settings through http url

#12 Post by grovkillen » 28 May 2017, 18:08

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 :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: configure espeasy settings through http url

#13 Post by psy0rz » 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.
Please support ESPEasy development via Patreon or buy us a coffee.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: configure espeasy settings through http url

#14 Post by grovkillen » 29 May 2017, 06:15

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. :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests