Obtain contenet of text sys variable
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 527
- Joined: 07 Jun 2018, 06:47
- Location: Gdynia/Poland
Obtain contenet of text sys variable
Is it possible to obtain content of text system variable like %ssid% from ESP to server by any HTTP server call?
Re: Obtain contenet of text sys variable
You can have a look at the /json data?
If that's not enough, how do you expect the "answer" to be returned?
If that's not enough, how do you expect the "answer" to be returned?
Re: Obtain contenet of text sys variable
It's not completely clear to me if you want to retrieve it by an external system from the ESP, or send from the ESP to an external server.
For retrieving (technical) data from the ESP you can query the http://esp-ip/json url that will respond with a JSON content that can be handled by the external party, and that includes the SSID.
For sending it from ESP to an external system there are 2 options:
- SendToHTTP - that can send a GET request, with url parameters, to an external system
- PostToHTTP - that can send a POST request, with optional headers and request-body, to an external system (this has been merged into mega today...)
For retrieving (technical) data from the ESP you can query the http://esp-ip/json url that will respond with a JSON content that can be handled by the external party, and that includes the SSID.
For sending it from ESP to an external system there are 2 options:
- SendToHTTP - that can send a GET request, with url parameters, to an external system
- PostToHTTP - that can send a POST request, with optional headers and request-body, to an external system (this has been merged into mega today...)
/Ton (PayPal.me)
-
- Normal user
- Posts: 527
- Joined: 07 Jun 2018, 06:47
- Location: Gdynia/Poland
Re: Obtain contenet of text sys variable
OK, solved. I can query ESP from server using syntax like this:
So is easy to retrieve SSID name from returned string.
THX for help.
Code: Select all
wget -O - http://192.168.0.28/json 2>/dev/null|grep '"SSID":"'
THX for help.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 32 guests