rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
310 stars 100 forks source link

Adding in DNS resolution to Wunderground API calls. #94

Closed madisdev closed 7 years ago

madisdev commented 7 years ago

Hello. I added DNS resolution to the WUnderground calls. Its been awhile since I wrote C++, so please forgive me if I have any bugs or naming convention issues. This was tested on a Raspberry PI Zero W.

I made the following edits. Any feedback would be appreciated. -Added in calls to gethostbyname for DNS resolution. -Removed input for WUnderground IP in UI. -Added resolved IP to UI on WCheck page. -Added property to Port.h so I can access resolved IP for above. -Removed usages of IP where not needed. -Added full url to API calls as per spec for HTTP GET(https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html)

nhorvath commented 7 years ago

Thank you very much for the PR! This has been on my wish list for a while. I'll give it a try and create a release.