This is what I get. At first I thought maybe it's because of the double '/' in the URL, but it seems to work.wizjos wrote:Hmmm, a thought on that: have you checked the output from a direct call to Wunderground (eg.: in a putty session issueing the same command as the script would)?EdKo66 wrote:Yes, I even triple checked it. Just to be sure I put in the full path to the Moon.tmp file, '../var/packages/domoticz/scripts/lua/tmp/Moon.tmp', checked the permissions of that file (777). My Rain.tmp uses the same path (different file, of course) and that is working. It has to have something to do with permissions, but can't figure it out now. And since I'm now working on it for about 8 hours, going to bed, and will think more tomorrow.
Code: Select all
root@DiskStation:~# curl http://api.wunderground.com/api/APIKEY/astronomy/q//Rhoon.json
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"astronomy": 1
}
}
, "moon_phase": {
"percentIlluminated":"14",
"ageOfMoon":"26",
"phaseofMoon":"Waning Crescent",
"hemisphere":"North",
"current_time": {
"hour":"9",
"minute":"23"
},
"sunrise": {
"hour":"6",
"minute":"28"
},
"sunset": {
"hour":"20",
"minute":"53"
},
"moonrise": {
"hour":"5",
"minute":"26"
},
"moonset": {
"hour":"16",
"minute":"56"
}
},
"sun_phase": {
"sunrise": {
"hour":"6",
"minute":"28"
},
"sunset": {
"hour":"20",
"minute":"53"
}
}
}