• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

anywhere esp32

Q&A Forum › Category: ESP32 › anywhere esp32
0 Vote Up Vote Down
HUYNH QUOC ANH asked 5 years ago

Hello thanks your : https://randomnerdtutorials.com/control-esp32-esp8266-gpios-from-anywhere/

I have a problem , can you see link: https://drive.google.com/open?id=1kfQkG675_PWDeSYsR8izm8cjXokpQRrO

My link : http://espconntroller.byethost7.com/esp-outputs.php?name=LED+1&board=1&gpio=2&state=0″

I change http://espconntroller.byethost7.com/esp-outputs.php”

or “http://example.com/esp-outputs-action.php?action=outputs_state&board=1”

but can not work.

My web : https://drive.google.com/open?id=1veI0pROqdykhuvJYR-tgjtLcXTDmKHCM

thank you .

Question Tags: anywhere esp32 sql
10 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

Hello, in your code, you should make a request to this URL:

  • http://espconntroller.byethost7.com/esp-outputs-action.php?action=outputs_state&board=1

Which URL did you enter in your code? Try with the URL that I’ve mentioned to see if it works for you.
Regards,
Rui

0 Vote Up Vote Down
HUYNH QUOC ANH answered 5 years ago

Hello. Thanks Your Answer, I try:  espconntroller.byethost7.com/esp-outputs-action.php?action=outputs_state&board=1

But not work:

My code link : https://drive.google.com/open?id=1oureP6ZH0y_ploFJ476m5PI49vat1pfUn4_QGVEt-EE

Error show :

Connecting...
Connected to WiFi network with IP Address: 192.168.0.193
HTTP Response code: 200
<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("ead964b6ba050ed81c88fe7a7dcbe143");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://espconntroller.byethost7.com/esp-outputs-action.php?action=outputs_state&board=1&i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>
Parsing input failed!
HTTP Response code: 200
<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("ead964b6ba050ed81c88fe7a7dcbe143");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://espconntroller.byethost7.com/esp-outputs-action.php?action=outputs_state&board=1&i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>
Parsing input failed!

Thank you !

0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

Hello, thanks for letting me know. I’ve never encountered that error and I’ve tried to make it work on my ESP connected to your server.
Unfortunately you are using a hosting provider that doesn’t work/allow connections from unknown devices (that’s why I recommend Bluehost). It will only accept connections from web browsers (and blocks connections from other devices).

  • https://stackoverflow.com/questions/32409655/getting-html-response-instead-of-json-in-android

In that post, someone suggested that using a free web host called 000webhost.com worked for them. Can you try that option?
Thanks

0 Vote Up Vote Down
HUYNH QUOC ANH answered 5 years ago

Dear Rui Santos
Thanks for your support.

Thank you !

 

 

0 Vote Up Vote Down
HUYNH QUOC ANH answered 5 years ago

Hello, where i can find 

 $servername = "localhost";
    // Your Database name
    $dbname = "REPLACE_WITH_YOUR_DATABASE_NAME";
    // Your Database user
    $username = "REPLACE_WITH_YOUR_USERNAME";
    // Your Database user password
    $password = "REPLACE_WITH_YOUR_PASSWORD";
Pleased take A PHOTO. THANKS
I dont see,
0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

What do you mean? You just need to the same you did for that host in 000webhost.com for example.

0 Vote Up Vote Down
HUYNH QUOC ANH answered 5 years ago

Rui Santos
Thank you, I fished it. and know it work ok. but when turn on LED, led blink ,It does not light stable.
Example : when turn on led, led blink F=100 HZ.
Thank you !

( NOTE : It do not work with Hosting free, and domain name Free. Thanks ! )

0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

Which GPIO are you using? What’s your LED size and resistor?

0 Vote Up Vote Down
HUYNH QUOC ANH answered 5 years ago

Hello 
GPI0 : 4 , LED 5mm (5v – Res =330 ohm)
Thank you.

0 Vote Up Vote Down
Rui Santos Staff answered 5 years ago

Hum, it should be working properly. Are you using my exact code in your ESP? Can you use a different GPIO?
Thanks!

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.