poblabs/weewx-belchertown

does not create forcast.json on clean install

Closed this issue · 14 comments

hi there I ran across a few bugs trying to install this
when setting up forecast with aeris id did not create forecast.json and then it complained the entire time it did not exist I manually created it and then it would stop complaining about a non existent file
also i was trying to use my darksky api key as I am having issues with aeris

my issue is that where do you put your darksky api
I tried forecast_api_id = "darkskyapi" the API key is not added to the darksky link and it fails

also better suggestion then aeris
would be climacell, weatherapi or visualcrossing

https://www.visualcrossing.com/weather-api
https://www.weatherapi.com/
https://developer.tomorrow.io/v3/reference#get-daily

log
for forecast.json

can not see it as permission issue if forecast is disable all is fine when forecast is enabled then one gets errors - manually insert blank file called forecast.json the complaints stop

Error writing forecast info to /var/www/html/json/forecast.json. Reason: [Errno 2] No such file or directory: u'/var/www/html/json/forecast.json'

as to darksky key issue from log

https://api.darksky.net/forecast//51.429,-97.466?units=si&lang=en, and the error is: HTTP Error 400: Bad Request

the api is not being inserted into the the request

are you using a different then forecast_api_id = "darkskyapi" for darksky api key

If you do (somehow) have a valid dark sky key, you could also go to the previous version 1.1 which has darksky native support. read the readme.md file for the correct skin.conf/weewx.conf options as they're different (and I don't remember them anymore)

https://github.com/poblabs/weewx-belchertown/releases/tag/weewx-belchertown-1.1

yes it still works - it just not being inserted in to the request
https://api.darksky.net/forecast//51.429,-97.466?units=si&lang=en, and the error is: HTTP Error 400: Bad Request
https://api.darksky.net/forecast/DARKSKYAPIKEYSHOULDBEHERE/51.429,-97.466?units=si&lang=en

I try the older version anything to know or you can apply the install overtop of the newer version

I would delete the skins/Belchertown folder and also the bin/user/belchertown.py files. Install new skin, configure it, restart weewx and you should be good

I guess before you do that - have you restarted weewx yet on the new version?

yes I restarted after each change -- it was a clean install on a fresh pi runing debian-- it would seam the darksky handle -> darksky_secret_key = " " it does not throw error but no darksy forecast I will look through your code and see what different and perhaps if I understand what you are doing i will make it work for one of the api I mentioned above

I can not find the folder /bin/user or skin/belchertown where are those located

Check bottom of this readme http://www.weewx.com/docs/debian.htm

this worked easier --- wee_extension --uninstall=Belchertown and it now working again with 1.1 but I will still see if I can figure out where how to add different weather api I see how to download the json - just to figure out where to process it

for your info if you want to modify darksky it seams visualcrossing is almost directly compatible - I have not tried I will try tomorrow

https://www.visualcrossing.com/resources/documentation/weather-api/how-to-replace-the-dark-sky-api/
couple little changes to the url and to json title section names ie-- darksky (currently:) visualcrossing (currentConditions:)

for your info i modified belchertown 1.1 for visual crossing it works fine - though I disable "visibility" as your code does not handle nul values I think I had to modify about 20 lines most of that was just update for the different json structure . hardest part was tracking down the lines as I was unfamiliar structure and i gave myself a 16 day forecast which is nicer for me as 8 was not quite enough sometimes for agricultural purpose

FYI -- I experienced a similar thing. By turning off forecast and running wee_reports then turning it back on, "seemed" to fix the issue.