Just A Question

Posted on
Wed Jan 11, 2023 10:49 pm
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Just A Question

So I've been using this plugin for several years now, and all is STILL going well. Tonight I just decided to "mess around" a bit, and tried to create a Weather Forecast Chart, but can't select a "Source Device". Same is true for a Weather Forecast Composite Chart. It has occurred to me that I need to create something else FIRST, but don't see what that might be. And also thinking this might have been designed around the old Dark Sky plugin(which I assume created a device that could be used here...) but am not sure.

I do have a NOAA Weather Plus device for my area, but it too doesn't show up.

Just asking if I'm missing something here....

Posted on
Thu Jan 12, 2023 7:38 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Just A Question

Glad to hear the plugin has been working well for you.

You assume right. The plugin doesn't support any other weather sources (I limited it to these two sources because I also control the structure of the source data). See: Matplotlib Plugin Weather Device Types

I'll add a combination device type to my TODO list for this plugin -- perhaps a generic line/bar chart with the ability to add individual sources to each line/bar and then folks can "roll their own".

Screenshot 2023-01-12 at 7.29.08 AM.png
Screenshot 2023-01-12 at 7.29.08 AM.png (214.51 KiB) Viewed 1202 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jan 15, 2023 9:26 pm
aldonc offline
Posts: 45
Joined: Jan 10, 2015

Re: Just A Question

Hi Dave,
Similar for me. I have rolled my own FW replacement with GhostXML and Visual Crossing. It would be nice (said the guy not writing the code) if the Weather Forecast device types could be made more generic. For example, using a common prefix with '..._day_01_temp_high' type of nomenclature should be easy to generate externally (from Matplotlib) using variables or devices.

I understand I'm over-simplifying the challenge... :P

thanks,
Aldon

Posted on
Mon Jan 16, 2023 7:21 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Just A Question

Hi Aldon -- the "difficulty" is the potential transient nature of the state names and how GhostXML handles them. Hard-coding in a state name like '..._day_01_temp_high' would be easy enough, but if that name ever changed, the chart device would break (GhostXML is specifically designed handle this). Moreover, while your weather source may have a static and predictable nomenclature, the next person's source will have a different naming scheme and it would get unwieldy to account for many different data sources.

I would suggest an Indigo Trigger which fires whenever the source weather device changes. The trigger would then run a Python script to parse the data to external CSV file(s) for charting (and then update the subject chart).

I'm happy to help with the scripting if needed.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Jan 16, 2023 8:47 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Just A Question

(I limited it to these two sources because I also control the structure of the source data)


If I were anywhere near capable of writing plugins, I'd have done exactly the same! Thanks for your reply.

Posted on
Mon Jan 16, 2023 9:35 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Just A Question

When Dark Sky goes -- uh -- dark, I'm planning to leave those options in as there appears to be a potential alternative that uses a compatible api.

(I don't know that anyone is using the paid versions of Weather Underground or WeatherKit as they're crazy expensive for individual use.)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 17, 2023 5:14 pm
aldonc offline
Posts: 45
Joined: Jan 10, 2015

Re: Just A Question

DaveL17 wrote:
I would suggest an Indigo Trigger which fires whenever the source weather device changes. The trigger would then run a Python script to parse the data to external CSV file(s) for charting (and then update the subject chart).

I'm happy to help with the scripting if needed.


Hi Dave, Oh, now this will generate a bunch of questions... :-D I'm sure I can brute-force the python to generate the CSV as I've done enough parsing of the Visual Crossing data.

-I'm assuming there isn't a way to generate the CSV to be used by the FW Forecast charts - correct? That is, you can't mix a line and bar chart.
-The CSV is always a timestamp and value only? That is, you couldn't put something like wind speed and wind gust in the same CSV - that would require the creation/update of 2 files.

thanks,
Aldon

Posted on
Tue Jan 17, 2023 5:46 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Just A Question

I'm assuming there isn't a way to generate the CSV to be used by the FW Forecast charts - correct? That is, you can't mix a line and bar chart.

That's true, yes. When I have time, I plan to introduce generic weather chart(s) to replicate the current built-in types.

The CSV is always a timestamp and value only? That is, you couldn't put something like wind speed and wind gust in the same CSV - that would require the creation/update of 2 files.

Correct. The Matplotlib plugin expects a time stamp and one element (one and only one) per data source. This was a design decision to more easily allow disparate data sources to be plotted together. For example, you might want to plot two thermostats on one chart (where the source data have different timestamps). The built-in CSV Engine device is designed to build longitudinal data for a single element (i.e., device state or variable value), but it's not really capable of combining multiple elements into a single CSV. That's why I think a Python script to build the CSV is likely the best approach for the time being.

I'm happy to help with the scripting if you have any troubles.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 17, 2023 6:02 pm
aldonc offline
Posts: 45
Joined: Jan 10, 2015

Re: Just A Question

OK, both as I expected. Let me take a pass through it in the next couple of days and I'll ask if I have further questions.

Aldon

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 11 guests