Http get request
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 9
- Joined: 25 Jan 2017, 03:57
Http get request
I would like to generate a http get request to submit a temperature to weather underground.
http://wiki.wunderground.com/index.php/ ... d_Protocol
I searched around a bit but couldn't find an example of sending a get request. Is this possible?
Thanks for the help,
Ryan
http://wiki.wunderground.com/index.php/ ... d_Protocol
I searched around a bit but couldn't find an example of sending a get request. Is this possible?
Thanks for the help,
Ryan
-
- New user
- Posts: 9
- Joined: 25 Jan 2017, 03:57
Re: Http get request
I have made some progress so I wanted to post my solution for others.
I am using esp mega so I have the option of 3 controllers in the controllers tab. I added a controller using the generic http protocol. I selected use hostname. The thing to watch for there is this is just the hostname. I had first included the https:// that doesn't work and shows an error in the log trying to connect to 0.0.0.0 I set hostname to weatherstation.wunderground.com
The second issue I ran into was in the publish field. I misunderstood how that worked. In the devices tab and the specific task you must select which controller the data is sent to. Then in the controller publish field I used this. (might show as two lines in a narrow browser window, but this is all on one line)
Those are the most important. Port is set to 80
User pass and subscribe are all blank.
Enabled is of course checked.
I am using esp mega so I have the option of 3 controllers in the controllers tab. I added a controller using the generic http protocol. I selected use hostname. The thing to watch for there is this is just the hostname. I had first included the https:// that doesn't work and shows an error in the log trying to connect to 0.0.0.0 I set hostname to weatherstation.wunderground.com
The second issue I ran into was in the publish field. I misunderstood how that worked. In the devices tab and the specific task you must select which controller the data is sent to. Then in the controller publish field I used this. (might show as two lines in a narrow browser window, but this is all on one line)
Code: Select all
/weatherstation/updateweatherstation.php?ID=STATIONID&PASSWORD=STATIONKEY&dateutc=now&tempf=%value%
User pass and subscribe are all blank.
Enabled is of course checked.
-
- Normal user
- Posts: 25
- Joined: 29 Apr 2016, 06:54
Re: Http get request
Thanks for posting this. There usually isn't much help here or at least I've had no luck...
Re: Http get request
If i use DHT11 in %value% i get temperature (tempf) and humidity (humidity)
How can I fix it?
Thanks for the help,
Umberto
How can I fix it?
Thanks for the help,
Umberto
Re: Http get request
you should use http advanced controller in newest build: see here for more info: https://www.letscontrolit.com/wiki/inde ... P_Advanced
Re: Http get request
Dear All,
i have this problem:
I have instal the EspEasy on a ESP8266. This board is a weather station with connected DHT22 Temperature and Humidity sensor and BMP180 for a Pressure.
I'am trying for a long time to pubblist this three vale to weather underground site, but without success.
Can someone help me?
This is my device page, I want to use only Temperature Humidity and Pressure value and send this to WU.
Thanks in advance....
i have this problem:
I have instal the EspEasy on a ESP8266. This board is a weather station with connected DHT22 Temperature and Humidity sensor and BMP180 for a Pressure.
I'am trying for a long time to pubblist this three vale to weather underground site, but without success.
Can someone help me?
This is my device page, I want to use only Temperature Humidity and Pressure value and send this to WU.
Thanks in advance....
- Attachments
-
- zzz.PNG (43.01 KiB) Viewed 22265 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Http get request
You can do that using rules and the command "SendToHTTP"
Please study the wiki. Get back here once you have done that.
Please study the wiki. Get back here once you have done that.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Http get request
I have studied this guide but unfortunately I don't understand so much.
The firs think I have to do, is to create a Dummy Device who convert a °C in Fahrenheit, because the wu strung need Fahrenheit.
I create a Single DummyDevice with value called TemperatureF. In the rules I wrote this:
The firs think I have to do, is to create a Dummy Device who convert a °C in Fahrenheit, because the wu strung need Fahrenheit.
I create a Single DummyDevice with value called TemperatureF. In the rules I wrote this:
But this doesn't workTaskValueSet 4,1,[T6H#Temperature]*9+32

- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Http get request
But you don't have any dummy device on task number 4?
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Http get request
And your rule?
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Http get request
Is the one I have write before.
- Attachments
-
- sss.PNG (26.51 KiB) Viewed 22131 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Http get request
Have you really studied the wiki?
Especially this section :
https://www.letscontrolit.com/wiki/inde ... rial_Rules
Especially this section :
https://www.letscontrolit.com/wiki/inde ... rial_Rules
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: Http get request
I try tom re read all the guide and try to understand...
Re: Http get request
I have partialy solved, but I still have one problem, on the dummy device I'am not able to assign name to the 3 an 4 value. Why??
- Attachments
-
- dddd.PNG (60.94 KiB) Viewed 22101 times
Re: Http get request
There are different types of dummy device. You must chose something with quadruple value.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Http get request
I have tried also with quad or triple bus the last two is no way to name it... Also if I create a new Dummy no one of the 4 value is nominable...
Re: Http get request
I have solve the issue with the firmware update. 

Re: Http get request
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Re: Http get request
Dear all, sorry for the delay but I not have received the notification for the new post....
By the way, now all working correctly and this is my complete situation: And this is the two rules I use to converting the value and send all to wu:
Rule 1
on T6H#Temperature do
TaskValueSet 4,1,[T6H#Temperature]*1.8+32
TaskValueSet,4,3,[T6H#Temperature]-(100-[T6H#Humidity])/5
TaskValueSet,4,4,([T6H#Temperature]-(100-[T6H#Humidity])/5)*1.8+32
endon
Rule2
on PR#Pressure do
if [PR#Pressure]>800
if [PR#Pressure]<1100
Publish %sysname%/PR/Pressure,[PR#Pressure]
TaskValueSet 4,2,[PR#Pressure]*0.0295301
SendToHTTP weatherstation.wunderground.com,80,/weatherstation/updateweatherstation.php?ID=XXXXX&PASSWORD=XXXXX&dateutc=now&tempf=[TF#TemperatureF]&humidity=[T6H#Humidity]&baromin=[TF#PressureI]&dewptf=[TF#Dewptf]&action=updateraw
endif
endif
endon
Now I have another problem, but I have to made a new post for this.... See you in next post...
By the way, now all working correctly and this is my complete situation: And this is the two rules I use to converting the value and send all to wu:
Rule 1
on T6H#Temperature do
TaskValueSet 4,1,[T6H#Temperature]*1.8+32
TaskValueSet,4,3,[T6H#Temperature]-(100-[T6H#Humidity])/5
TaskValueSet,4,4,([T6H#Temperature]-(100-[T6H#Humidity])/5)*1.8+32
endon
Rule2
on PR#Pressure do
if [PR#Pressure]>800
if [PR#Pressure]<1100
Publish %sysname%/PR/Pressure,[PR#Pressure]
TaskValueSet 4,2,[PR#Pressure]*0.0295301
SendToHTTP weatherstation.wunderground.com,80,/weatherstation/updateweatherstation.php?ID=XXXXX&PASSWORD=XXXXX&dateutc=now&tempf=[TF#TemperatureF]&humidity=[T6H#Humidity]&baromin=[TF#PressureI]&dewptf=[TF#Dewptf]&action=updateraw
endif
endif
endon
Now I have another problem, but I have to made a new post for this.... See you in next post...
Re: Http get request
No dummy or conversion required , just use the formula ( %value%*1.8+32 )on value to convert from C to F.
Next just post the value of device as is.
Regards,
Who is online
Users browsing this forum: No registered users and 18 guests