Hello Everyone,
Hoping someone can help point me in the correct direction.
I’m using a sparkfun weathershield, electron, and trying to upload various weather values to a pws onwunderground. I’m also trying to incorporate particles webhook functionality to ‘GET’ the values to my PWS. I’ve searched and gone through some older posts, but those webhooks seemed to be more about pulling values from wunderground.
Note: I’m trying to do this all through the web based tools (Integrations->webhook & Web IDE (build)). I don’t really want to use the particle CLI to create the json (webhooks).
I’ve got to the point where the firmware is pulling values, the webhook is ‘successful’, but the values are not being ‘uploaded’/pushed to wunderground.
Webhook response:
Event
The source event that triggered the webhook
{
“name”: “pushtowunderground”,
“data”: “72.4°F, 26%, 100.79 kPa, 0.00 in, Avg:0mph, Gust:0mph, Dir:0°.”,
“ttl”: 60,
“published_at”: “2018-10-22T22:15:43.613Z”,
“coreid”: “xxxxxxxxxxxxxxxxxxxxx”
}
______________________________________________–
Request
The HTTP request sent to the webhook url
GET /weatherstation/updateweatherstation.php?event=pushtowunderground&data=72.4%C2%B0F%2C%2026%25%2C%20100.79%20kPa%2C%200.00%20in%2C%20Avg%3A0mph%2C%20Gust%3A0mph%2C%20Dir%3A0%C2%B0.&published_at=2018-10-22T22%3A15%3A43.613Z&coreid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&ID=xxxxxxx&PASSWORD=xxxxxxxx&dateutc=now&dewptf=&humidity=&baromin=&winddir=&windspeedmph=&winddir_avg2m=&windspdmph_avg2m=&windgustdir=&windgustmph=&windgustdir_10m=&windgustmph_10m=&rainin=&dailyrainin=&softwaretype=Particle-Photon&action=updateraw&realtime=1&rtfreq=5 HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/webhooks)
host: rtupdate.wunderground.com
Connection: keep-alive
Webhook from particle integration: (as seen from the ‘custom template’ view)
{
“event”: “pushtowunderground”,
“responseTopic”: “hook/wu/success”,
“errorResponseTopic”: “hook/wu/error”,
“url”: “http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php”,
“requestType”: “GET”,
“noDefaults”: false,
“rejectUnauthorized”: false,
“query”: {
“rtfreq”: “5”,
“realtime”: “1”,
“action”: “updateraw”,
“softwaretype”: “Particle-Photon”,
“dailyrainin”: “{{d.8.3.1}}”,
“rainin”: “{{d.8.0.1}}”,
“windgustmph_10m”: “{{d.7.2.3}}”,
“windgustdir_10m”: “{{d.7.2.0}}”,
“windgustmph”: “{{d.7.2.3}}”,
“windgustdir”: “{{d.7.2.0}}”,
“windspdmph_avg2m”: “{{d.7.1.3}}”,
“winddir_avg2m”: “{{d.7.1.0}}”,
“windspeedmph”: “{{d.7.0.3}}”,
“winddir”: “{{d.7.0.0}}”,
“baromin”: “{{d.4.1}}”,
“humidity”: “{{d.2}}”,
“dewptf”: “{{d.1.1}}”,
“dateutc”: “now”,
“PASSWORD”: “xxxxxxxx”,
“ID”: “xxxxxxxxx”
}
}
I’m not going to lie I pulled alot of this from various web sources. I thought I could be clever, and try and build into the url push the tempf=‘x’,by turning this into a string format…but that did not work.
Any help would be great!
Thanks in advance!
Clayton