WeatherSync
WeatherSync
This plugin keeps the weather in the worlds on your server synchronized with the real-world weather in a location you specify. It does this by connecting to weather underground every few minutes (configurable; 5 minutes by default) and parsing the weather. This means if it's raining outside, it will be raining in minecraft. This is also true of thunderstorms.
You will want to configure it before you try to use it; otherwise it will synchronize your default world (named "world") with the weather in San Francisco, California. (Used for testing.)
This should work for any place you can get an RSS feed with weather in it from WeatherUnderground. See the directions below for how to find this, and if it does not work, feel free to ask for help. Please be sure to provide the URL you are using!
You can view the forecast with the /forecast command, which is available to all users. It will also show the current weather. This command can be disabled, if desired.
Download (This could be more recent than the version on this site if they have not approved the latest version yet. I strongly suggest using this link instead.)
Time synchronization:
Some people have expressed interest in having the real world time on their servers alongside this. I was going to code this myself, however there is something out there already that can do this. Check out RealTime for this!
FINDING THE RSS FEED
This plugin now asks you to provide the URL to an RSS feed to get the weather. The old method will not work past version 1.2. The method to get the URL to your RSS feed is as follows:
Navigate to http://classic.wunderground.com, and find your location.
Around the height of the title of the page on the far right is an RSS icon. You need to get the URL of this - right click it and copy the link address. It should look like:
http://rss.wunderground.com/auto/rss_full/global/somestuff.xml?units=english
Take this entire thing, and put it in the worlds section of your config file.
If you have problems finding this, just ask. My explanation here is not that good.
@johnkant
Glad I could help
Hi again Chris,
Thank you for a swift reply. I'm happy to report that it was indeed a network issue ;)
I'm playing around with Ubuntu server at the moment and I noticed my network configuration was missing a DNS server IP adress. Filled it in and *poof* it's working.
Thank you for your time and keep up the good work.
John.
@johnkant
I'll give this a try when I get home from work (many hours away right now) and see if there's anything going on with that particular rss feed, but as far as I know that should be working. I can give you a couple of debugging steps that might help out, though.
First thing to try: from the machine you're running the server on, access that url. If it's windows, just use a web browser. If it's linux/unix based, do this at the command line (for the system, not for Bukkit) curl "http://rss.wunderground.com/auto/rss_full/global/stations/06356.xml?units=metric"
If you don't get a response, it's a networking issue on your server, which I won't be able to help you with very effectively.
If it's not a networking issue, could you please put your entire config file up somewhere for me? (http://pastebin.com works) The location alone may be enough to reproduce your issue, but having the full file would make things much easier.
Thanks,
Chris
Hi Cppchriscpp,
I've been using your plugin for quite a while now and have updated it today on a fresh server. Created a new config file and updated it with the following RSS feed:
rssfile: http://rss.wunderground.com/auto/rss_full/global/stations/06356.xml?units=metric
When I start the server weathersync tells me that it can't update the weather due to a connection error. When I turn debugging on it generates the following output:
When debugging is enabled it does return with a forecast but this is not visible in game.
I'm currently running Bukkit 1.4.6 R0.3.
Do I need to wait for a new release or is there something else that's going wrong here?
John
@Zutiiq
As it should- nothing major changed with the bukkit api (this plugin does not use craftbukkit/minecraft internals) so this should be working. I'll of course give it a proper test once we have an RB, but I'll be very surprised if anything breaks.
Happy holidays!
weathersync seems to work with 1.4.6, i didn't get any outdated errors in my console.
@cppchriscpp
Just tried it and it's working now. I now have real-time light rain. Thanks for the update!
@cppchriscpp
@agent2594
That went quicker than expected- the link in the description has been updated to the latest release, and a new release should be available on here shortly. Your problem should be resolved.
Your world names should be just that- world names; no leading directories. The plugin shouldn't explode when you do that now. I tried with a similar setup on my machine, and this seems to work. Let me know if you encounter any additional problems. Thanks!
Chris
@agent2594
Hey,
So I think you've actually discovered a problem with how I check for world existence. For whatever reason I'm checking files rather than just checking if Bukkit thinks the world exists. This works perfectly fine in normal situations, but breaks in yours. You should only need to enter the world name, and the plugin should deal with that.
I'm going to do a bit of experimenting with this to be sure that it solves your problem, but expect to see a 2.1.4 in the near future. (I'll tag you when I release it.)
Chris
@cppchriscpp
You are correct; that is my directory structure, and I've never had any issues with other plugins. I took your suggestion and tried removing the "world/" prefix from my WeatherSync config. As a result, WeatherSync claimed neither of my worlds exist and skipped them.
@agent2594
Hey,
I'll try looking into this in-depth a bit later, (probably tomorrow, though I can't make any promises) but one thing that sticks out to me is your world names. In particular, you're using "worlds/world_name" instead of just world_name. Two questions for you: - Is this what you use in other plugins, and if so are they working correctly? - I'm guessing that your directory structure for minecraft is as follows - is this accurate? ./minecraft.jar ./server.properties ./other crap like that ./worlds ./worlds/world_name ./worlds/other_world_name
If you want to experiment now, you could try changing your world names to be just world_name w/o the leading directory, but I don't know if this will solve anything.
Thanks for getting back to me on this - I know it's been a while.
Chris
@cppchriscpp
Apparently I'm not very good at replying to posts either. I'm not even sure I have comment notifications turned on! Time to go check...
Anyway, just tried WeatherSync 2.1.3 on CraftBukkit 1.4.5-R0.2 and it's behaving the same way (ie. no apparent functionality with exceptions on every updatetime frequency). I also tried /forecast and it says there is no forecast available.
Per your request, I'll PM you with my current config. I just checked the RSS URLs I'm using and they are returning what appears to be a valid XML response.
@agent2594
I really need to figure out why notifications about this keep winding up in spam... anyway, I'm sure you've long since given up on the plugin, but if you're still having problems and want help, let me know. That's an odd one and may take a significant amount of time to track down - I don't want to do it if there's no one to gain from it. If you still care and can still reproduce the problem, could you provide me with the file you used for configuration? Either way, thanks for your interest, and I apologize for losing this comment. (I'll actually respond within a day next time; honest.)
@C0DEW0LF
Thanks for sharing this information. It seems pretty obvious to me, but people miss things like that all the time. If you have any suggestions on making it more obvious, let me know.
For those of you having trouble I fixed the problem I think. Where it says "name:" put your world name. I wasn't doing that, I was focused on the URL. Derp.
I'm running WeatherSync 2.1.3 (downloaded from BukkitDev) on CraftBukkit 1.3.2-R1.0 and it doesn't appear to be working at all (it's raining on my server but it's not raining IRL where I am). I'm getting the following exception whenever it tries to refresh (i.e. the "updatetime" frequency).
Should I add a ticket to your Redmine install with more info?
@squeezer2k
First of all, sorry it took me forever to respond. I keep losing the emails notifying me about these comments.
Anyway, that's an interesting idea, but unfortunately we're limited by Minecraft here. There is no way to set the weather for a specific area of the world - each world has its own weather; there are no subdivisions.
This could potentially be worked around using some trickery to tell each individual user what the weather in their world is, but it would be a lot of time and effort that I cannot afford to put in right now.
Sorry.
hi there,
don't know if someone else already suggested...
would be great if we could sync the weather for multiple worldguard regions.
so we could generate some sort of climate zones.
regards
@Lighterkekz That looks right to me.
@Giuseppe1990 Paste is gone. I probably took too long to look at it though - I lost track of these issues somehow. Sorry about that. If you post it again I'll get to it quicker.
i need help can you lookt this pls
http://www.hastebin.com/pexekapixo.avrasm
Where exactly do you mean with the RSS-Feed? if i click on a rss-feed icon i get this link: http://rss.wunderground.com/auto/rss_full/global/stations/10471.xml?units=metric <
i think its the wrong url...