Jump to content

Weather themes using Plugins - Emby


Go to solution Solved by ebr,

Recommended Posts

Posted

I read some articles here about adding local weather info in Emby through some plugins. But those are from 2013 and 2014. IS that feature still supported or obselete?

Posted

Hi, I'm not aware of any weather plugins or themes for Emby.

Posted (edited)

A plugin could create an entry called "Weather" which could display as the 2 lines on each row weather information below the image of each region. Then allow seeing each region temperature that way and etc. Click into and display the detail page of weather for that area. Same exact way the tuneIn plugin works except for weather. This is possible. There would be nothing to press PLAY and watch. Just data to see.

But presently most of those weather sites want to monetize their existence. They have gone paid API or have very paltry API limits. The paltry API limits mean it would not be very useful as it wouldn't be able to constantly update in real time. But if it were to use a paid API key it might work. That is why there isn't one. These services that have these weather data sets want them monetized in some way.

Quite literally there is no such thing as a free lunch. You are being marketed/advertised to, or you pay to remove that advertising. Since marketing/advertising over an API would be ridiculous they have pay/free tiers. The free tier is always crippled by limits because they want to monetize their service. You cannot be sustainable without monetization in some form.

Edited by speechles
Posted

NOAA and NWS can both be used.  I used to use that data for a portal plugin.

Posted (edited)
4 minutes ago, cayars said:

NOAA and NWS can both be used.  I used to use that data for a portal plugin.

They are limited in API calls per hour. It becomes a pain in the ass to manage the rate limit to avoid hammering the website and being a pest to them. You risk having them BAN your API key. Especially if this is a key you share. Abuse is rife in the weather scene.

In case you do not believe me:
http://forum.egghelp.org/viewtopic.php?p=96121

I had a life coding eggdrop before Roku came around. I am quite aware of the limits of weather API, building upon them, and releasing what you've built into the wild. What I built was for eggdrop IRC channels and lasted until Wunderground changed hands and changed to v3 of their API. That API costs money now.

Edited by speechles
BillOatman
Posted (edited)

OpenWeather is free as well with pretty liberal restrictions. I have attached my c# class that utilizes newtonsoft for the json to give someone a jump start.

 

 

OpenWeatherClass.cs

Edited by BillOatman
Posted
11 minutes ago, BillOatman said:

OpenWeather is free as well with pretty liberal restrictions. I have attached my c# class that utilizes newtonsoft for the json to give someone a jump start.

 

OpenWeatherClass.cs 8.43 kB · 0 downloads

That OpenWeather looks promising if the user applies for their own API key. Then they get 2000 API calls per 24 hours. There are 1440 minutes per 24 hours. You can poll once every minute and if that is the frequency of the station update get those changes. Entirely possible. Plus gives 560 extra calls per day to look up other things. So entirely possible with that OpenWeather API that one actually looks useful. :)

Posted
12 minutes ago, speechles said:

They are limited in API calls per hour. It becomes a pain in the ass to manage the rate limit to avoid hammering the website and being a pest to them. You risk having them BAN your API key. Especially if this is a key you share. Abuse is rife in the weather scene.

In case you do not believe me:
http://forum.egghelp.org/viewtopic.php?p=96121

I had a life coding eggdrop before Roku came around. I am quite aware of the limits of weather API, building upon them, and releasing what you've built into the wild. What I built was for eggdrop IRC channels and lasted until Wunderground changed hands and changed to v3 of their API. That API costs money now.

No reason to keep pulling info over and over again on something like this.  It's best to cache info at the server level  with a time code.  The if a new request is made X minutes (ie 15) it will fetch the data and update the cache.

If this type of data could be consumed in client apps, not just web I'd do a plugin for it.

Posted (edited)
13 minutes ago, cayars said:

No reason to keep pulling info over and over again on something like this.  It's best to cache info at the server level  with a time code.  The if a new request is made X minutes (ie 15) it will fetch the data and update the cache.

If this type of data could be consumed in client apps, not just web I'd do a plugin for it.

On eggdrop each person did !weather <zipcode here>

How do you cache? why would you. How dare you feed me information that isn't freshly polled for. You might give people stale information and become just another problem with the internet. Give people news they can use and not day old doughnuts. The internet has a problem with old news.

