Author Topic: Developing a Weather Plugin, videos  (Read 99512 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Developing a Weather Plugin, videos
« on: July 18, 2013, 07:33:38 am »
Hello everybody.

I am doing a series of videos detailing the creation of a Weather Plugin, as an example of how to use Plugins to add whole house functionality to Orbiter.

The first video can be viewed here:

-Thom

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #1 on: July 18, 2013, 03:39:59 pm »
Hi Thom

Great stuff, thank you.

Would it be possible to link a Davis weather station to lmce?

Dries
Core:Asus P8H77-V, Intel core i3-3240 LGA155, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 4Gb ram, 125Gb SSD
MD: Zotax Zbox ID41

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Developing a Weather Plugin, videos
« Reply #2 on: July 18, 2013, 04:35:54 pm »
bushtech,

every device that has an open protocol can be linked to LinuxMCE.

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #3 on: July 18, 2013, 05:45:37 pm »
I am pretty sure that the Davis software is not open protocol but the data is readily usable. Quite a couple of programs are available to utilise the data. I use weewx to watch the web interface on any computer on my network which also pushes it to wunderground. My weather station can be seen here : http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=INORTHWE6&graphspan=day&month=7&day=18&year=2013

Is it possible to replace the flickr screensaver with this web interface?. Or overlay this over the screensaver? (bushtech dreaming)
Core:Asus P8H77-V, Intel core i3-3240 LGA155, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 4Gb ram, 125Gb SSD
MD: Zotax Zbox ID41

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #4 on: July 18, 2013, 05:55:24 pm »
You would need to alter Orbiter to do this, as we currently have some dependency on Photo_Screen_Saver whenever there isn't video playing. Also, not too sure you could do this, and have it not look like ass.

-Thom

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #5 on: July 18, 2013, 07:37:06 pm »
Thanks Thom

Not being some whizzbang scriptkiddie nor up to hacking Davis software this will have to stay on my dreamlist.

But thanks for clarifying

Dries
Core:Asus P8H77-V, Intel core i3-3240 LGA155, Inno 3D Nvidia 240 GT (DVI+VGA+HDMI), 4Gb ram, 125Gb SSD
MD: Zotax Zbox ID41

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Development process and tickets
« Reply #6 on: July 19, 2013, 03:17:23 pm »
Thom,

Process question:  In your example, would the same ticket number used to commit the template initially (thus reserving the template ID), be used when later committing the C++ code?  Or would a second ticket need to be created, because (ideally) the first is closed when the sqlcvs commit is completed?

On a similar note, let's say I had a GSD based template with a working (but not feature complete) driver, which I want to get out into the wild.  Would later commits use the same ticket, or a new one?

Just trying to understand what would work best for the core devs... Thanks! 

/Mike

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #7 on: July 19, 2013, 03:28:49 pm »
Thom,

Another question, more on the weather side this time.  I'm working on a GSD based driver for the ISY-994i from Universal devices.  It has a "climate module" (a paid for feature), which basically retrieves weather data from Weatherbug and exposes it via it's subscription channel (the means I'm using to integrate it to LMCE).  It works with their irrigation module (another feature module) to handle irrigation systems based on calculated water loss (using a variety of algorithms). It has the following data available to it:

   * Temperature 28.7 °F
   * Temperature High 33 °F
   * Temperature Low 28 °F
   * Feels Like 29 °F
   * Temperature Rate -0.5 °F
   * Humidity 78 %
   * Humidity Rate 3 %/h
   * Pressure 29.86 inches
   * Pressure Rate 0.05 inches/h
   * Dew Point 22 °F
   * Wind Speed 0 mph
   * Wind Average Speed 0 mph
   * Wind Direction NNE
   * Wind Average Direction NNE
   * Gust Speed 0 mph
   * Gust Direction ESE
   * Rain Today 0 inches
   * Light 0 %/h
   * Light Rate 0 %/h
   * Rain Rate 0 inches/h

I've been mulling away thinking about how to integrate it properly.  The thought I had was to create a "Generic Weather Station" template, use that as a child device of the ISY, and push data into it using events.  Would that be a sensible way to proceed, or do you have other thoughts on that?

Thanks for your time!

/Mike

Refs:
Climate module: http://wiki.universal-devices.com/index.php?title=ISY-99i_Series_INSTEON:WeatherBug
Irrigation module: http://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Using_the_WeatherBug_Irrigation_Module

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #8 on: July 19, 2013, 05:46:36 pm »
With Regards to Tickets, it doesn't matter much, we just need to match up sqlCVS comments with their respective tickets. Typically once I do a commit, I close the respective ticket.

As for the weather side of things, yes, a Generic Weather Station pushing events would be sensible. The Weather Plugin would intercept them, and keep state straight.

The goal here is to have Orbiter ask for the data via the Get Data method to the Weather Plugin, which will be used to fill in the appropriate information.

The thing that your weather interface needs to do, is also provide the general weather information on "Thunderstorms" etc.

Nominally, I am somewhat against having a dedicated weather station, because quite frankly, you can get a lot more data from outside services, and the different weather stations will only return some of the data that you would get from either a NOAA transmission, or Weather.com, etc. with regards to what not only is happening right now, but what will happen tomorrow, next few days, etc.

For a good indication of what I am going after, look at the screenshots for MythWeather.

-Thom

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Developing a Weather Plugin, videos
« Reply #9 on: July 19, 2013, 05:52:51 pm »
NOAA et al have the problem of not being widely usable. In my case, weather data can only be queried for a location 10mls away, which, quite often, is different from the local weather.

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #10 on: July 19, 2013, 06:21:51 pm »
Thanks Thom and Posde!

I'm familiar with MythWeather; in my case, it can leverage Environment Canada forecasts, and I have used it in the past.

Would the weather plugin be able to handle an aggregate of weather sources?  Let's say an internet forecast (like from Env. Can), plus real-time (or near real-time) conditions data from a local weather station or something like WeatherBug or WeatherUnderground?

Thanks!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #11 on: July 19, 2013, 06:26:21 pm »
hmm. always trying to make my life a living hell, hm? ;)

It could, priority device data could be added to the weather devices, so that devices with a higher priority would replace data from devices with a lower priority.

Please let's not feature creep this too much for a first version. Please.

-Thom

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #12 on: July 19, 2013, 08:23:36 pm »
hmm. always trying to make my life a living hell, hm? ;)
It's a talent...  ;D

Hey, I was just asking...  But if you could pull it off, it would probably make a lot of folks happy.  That way, anyone who had a local device (1-wire, Davis/Oregon Weather station, etc) could still benefit from local, relevant data, plus get a long-range type forecast with other meta-data (Radar/Sat imagery, 5 day forecast, etc).

Otherwise, there's always work-arounds... I've got a basement with lots of gaffers tape available...  ;D

Thanks!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #13 on: July 23, 2013, 06:41:24 am »
Is anyone watching these? should I keep making them?

It's an apt and honest question.

-Thom

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Developing a Weather Plugin, videos
« Reply #14 on: July 23, 2013, 06:54:19 am »
They are always appreciated, even if not watched right away.