Open peternewman opened 5 years ago
After looking at it a little, I am leaning towards Open Weather Map. They are clearly a big company and not going anywhere anytime soon. I don't know as much about Dark Sky, but mostly I don't want to rely on another library for something so simple. With OWM, I don't even need a library, because I'm only making one call. It's not as "programmatic", but it's so much simpler, and that's really what this needs to be, IMO.
So I looked at a few others:
After looking at it a little, I am leaning towards Open Weather Map.
See my summary above, the benefit of DarkSky is a longer forecast, the downside is needing something server side. Weatherbit could work (which has the best of most worlds), depending on if your usage counts as non-commercial.
I guess the ideal will be if it's coded in such a way you can drop in different providers to suit, but that's probably a whole other library!
For bonus points, make it scale the tiles dynamically based on the number of days the forecast provides...
See my summary above, the benefit of DarkSky is a longer forecast, the downside is needing something server side. Weatherbit could work (which has the best of most worlds), depending on if your usage counts as non-commercial.
That's a negative for me on DarkSky then. I don't need a longer forecast, and since this is going in a public school (and will be maintained and used by non-programmers) I really don't need another complex piece of equipment to maintain. It's bad enough trying to teach them Caspar, lol.
For bonus points, make it scale the tiles dynamically based on the number of days the forecast provides...
I would like to create a set of optional parameters (with defaults, but settable via JSON parameters from the CCG client) that control things like number of forecast days, etc. For my use case, they almost always need 7 days, but I can see the utility for other people.
See my summary above, the benefit of DarkSky is a longer forecast, the downside is needing something server side. Weatherbit could work (which has the best of most worlds), depending on if your usage counts as non-commercial.
That's a negative for me on DarkSky then. I don't need a longer forecast, and since this is going in a public school (and will be maintained and used by non-programmers) I really don't need another complex piece of equipment to maintain. It's bad enough trying to teach them Caspar, lol.
Yeah likewise for my particular use case too. Actually it looks like the CORS tests may be turned off in the Chromium within Caspar: https://github.com/CasparCG/server/blob/6ee169018e7bfd935bb8330683733b430a08bd7f/src/modules/html/producer/html_producer.cpp#L381
So it would only be an issue for development! Attribution would still need covering though.
For bonus points, make it scale the tiles dynamically based on the number of days the forecast provides...
I would like to create a set of optional parameters (with defaults, but settable via JSON parameters from the CCG client) that control things like number of forecast days, etc. For my use case, they almost always need 7 days, but I can see the utility for other people.
I probably didn't explain my point very well, Open Weather Map's free tier only includes a five day forecast ( https://openweathermap.org/price ), so ideally if that is used, and only five days returned, the system should hide the last two tiles and increase the width of the others to suit.
Yeah the options thing was my thinking for temperature units too.
I probably didn't explain my point very well, Open Weather Map's free tier only includes a five day forecast ( https://openweathermap.org/price ), so ideally if that is used, and only five days returned, the system should hide the last two tiles and increase the width of the others to suit.
Yeah, that makes more sense. I'll see what I can do. I'm thinking I'll also try to incorporate some error screens (e.g. "You didn't specify your ZIP code!" and similar). I know that's not strictly "professional", but since this is used by non-programmers in an elementary school, it's a convenient way to reduce text messages and phone calls to me asking what's going on.
How do you normally deploy it? Who does which bits?
If you enter the URL and the users just add the JSON, then we could add master options URL encoded which can be overridden by the config JSON. Obviously I'd prefer to avoid messages appearing if possible, unless you're in debug mode, in which case they can be useful. I'd hope they can be made to toggle somehow, but out of the control of users.
There's also console.log, which I believe appears in the Caspar log, but it's not quite as user-friendly.
At my schools, we use the generic CasparCG Client (as opposed to some of the ninja CG operators who make their own clients). If you're curious, we use it in conjunction with a Blackmagic ATEM, although that has little relevance to this software. We add the template to the Client rundown, then in the options, choose "Send as JSON", then fill in our ZIP code there. All the configuration is done in the options.
I understand in a "real" broadcast application, it would be highly undesirable to show any kind of back end error information on the output. However, for a group of 6th graders, that's the most straightforward way to communicate with them and their teacher easily (and the world won't stop turning if there are technical difficulties and mistakes on these broadcasts).
The logical solution, to me, is to make this "Userspace Errors" feature correspond to a config value. A "default" options configuration (overridable by the JSON options sent from CCG Client) could be included in the JavaScript, and in this repo it could have UserspaceErrors:true, but it would take all of 5 seconds to change the default options to say UserspaceErrors:false. This is what I would like to do because it covers my use case (this repo serves as a sort of central download point for my schools if they need a fresh copy of the template), but makes it trivial for someone else to customize the default behavior to fit their needs.
On Wed, Sep 18, 2019, 9:09 AM Peter Newman notifications@github.com wrote:
How do you normally deploy it? Who does which bits?
If you enter the URL and the users just add the JSON, then we could add master options URL encoded which can be overridden by the config JSON. Obviously I'd prefer to avoid messages appearing if possible, unless you're in debug mode, in which case they can be useful. I'd hope they can be made to toggle somehow, but out of the control of users.
There's also console.log, which I believe appears in the Caspar log, but it's not quite as user-friendly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/k4kfh/casparcg-html-templates/issues/2?email_source=notifications&email_token=ACRUJBZZZ7U4FGNSJQXWQVTQKIZB5A5CNFSM4IVZQ6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7AGFQI#issuecomment-532701889, or mute the thread https://github.com/notifications/unsubscribe-auth/ACRUJB4UIYBOBTV3GWPKB2TQKIZB5ANCNFSM4IVZQ6LA .
Originally posted by @k4kfh in https://github.com/k4kfh/casparcg-html-templates/pull/1#issuecomment-529235194
Originally posted by @k4kfh in https://github.com/k4kfh/casparcg-html-templates/pull/1#issuecomment-529240996