Also.. side-note: Server resources aren't gratis. You cannot store everything on the server. Some things should always be polled. The websites policy on API limits allows it. What is bad about it again?

I mean I understand if it is data that doesn't change frequently. But with weather the alerts can be sent during any poll.

An alert is why we poll. The weather may not change but maybe the polling this time has severe weather alert for a tornado in your area. Emby could say "LEAVE YOUR HOUSE IMMEDIATELY TORNADO COMING!" and then it becomes more useful than just some fun data sets. It saves lives. Update every 15 minutes you could already be dead. If only it sent them within 60 seconds. It can.

It can be consumed in client apps. The overview can contain ALERT information. ETC.. The plugin can do it just as easily as TuneIn does it. You just do not need playable URL. Just an image of the town which they have likely. And perhaps title is the town name. Under it the weather. Click into that on the row to get the detail screen. In that the overview shows the forecast and everything. Click into the overview to expand it and see all. That is entirely possible.

The plugin would use the message system of Emby to send alerts to users to tell them to LEAVE THE HOUSE NOW! When they might die.

Edited by speechles
Posted

I don't agree at all.  Certain information can clearly be cached for limited amount of time.  Not talking about days but minutes for something like this.  Information doesn't need to be updated on every screen redraw which would be highly wasteful use of internet/services.

Posted (edited)
13 minutes ago, cayars said:

I don't agree at all.  Certain information can clearly be cached for limited amount of time.  Not talking about days but minutes for something like this.  Information doesn't need to be updated on every screen redraw which would be highly wasteful use of internet/services.

Depends on the frequency of the update of the station. If it updates every minute so should you. They send alerts. Weather is emergency. Emby could messages during those times of emergency to you through the Emby message system. Tell you on the screen in those little dialogs that slide on screen "PLEASE LEAVE A TORNADO IS COMING YOUR WAY! ALERT ALERT! LEAVE NOW! HIDE! GET TO SHELTER!" and interrupt your watching. Just like they do on TV. That is where I am heading with this. Not just to see the temperature outside. But to save your life.

It isn't wasteful of internet services. They have rate limits. 2000 per day. Once per minute is 1440. How does this abuse them? Why should you delay your polling to get outdated information again? Why when there is no need? Huh?

In my case it would say "WILDFIRE IN YOUR AREA. YOU MUST LEAVE NOW. DO NOT DELAY! RUN!" and same effect as the tornado only we cannot hide here in Northern California. We must high tail it out of there. Weather isn't just temperature. It can be anything. Earthquake, Fire, Flood, Zombies, etc..

Could also poll USGS for earthquakes and let users know when they just survived another one close to them. Could tell you when a tsunami might overwhelm your area. Get to high ground.

Edited by speechles
Posted

I think you're misunderstanding.  A lot of the information from these sites is semi-static like 5 to 10 day forcasts, sunrise, sunset, tides that doesn't change much at all. Caching this info is smart and a good use of resources.

Then there is information like hourly forecasts and real-time info.  When you follow their guides they tell you how often you should call for any area and are supposed to cache the info yourself so not to hammer their site.

A lot of info can be pulled via graphics so you only need a link and the CDN takes care of updates and caching per the control site.

Posted

Keep in mind if you get 2000 lookups daily, but have family using your system in 10 different locations you now have 2000/10=200 lookups each.  You have to take this type of thing into consideration which is why you do need to cache much of the info and only use the lookups for "real-time" info.

skidmarks
Posted (edited)
59 minutes ago, speechles said:

Wunderground changed hands

I relied on them when i was doing web sites for local "fine" establishments.  It was a simple free way to add weather back then.  But everyone has the right to earn a $ off of their data to an extent!  

There is no way this works without real time data.  If the API key was used per server and only refreshed when triggered to do so...  maybe?

Would be a great way to get severe weather alerts!  If i want to see weather its much easier to go outside and check the weather rock.  Its never wrong.

 

 

Edited by skidmarks
Posted (edited)
38 minutes ago, cayars said:

Keep in mind if you get 2000 lookups daily, but have family using your system in 10 different locations you now have 2000/10=200 lookups each.  You have to take this type of thing into consideration which is why you do need to cache much of the info and only use the lookups for "real-time" info.

