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

Accessing from cloud using aREST #684

Closed
varungujjar opened this issue Mar 15, 2018 · 6 comments
Closed

Accessing from cloud using aREST #684

varungujjar opened this issue Mar 15, 2018 · 6 comments

Comments

@varungujjar
Copy link

varungujjar commented Mar 15, 2018

Hey @xoseperez is there a way I can access & control the switch from cloud using something aRest apart from MQTT

ESP8266 <-> Cloud Server ( Hosting) -> HTML / PHP (JSON)

@varungujjar varungujjar changed the title Accessing from cloud Accessing from cloud using aREST Mar 15, 2018
@lobradov
Copy link
Contributor

@varungujjar
Copy link
Author

tried that but i guess that only allows you to access using local ip .. how do I access it from the internet ( like access it from my office.) like a websocket to remote server and then using a webpage switch it on & off ? am really not got at describing things :) . but i'll try my best to explain :)

  1. My internet provider does not give me access to a WAN IP
  2. so does my personal shared hosting doesnt allow you to host MQTT server
  3. Although I can host PHP pages
  4. something where ESP POSTS payload to PHP page & a web socket that waits for GET payload to trigger the device

@xoseperez
Copy link
Owner

A few months ago I wrote an article about this topic, how to access you local devices from the Internet in a secure way. You will need some kind of local server, like a Raspberry Pi.

http://tinkerman.cat/secure-remote-access-to-your-iot-devices/

@varungujjar
Copy link
Author

@xoseperez thank you xose pretty much helps.. :) still the setup is quite huge for a single switch.. however I was also thinking what if we could POST everytime a change occurs to a php server and use GET (every second) to poll for a change online using https .. and I can create a php script and MYSQL database that will store the state of the switches.. do you think thats safe ?

@xoseperez
Copy link
Owner

@varungujjar It might be a huge setup but it makes sense on the long run. It frees the ESP8266 in your local network from doing heavy lifting using SSL themselves. POSTing to a known service might be easy to do, polling for new actions every second using GET might be a little overkill.

@xoseperez
Copy link
Owner

Closing this since there has been no feedback. Please feel free to reopen if necessary.

Also, check #937 as it could help to configure direct access from outside your network over HTTPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants