[MISC] WeatherSync v2.0_1 - The real-world weather - Now with multiworld and more! [1337-1597]

Discussion in 'Inactive/Unsupported Plugins' started by cppchriscpp, Apr 22, 2011.

  1. Offline

    cppchriscpp

    Moving to BukkitDev! Click here!

    WeatherSync - The real-world weather in Minecraft
    Version: 2.0_1

    Important note for those upgrading from 1.2: Your old configuration files will not work as-is. You'll need to copy over the new config file, and move over any old settings that still apply.

    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!

    RSS feeds are now the only way to synchronize with this plugin. Old location information will be ignored by the plugin as of version 1.3.

    You can now 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.

    As a warning, I have not been able to test this to the level I test most things due to the nature of it. Please let me know if/when you have issues.

    Download (Source code is in there too!)

    Future Features:
    • Heavy/severe thunderstorms? (Sorry guys, there's no chance I'm going to have time for this. Maybe another plugin can hook into thunderstorms and make this happen, if it doesn't already exist.)
    • unit selection (determined by rss feed; see the ?units=metric/english at the end? change that)
    • None; I implemented everything else here! :)
    Time synchronization:

    Some people in this thread 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 by Mechestrial for this!

    FINDING THE RSS FEED

    How to find your RSS feed (open)
    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://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:
    Code:
    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.


    FOR ALL ISSUES AND BUG REPORTS

    Due to how this thread has been going, I am going to require all reports to include this information, or your bug report may be ignored.
    • An extremely detailed description of the problem.
    • That you have turned debug mode on in the config file, and then caused the problem to happen-- this will provide me with helpful insights into what is going wrong.
    • Your configuration file
    • The major error that occurred
    • The rest of the server.log surrounding that error. If you aren't sure, just give me the whole thing.
    • Any errors a client might have seen
    • Anything you think might have gone wrong -- your insights often lead me to the problem quickly; even if you are wrong.
    • Your build of craftbukkit
    • Any changes in your setup that preceeded the problems (installed plugins, mainly)
    • Your system information (Some of this is in /debug info)
      • (Ideally, just include all output from these two commands.)
      • Operating system
      • Java version
      • Any wrapper software you might be using
      • A list of plugins you use (As reported by /plugins or "plugins" at the server command line)
    • Any other details that could be relevant.
    Yeah, I know it's a lot and it's kind of a pain in the rear. Some of it won't be useful in some situations, but I only get a very little time to work on this now, and I really don't like having to put that time to waste just because I don't have all the information I could about what went wrong.

    Changelog:

    Version 2.0_1
    • Fixed a dumb mistake causing some users to get the forecast for the last day available instead of the first.
    Version 2.0
    • Multiworld support!!!!111 (Sorry; had to do it.)
    • Re-enabled messages to users on the weather changing
    • Redid the configuration file for multiworld and some other stuff
    • Customization options for messages; you can now set what the plugin sends to users!
    Version 1.3
    • Never existed; I jumped straight to 2.0. Not sure what I was on when I put this version here. >_>
    Version 1.2
    • Fixed (hopefully) the bug with weather not updating once and for all. The weather will be FORCIBLY updated every time the weather is checked.
      • Note that client desynchronization issues may still occur. If you disconnect and reconnect and the weather is correct again, there is nothing I can do to fix this, sorry.
    • Changed the default method of specifying location to an RSS feed. Let's see how this can break things D:
    • Accidentally removed the show-forecast option which shows when the weather changes in chat. Did anyone actually use this? Redoing it for multiworld is going to be a massive pain if people want it.
    • Fixed broken forecasts
    Version 1.1_3
    • Fixed debug mode -- anyone who had problems please try again and report your issues again. Sorry for the inconvenience; it was my fault.
    Version 1.1_2

    • Fixed the weather randomly changing bug. Really this time! (I think)
    Version 1.1_1

    • Program now accepts blank configuration options correctly
      • (This fixes the null pointer issues.)
    Version 1.1

    • Weather forecasting (w/ forecast command)
    • Ability to show forecast on join
    • Debug mode that will display what the weather is on start and when it changes (new config option -- use this to report bugs!)
    • More failure-checking in the forecast changes.
    • Support for weather stations
    • Fixed threading/recursion..
    • Clarified config files.
    • Fixed various bugs
      • Weather duration not being set (cause of random weather at times)
      • Improper string conversion (That boolean bug that someone had on page 4)
      • (More that have been forgotten since being fixed..)
    Version 1.0

    • Initial release
     
    JonasD, zhuowei, Stoepsel and 5 others like this.
  2. Pretty sure this is impossible at this moment, but if you get the chance, Can you get it to change the biome of the world based on temperature? or maybe just make weather independent of biomes (rain instead of snow in cold biomes)?

    My last hope is that its already biome independent and I just set it up wrong...
     
  3. Offline

    cppchriscpp

    Sorry, no effective way to do this without risking corrupting biomes left and right. I might still do it some day, but I need a LOT more time to devote to this before I'd feel safe doing it, and I'd need to test the thing endlessly too.
     
  4. UGH... oh well, maybe I will make sure to pick a better world next time. (I hate the snow, but it covers half my server)

    EDIT: Just curious but, what would happen if a biome was corrupted?
     
  5. Offline

    SeeD419

    Okay...it's set up right

    Omaha: Cloudy 76

    In game: ITS STILL RAINING WTF

    Using zip code. Here's what wunderground.com says for current data:
    Rainfall 0.00 in

    Plugin fails to function as described.
     
  6. Offline

    sweetswear4665

    Awesome, but will you have support for snowstorms (and snow melting afterward if not in biomes that normally support it)? Other than that awesome! Reduces the amount of random rain. Multiworld isn't that much of an issue for me, as I only have one world I want to sync with real time day/night and real time weather.
     
  7. Offline

    cppchriscpp

    Please do not bother to post if you're just going to complain without giving an actual bug report. Enough other people have used it without issue.

    Weird trees, different environment and weather than makes sense. It's just general not a good thing. I don't want my plugin responsible for corruption of anything.

    No way to do that without playing with biomes, which ties into the question above yours. I'll look into it some day when I have time, hopefully. I can't make any promises, however.
     
  8. Offline

    SeeD419

    Hmm, not sure how to give you better information.

    I set up the config file. Plugin loads and shows no error messages at all, but does not function as described. Nothing really more to say, sorry.
     
  9. Offline

    HEmile

    Hey, I'd love to use this plugin but I can't seem to get it to work.
    I want to use this station: http://www.wunderground.com/global/stations/06350.html
    This is my config:
    Using bukkit 740, It says: Could not read the weather; check your settings.
    You location is: global/stations/3304
    Weathersync: Weather changed from undefined to clear
     
  10. Offline

    azunai

    ok.. just noticed that the weather does not change correct
    when you start the server the right weather is set, but then (maybe cause forcast doesnt work?) random weather appears
     
  11. Offline

    NotoriousPyro

    Doesn't work for me, I'm using the station ID in the UK and I get this in the server log:
    Code:
    2011-05-01 14:06:49 [SEVERE] WeatherSync: Could not read the weather; check your settings.
    2011-05-01 14:06:49 [SEVERE] WeatherSync: Could not read the weather; check your settings.
    I've commented out zipcode, city and state and enabled station like so:
    Code:
    station: 03323
    I'm using build 740.
     
  12. Offline

    TheGurw

    When typing in the code format, things won't be bold. :p

    Otherwise, I love this!
     
  13. Offline

    cppchriscpp

    For starters, you didn't include ANY of the information I asked for in the first post aside from build number.

    What version are you using? That was corrected in one of the minor revisions; I suggest updating to be sure. If it's still happening, get back to me.

    Whoops; didn't even notice that.

    To the rest of you with legitimate bug reports, I'll get to them when I have a few minutes to devote to them. It looks like a legitimate issue, and I'll patch it once I figure out what's going on. I didn't want to quote your posts and notify you just to give a cop-out answer like that, so I didn't. I'll get to it in a few days, though.
     
  14. Offline

    SeeD419

    I'm just going to switch to another plugin. At first I was going to fill out your bug report questions but after filling it out and reading it myself I realized just how silly it is. Java version? Config file? How ridiculous. I typed my zip code in the config file, seriously it's not rocket science. I haven't had a single issue with other config files for probably almost 100 plugins I've experimented with. Are you assuming I can't read? It should be fairly easy to input a simple zip code into the configuration file and sync the weather to a server, but this plugin apparently can't figure it out. I would imagine if something had gone wrong the plugin would have output an error to the console but I have never seen a single peep from it. The only possibly problem I could imagine would be a plugin conflict preventing this plugin from doing anything except announcing "It's partly cloudy", but you didn't even request a list of other plugins servers are running in your "extremely detailed" report request. Just forget it, I'm soured on the whole idea of this.
     
  15. Offline

    cppchriscpp

    (If you read this paragraph the first time, I misread your post.)

    I need that information to be sure I know everything about the problem. For fixing these bugs, I do need to assume that users can't read. I've had many issues stem from that exact issue. Maybe you're not one of the problem users, but I can't ensure that. It could also be a problem elsewhere in the configuration file. Also getting and parsing the weather from an RSS feed in code isn't all that easy; it does require dealing with a socket connection and parsing data that apparently varies in format by country. I have a TON of error output when things actually go wrong; your case is more one where the plugin thinks everything is right when it is clearly not. I need information about this so I can FIX the bug. Since nothing I had thought of has gone wrong, I need all the inputs and outputs to recreate the situation, so I can find what is going wrong and fix it. This also is not just tailored to your specific case; I require this detail from everyone so I get the most useful information at once, and have a prayer of fixing the bug without harassing the users for more information constantly.
    Most users don't seem to have a problem with it, though many ignore it the first time around. Many times they'll guess what I actually need, and sometimes they'll be right. If not though, I ask for everything. It just makes sure I can narrow down the problem to an exact cause.

    As for the list of conflicting plugins, I DID request it. I originally said I was going to add that since apparently I made an oversight, but there it is on the list. You made me look again, but it's there.
    [This comment has been redacted entirely]
    To the people who have made bug reports recently, I'll be able to get to them a bit later in the week; I'll have a fix out as soon as I am able. Most likely this will consist of a reworking of how weather locations are read, since I've actually done a few things wrong. Non-us zip/postal codes simply do not work, and other countries work very differently than the US. I'll probably have to add two different config options.

    I'll also be attacking the issue with zip/postal codes and station numbers eating themselves at that time. I have no idea what could be causing that at the moment, but I intend to find out. I'm sure I did something stupid. I'll get you guys a new version as soon as I am able; midweek enough time to work on this should be coming.

    Thanks to those who have patience, and to everyone else... well, you're not going to read this anyway.

    This post has been edited to remove some statements made when I was in a bad frame of mind. I apologize to anyone I might have offended.
     
  16. Offline

    Eggplant!

    Hello! Fun plugin.

    For a little while, I thought this plugin wasn't working properly. However, much like pig spawners and client side item drop duplication, it seems like there are bugs in Minecraft itself that cause rain to appear client side only, when it's not actually raining on the server.

    This seems to happen with or without the plugin. Often I can relog when rain starts and discover that it's not really raining on the server. I've not seen this reported in the wiki or forums (that I can find). Has anyone else encountered this or seen it documented anywhere?
     
  17. Offline

    cppchriscpp

    That's certainly new, and would explain a few things. I actually saw something like that last night on a server not using the plugin. That could definitely explain a few of the problems people have had. If anyone can confirm this, I'll add a note to the first post.
     
  18. Offline

    Eggplant!

    Just to follow up a little bit... I've seen it the other way around too where it's raining on the server, but not the client. This is a little easier to spot because wolves will constantly make the shaking sound for no apparent reason. If you relog, suddenly it's raining.
     
  19. Offline

    KainsRache

    Hello there!
    I don't know what went wrong, here's my bug report:
    Unfortunately, my server doesn't really get it. Initially everything's fine, the weather is in sync. But after a while the server randomly adds rain and thunderstorms. Even logging out and logging in again (even restarting the entire client) doesn't give me the "real" weather. So it's not really a client thing.

    The weather should update every two minutes and initially shows the following on the console:
    When I use /forecast it tells:
    Here's my configuration file:

    Code:
    # WeatherSync configuration file
    
    # How frequently to update the weather, in minutes.
    updatetime: 2
    
    # Which world to update the weather on, in multiworld setups.
    world: schwarzesbremen
    
    # The zip or postal code of the location to sync with.
    # You need either this or a city and state. You do not need both.
    # If you are not using one, comment it out with a # sign.
    #zipcode: 28215
    
    # The city to get weather for.
    # Not needed if you provided a zip code.
    #city: Bremen
    
    # The state (or Country) to get weather for.
    # Not needed if you provided a zip code.
    #state: Bremen
    
    # The weather station to use.
    # Don't use this if you are using a zip/postal code or a city/state combination.
    # (Remove the # and change the weather station to use this.)
    station: 10224
    
    # Whether to show the weather/forecast to users on join.
    # (Formatting of this may be possible in the future; request it if
    # you're interested!)
    forecast-on-join: true
    
    # Whether to show the forecast when weather changes.
    show-forecast: true
    
    # Whether to have debug mode on.
    # You'll want this off for most servers, but turn it on if you have problems and
    # it will give you extra information about what is going wrong.
    # Please turn this on if you have issues, and report any unusual output.
    debug: true
    The rest of the server.log surrounding that error:
    Code:
    2011-05-04 16:15:30 [INFO] Weather remains unchanged.
    2011-05-04 16:17:30 [INFO] Weather remains unchanged.
    2011-05-04 16:18:15 [INFO] [AutoSave] Warning, AutoSave will commence soon.
    2011-05-04 16:18:30 [INFO] [AutoSave] World Auto-Saving
    2011-05-04 16:18:31 [INFO] [AutoSave] World Auto-Save Complete
    2011-05-04 16:19:30 [INFO] Weather remains unchanged.
    2011-05-04 16:21:30 [INFO] Weather remains unchanged.
    2011-05-04 16:23:15 [INFO] [AutoSave] Warning, AutoSave will commence soon.
    2011-05-04 16:23:30 [INFO] Weather remains unchanged.
    2011-05-04 16:23:30 [INFO] [AutoSave] World Auto-Saving
    2011-05-04 16:23:31 [INFO] [AutoSave] World Auto-Save Complete
    2011-05-04 16:25:30 [INFO] Weather remains unchanged.
    2011-05-04 16:27:30 [INFO] Weather remains unchanged.
    2011-05-04 16:28:15 [INFO] [AutoSave] Warning, AutoSave will commence soon.
    2011-05-04 16:28:30 [INFO] [AutoSave] World Auto-Saving
    2011-05-04 16:28:31 [INFO] [AutoSave] World Auto-Save Complete
    
    Strange thing is that it says "clear" in the log and "Partly Cloudy" in the client messages.
    My craftbukkit build is 740 and it's running on an Ubuntu 8.04 with Java version 1.6.0_22.

    Active plugins are:
    • WorldSave
    • BiomeMessage
    • ChopTree
    • Essentials
    • EssentialsChat
    • EssentialsGroupManager
    • EssentialsProtect
    • EssentialsSpawn
    • GeoCacher
    • iZone
    • Locker
    • LWC
    • NoCheat
    • Permissions
    • PlayerCount
    • RealTime
    • SelfClosingDoors
    • SimpleSignEdit
    • SupplySign
    • TombStone
    • TreeAssist
    • WeatherSync
    • WorldEdit
    • WorldGuars
    If you should need any other information please let me know.
     
  20. Offline

    cppchriscpp

    Thank you for your report; it is actually pretty telling. So you know, the cloudy vs clear thing is nothing important. The plugin reads cloudy and a lot of other stuff like it as clear because I can't do anything with the clouds in minecraft. There are currently 4 potential values for the weather: clear, rain, snow, thunderstorm. So what it's showing you is perfectly within the realm of normal.

    The forecast issue is known -- the forecast in some places has to be parsed differently than where I am and all of my test locations. (I tested just in the US because I'm dumb.) As such, when it can't be parsed right, you get the Unknown forecast. This will be fixed in the next major update.

    As for your issue with actual weather, I have no idea what's going on, but you're far from the only one to still complain. I guess the server's entirely ignoring duration of weather. I'll just have to set it every cycle in the next update, and hope it doesn't lag the server too much.

    Thank you for the report, and I hope to show you results soon.
     
  21. Offline

    DerKB

    Well, i get the same problems like KainsRache, forcast not working, did set the station to Berlin, so same problem with the parsing.

    But the weather seems to be a probelm overall, cause it rains on the server but the plugin shows "clear", after i relog it is not raining anymore.
    So for me it more looks like the weather state is not send to the client for some reason, same happens without the plugin running.
    Something seems to be not working correct with the weather update for the client.
     
  22. Offline

    cppchriscpp

    All I can say is I'll look into it and hope that I missed some magical function to send weather state to clients. I doubt it though. I will be having it update the weather every cycle though.
     
  23. Offline

    KainsRache

    Thank you so much for your efforts, dear sir! :)
     
  24. Offline

    Grennie

    I Love your Plugin,

    it works great for my Server.

    Only one Question will there be Multiworld Support for your Plugin?
     
  25. Offline

    KainsRache

    Starting post says:

     
  26. Offline

    BlueFireGaming

    Hmmm, it still can't get the weather in the Netherlands. Even the station won't work... :S
     
  27. Offline

    nerdsley

    Help.......
    Can't find station number for Mission Viejo, CA
     
  28. Offline

    cppchriscpp

    The update that will make it cooperate correctly with non-us areas is still not out due to an extreme lack of time. Sorry :( Soon though

    Why is NOTHING ON THAT SITE STANDARDIZED * has a small spasm *
    Sorry about that -- my method actually doesn't work for them. Why? Who knows. Anyway, try KCASANJU2 -- failing that just use your zip code.

    Update: Actually, use the RSS method. Also, a new update is out.
     
  29. Offline

    nskjunky

    does this work with hamburg, germany?
    what do i have to write into the config?
     
  30. Offline

    KainsRache

    Just use the given link from the first post to search for your weather station ID (should be 10147 for HH airport), comment out everything like state, etc. and it should work. Works well in Bremen, for example, so it should work for Hamburg as well!
     
  31. Offline

    cppchriscpp

    Follow the directions in the first post to find your RSS feed, and change that in the config file. It will work for anywhere that is on wunderground theoretically. As such, Hamburg certainly should work fine.

    Thanks for trying to help, but this is not recommended anymore. That method was too broken, and seemed to introduce too much confusion. This new way will have some confusion, but should at least work in all cases. Support for that style is still there for now, but it will be going away when multiworld support is added in the next major update. I intend to add automatic conversion, so your old ones should work.
     

Share This Page