My problem with SendToHTTP
Moderators: grovkillen, Stuntteam, TD-er
My problem with SendToHTTP
Hello to all!
I have a seemingly simple task, but I don't understand how to do it, because I'm just learning how to do it.
I have a router connected to a ddns server and my computer can automatically update the page in the browser with an address like
http://blabla.bla/update/SGJJ5GJJGXH4JHCHHV etc. Then ddns at this address performs a check and, if necessary, a new IP correction.
My ISP sometimes changes the external IP for me. And then the ddns service always knows the external IP. But.
How can I do such an update without a computer directly from Esp Easy on the module? I've tried a lot and haven't worked yet. Where and how can I ask the esp module to open this page with this address? Thanks to those who answered.
I have a seemingly simple task, but I don't understand how to do it, because I'm just learning how to do it.
I have a router connected to a ddns server and my computer can automatically update the page in the browser with an address like
http://blabla.bla/update/SGJJ5GJJGXH4JHCHHV etc. Then ddns at this address performs a check and, if necessary, a new IP correction.
My ISP sometimes changes the external IP for me. And then the ddns service always knows the external IP. But.
How can I do such an update without a computer directly from Esp Easy on the module? I've tried a lot and haven't worked yet. Where and how can I ask the esp module to open this page with this address? Thanks to those who answered.
Re: My problem with SendToHTTP
I'm not sure if you need to also supply the public IP yourself.
It would be a bit redundant as it is probably connecting from your public IP, right?
One thing you probably also need to enable for this is the "SendToHTTP wait for ack" on Tools -> advanced.
You may need to run this SendToHTTP from the rules, periodically, so you need to enable the rules.
Not sure what the best interval is for it, that's up to you to find out
See the docs for some examples: https://espeasy.readthedocs.io/en/lates ... sendtohttp
It would be a bit redundant as it is probably connecting from your public IP, right?
One thing you probably also need to enable for this is the "SendToHTTP wait for ack" on Tools -> advanced.
You may need to run this SendToHTTP from the rules, periodically, so you need to enable the rules.
Not sure what the best interval is for it, that's up to you to find out
See the docs for some examples: https://espeasy.readthedocs.io/en/lates ... sendtohttp
Re: My problem with SendToHTTP
Hi TD-er!
Yes. Now I realize that I really forgot to give some details. My ddns provider told me to update myself. This is done by going to a unique address, a link that is assigned to the user. Alas, clients are not automatically updated on their server. IP update for the user occurs if you regularly update this link in the browser. Then my new IP is registered on the ddns server. Update time 5 minutes. I configured my computer to automatically request, following this link. Every 5 minutes.
I have rules enabled in Esp Easy and a separate ask for SentToHTTP.
I tried different options with timers and Clock, but for some reason nothing works. I'm pretty sure there is a syntax error. I didn't understand it.
I do it about:
On Rules#Timer=1 do
SendToHTTP http://blabla.bla/update/SGJJ5GJJGXH4JHCHHV,80,
loopTimerSet,1,362
endon
I think..
May be is it not right?
Yes. Now I realize that I really forgot to give some details. My ddns provider told me to update myself. This is done by going to a unique address, a link that is assigned to the user. Alas, clients are not automatically updated on their server. IP update for the user occurs if you regularly update this link in the browser. Then my new IP is registered on the ddns server. Update time 5 minutes. I configured my computer to automatically request, following this link. Every 5 minutes.
I have rules enabled in Esp Easy and a separate ask for SentToHTTP.
I tried different options with timers and Clock, but for some reason nothing works. I'm pretty sure there is a syntax error. I didn't understand it.
I do it about:
On Rules#Timer=1 do
SendToHTTP http://blabla.bla/update/SGJJ5GJJGXH4JHCHHV,80,
loopTimerSet,1,362
endon
I think..
May be is it not right?
Re: My problem with SendToHTTP
I read a lot of help and looked at examples. As a result, I got completely confused.
Re: My problem with SendToHTTP
Possibly, adding quotes around the entire url and extra arguments including the commas, (either single or double, doesn't matter) might help here, as ESPEasy is a bit picky on the number of arguments (comma or space separated) supplied to a command.
That would end up like this: (also corrected the error with loopTimerSet)
That would end up like this: (also corrected the error with loopTimerSet)
Code: Select all
on Wifi#Connected do
loopTimerSet,1,360 // Update every 6 minutes
endon
On Rules#Timer=1 do
SendToHTTP "http://blabla.bla/update/SGJJ5GJJGXH4JHCHHV,80,"
endon
/Ton (PayPal.me)
Re: My problem with SendToHTTP
Dear friends.
I will now try different options taking into account your advice and corrections. I'll write later whether it worked or not. I am not lost. Test time. )
Thank you very much for your participation.
I will now try different options taking into account your advice and corrections. I'll write later whether it worked or not. I am not lost. Test time. )
Thank you very much for your participation.
Re: My problem with SendToHTTP
The arguments for sendToHttp are incorrect.
See: https://espeasy.readthedocs.io/en/lates ... sendtohttp
Parameters are:
- host
- port
- rest of URL after the host:port
See: https://espeasy.readthedocs.io/en/lates ... sendtohttp
Code: Select all
on Wifi#Connected do
loopTimerSet,1,360 // Update every 6 minutes
endon
On Rules#Timer=1 do
SendToHTTP,blabla.bla,80,"update/SGJJ5GJJGXH4JHCHHV"
endon
- host
- port
- rest of URL after the host:port
Re: My problem with SendToHTTP
Dear good people. Everything worked out. Yes. The syntax was not correct. The last example you proposed has worked stably for me. The one who suggested TD-er. Only works for me without quotes. Thank. The problem has been resolved. Will be a good example for everyone who looks here later. And you guys, happiness and warm sun!
Who is online
Users browsing this forum: No registered users and 86 guests