WxCenter is a weather forecast viewer I've been working on on-and-off
for the last couple years. I finally feel like it's worthy of being
shared with other Syncronet sysops, so here it is:
https://github.com/codefenix-ConChaos/wxcenter.js
WxCenter is a weather forecast viewer I've been working on on-and-off for the last couple years. I finally feel like it's worthy of being shared with other Syncronet sysops, so here it is:
https://github.com/codefenix-ConChaos/wxcenter.js
Hello,Hello,
I actually got the API key and it is working except for Option 4. I am getting the following error and i do not know enough about JS to figure it out. Here is the error:
!JavaScript wxcenter.js line 253: TypeError: wxObj[period] is undefined
Is there a quick change i could do to fix this issue? Thank you for your Time!!
I actually figured out the issue. OpenWeatherMap didnt seem to like my BBS location. The BBS is located in Port Charlotte, Fl and it would give me that error. I went into my BBS config and changed the location of my BBS to very local towns next to mine. I chose Murdock, FL and now when i use the program, OpenWeatherMaps gives me Port Charlotte, Fl now that i use Murdock, FL in my BBS config. very weird but it seems to be an issue with OpenWeatherMaps and not the JS code. :)
First, when wxcenter.js validates the location through the geocode.maps.co API, it filters out results with a type not matching administrative, city, town, or village. Looks like Port Charlotte, FL has type values not matching any of these, so that's why it's not finding it (https://geocode.maps.co/search?q=Port%20Charlotte,+Fl). I went ahead and added the type "census", so now it validates that location OK.
Second, looks like the showForecast function crashes the script when no results are returned. This is a legitimate bug I need to fix, so thanks for bringing it to my attention.
For now, go ahead and try the latest wxcenter.js from GitHub again for Port Charlotte, FL and let me know how it goes for you.
Hello,
I went and changed the BBS location in the main Config to Port Charlotte, Fl and I am getting the same error. It is weird because when i change my BBS location to Murdock, Fl (a subdivision of Port Charlotte) the results from the weather app will come back and give me the weather for Port Charlotte. haha That is a little weird but i guess it is an easy workaround.. :) So it will give me the weather for Port Charlotte only if my BBS location is Murdock, Fl.. lol
I hope this helps you. This is an awesome program though. The Sixel weathermaps are amazing for a BBS.
I tried temporarily setting my BBS location to Port Charlotte, FL, and it's working for me here. Did you remember to grab the latest wxcenter.js from GitHub before you tried it again?Hello,
Watch your Terminal Server log when you run it. You should see something similar to this:
9/6 07:45:37a Node 1 <Codefenix> running external program: Weather Center
9/6 07:45:43a Node 1 <Codefenix> Viewing forecast from Weather.gov (TBW) for Port Charlotte,FL after 0 retries.
9/6 07:45:43a Node 1 <Codefenix> There are 9 warning(s) in FL.
9/6 07:45:43a Node 1 <Codefenix> 0 warning(s) found in the area for https://api.weather.gov/zones/forecast/FLZ162.
If you're getting something different, let me know.
Even though you found a workaround, I'd still like to figure this out.
If you need anything at all. Feel free to reach out. :)I hope this helps you. This is an awesome program though. The Sixel weathermaps are amazing for a BBS.
Thanks again for the feedback! I enjoyed working on it and that was a fun bonus feature to add in.
I always feel bad as if i am bothering someone. :) I am willing to help you figure this out. :) If you need me to test anything, feel free to let me know. Also, look out for the screenshots in your email.
Please download the latest wxcenter.js from GitHub and overwrite the old one on your system. Try it again for your desired system location name and let me know the outcome.Hello,
https://github.com/codefenix-ConChaos/WxCenter
This fix is probably good to have anyway, for those sysops who like to enter cute location names for their systems, like "Anytown" or "The Universe". :P
Please download the latest wxcenter.js from GitHub and overwrite the old one on your system. Try it again for your desired system location name and let me know the outcome.
https://github.com/codefenix-ConChaos/WxCenter
I just wanted to let you know that it is working now. I have Port Charlotte, Fl as the BBS location in my configuration and I am getting the correct weather. Thanks for the help with this.
Are there some good Youtube channels to learn some JavaScript that would be handy with SynchroNet?
While I haven't personally used (or found) Youtube channels on the subject, there are lots of great resources. For general JS stuff, like basic structure and syntax, W3Schools is a great place to start (https://www.w3schools.com/js). For all the Sync specific JS stuff, check the Sync wiki site (https://wiki.synchro.net/custom:javascript) and the JS Object ModelHello,
reference page (http://www.synchro.net/docs/jsobjs.html).
Are you planning on any new projects in the near future?
Re: Re: WxCenter - Weather reader for Synchronet
By: DaveW to Codefenix on Fri Sep 08 2023 10:01 pm
Are you planning on any new projects in the near future?
Not a lot. I've pondered the idea of a door for tracking sports scores, but I haven't put a lot of thought into how to design it yet.
Sysop: | Saxainden |
---|---|
Location: | Littleton, CO |
Users: | 30 |
Nodes: | 10 (0 / 10) |
Uptime: | 15:17:18 |
Calls: | 357 |
Calls today: | 2 |
Messages: | 37,320 |