Wrong. Each location? I assume you get multiple locations per query just like Emby allows. If you use those fields correctly and watch the headers to see the X-Rate-Limit and stay beneath it. Then watch for X-Rate-Limit-Refresh and that is how long you must wait for a full 2000 credit API lookup. It will be 86400 seconds and count down each second. That way you can know the exact time the 2000 rolls over. You use both that rate limit and refresh time to know how to easily stay below. The plugin keeps track of that users do not. It only updates every minute to get severe weather for a single location. If more users want that then the plugin would need to track an API key for each user. Simple as that. You are making solutions for problems that are not there.

I guess they also have a responder. So you would just need a port to keep open for streaming updates. In that case you can ditch the polling and just handle reading the socket when it has data. Open streaming API for severe weather which would be much more useful as it has earthquakes, wildfire, tornado.. everything..

Edited by speechles
Posted

Your making assumptions that aren't accurate.  Work with the data and APIs then we can discuss what you can and can't do. :)

Posted (edited)

<redacted.. impossibly dense conversation was here>

Edited by speechles
  • Haha 1
Posted

Well what I can tell you is I still have the original source code to what is now https://www.aerisweather.com/ when it was sold to them back in August 2016. :)

 

Posted

I am not even talking about them. I am talking in general and not basing it on anything yet. This is entirely conceptual as to why a media service would even need to tell you the weather. The only reason I can see is to give severe weather alerts. I am just here for the popcorn and the cold drinks. I am all out of popcorn and cold drinks.

  • Like 1
Posted

So you're "trolling" then.  LOL

I'm talking from experience on things like this.  Of course how it's used makes a difference.  If we were only considering storm alerts for example that could show up on any page (say top right) we wouldn't want a call to the provider on every web page or app screen update but maybe one call from the server every 5 minutes or so (user settable).  These alerts don't change minute by minute.  I'm not sure this could even be done in Emby at all without lots of rework to the framework.

However, we could use the messaging API to send things like Severe Storm Alerts as this would just be a message sent.  That would be a semi-useful staring point and could be very useful for people in Tornado Alley, Flash Flood Zones, etc.  Something like this wouldn't even need to be a plugin or theme as the only real interaction with Emby would be the API to send a message to all connected clients (assuming all users are in the same area).  For scattered clients a plugin would likely be needed to setup postal codes...

Posted (edited)
1 hour ago, cayars said:

So you're "trolling" then.  LOL

We both are. <redacted original run-on-sentences that were here. If you missed it you missed it. It wasn't worth seeing anyways>

@RokuGuys Apologies for the needless clutter. It is the holidays and this kind of thing just makes your thread poison. I am sorry. I was just trying to help.

Side-note: It is possible to have the Roku do the polling itself and display via the message display system within the Emby app on Roku. This is just to see if this could work without being annoying. Last night I had a severe weather alert 5x for freezing. They use different ID with some events that are identical but it is an elevation of the alert. So it isn't annoying but you may see the message repeated. Using the Roku to do this I just used a single hard-coded location then just polled. It works and you can have it only return a body if there is an alert. So bandwidth expense polling isn't much. It could be done better with a streaming API and using the server but then each app has to be written to support it. Meaning since each app must be updated to support it support for it could be coded into each app without needing the server to handle polling for weather. If the user enables it in the app it would start. Could also have the temperature up there by the clock. Knowing those update every 15 minutes and then doing a full poll for severe alerts + temperature at that time.

Edited by speechles
Posted

Speechless, this is a discussion forum.  In a discussion people don't have to agree on things and people can have opposite beliefs or needs.  I don't put people down and never attack the person so not sure what you're referring to as I'm not a mean spirited person or I wouldn't be here.

Go back a read the thread minus your posts you've already removed.  I stand firm that much of the data would have to be cached for X amount of time if used in a theme otherwise you could go through API limits very quickly on systems with lot of clients.

  • Solution
Posted

Short answer is we do not have this functionality anymore (it was only ever in the WMC targeted app).  It hasn't been a very requested item in all these years either and, I know from experience of just trying to use this type of RainMeter plug-in and also from our past experience that it is, in fact, very difficult to keep these working.  The "owners" of this data tend to try and thwart people using it for free.

  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...