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

bushtech

  • Veteran
  • ***
  • Posts: 98
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #15 on: July 23, 2013, 11:55:15 am »
Yep, watching with bated breath :)
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
Re: Developing a Weather Plugin, videos
« Reply #16 on: July 24, 2013, 04:37:56 am »
I watched your first one on the weather plugin, which triggered the followon discussion.  Got the GSD Set Device Data stuff working; still plugging away on other template features.

Thanks!

/Mike

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Developing a Weather Plugin, videos
« Reply #17 on: July 24, 2013, 11:19:05 am »
Is anyone watching these? should I keep making them?

It's an apt and honest question.

-Thom
Yes, and YES.
Excellent video. Darn, if only I'd watched this before I mucked about with sqlCVS the first time.

coley

  • Guru
  • ****
  • Posts: 492
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #18 on: July 24, 2013, 12:58:42 pm »
Is anyone watching these? should I keep making them?

It's an apt and honest question.

-Thom
Yep watching and learning, thanks for doing these.
-Coley.

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #19 on: July 24, 2013, 04:48:48 pm »
Yes, and YES.
Excellent video. Darn, if only I'd watched this before I mucked about with sqlCVS the first time.
+1  ;)

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: Developing a Weather Plugin, videos
« Reply #20 on: July 24, 2013, 09:54:51 pm »
I just watched this first video. I've found that without a primer like this, I've flailed around too long and hard to get anything done. This is already helping. Thanks!

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #21 on: July 24, 2013, 09:56:19 pm »
Dude, you realize you can come on IRC, in the -devel channel, and just ASK me questions, right? ;)

-Thom

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: Developing a Weather Plugin, videos
« Reply #22 on: July 24, 2013, 10:05:54 pm »
Yeah, I do. I guess I'm just mule headed some times. :-\

I've finally caught up on integrating all the devices that I own (except for my stupid ZWave controller that never seems to work right) and I now need to start developing more stuff. I should hop back onto creating the devices that you asked about a while back.

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #23 on: July 25, 2013, 04:31:12 am »
It's an apt and honest question.

-Thom

Thom,

You've put your finger right on the problem...

Code: [Select]
sudo apt-get install thom
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package thom

So, until then, I think I can safely say we all appreciate your videos (even if we don't get to them right away), because they walk us through the complexities of the internals of LMCE.  Now that you're a new dad (congrats BTW, she's adorable!), you'll start to learn that a lot of what you do now won't always be immediately visible or rewarding, but often lays the foundations for others to grow in their own way, at their own pace.  Us newbies playing at being devs need a mentor, one who will be patient with us, let us make our mistakes or try to figure things out for ourselves; that's how we'll really learn it.

Cheers!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #24 on: July 27, 2013, 05:13:39 am »
A new video has been uploaded:

This one shows the Orbiter side of things, and the relevant code in the Weather Plugin that intercepts events. The only part I didn't show (I forgot to put it in there) was the code for Get_Weather_Data...nothing special there, you can see it in src/Weather_Plugin, it just gets the data out of the weather data map, and returns it, in addition to calling CMD_Set_Variable() to set the Orbiter variables. It knows where to send the message, because the Orbiter is sending the Get Weather Data Message, (the Orbiter Device ID becomes the From device).

Variable substitution is shown, as is an explanation of Alternate Graphic files, and how they are used with Set Graphic Image, to provide the iconic display.

Let me know if you have any questions,
-Thom

LennyB

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Box-Admin
Re:
« Reply #25 on: July 27, 2013, 09:39:28 am »
Wow another great video Thom.  I think the background audio might be a little loud in some places as it drowned out your voice and made it difficult to hear clearly, but you can still get the gist of it in those parts anyway. Thanks for your time in
making these, they are really valuable.

. LennyB



Sent from my Nexus 4 using Tapatalk 4 Beta
The key to killing two birds with one stone is: A big stone and small birds

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #26 on: July 29, 2013, 11:49:14 pm »
Adding some stills, this time from the 3-day forecast. Note the button group to select views is now available, but they currently are not active.

Alternate graphic IDs are used to turn button states on/off, without disturbing any of the other graphics.

-Thom




tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #27 on: July 30, 2013, 12:01:01 am »
This is the test harness script, that I am using to test the Weather Plugin, as you see, it's just MessageSends:

Code: [Select]
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "location" 30 "Denton"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "data_age" 30 "Data Updated: 32 seconds ago."
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condtext_day1" 30 "Sunny"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condtext_day2" 30 "Cloudy"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condtext_day3" 30 "Partially Cloudy"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condicon_day1" 30 "2"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condicon_day2" 30 "4"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "condicon_day3" 30 "6"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_hi_day1" 30 "91°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_lo_day1" 30 "73°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_hi_day2" 30 "84°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_lo_day2" 30 "71°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_hi_day3" 30 "87°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "temp_lo_day3" 30 "74°F"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "dow_day1" 30 "Monday"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "dow_day2" 30 "Tuesday"
/usr/pluto/bin/MessageSend localhost 0 -1001 2 91 35 "dow_day3" 30 "Wednesday"

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #28 on: July 30, 2013, 04:35:37 am »
Looks good Thom!

I've got a question for you: is there a global installation option anywhere that specifies the user's desired unit of measurement?  You're showing all your temps in Fahrenheit, and some of the thermostat GSD's are hardcoded for Celcius... There is a template parameter for Temperature measurement units, but that's device specific, not installation wide.

Thanks!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Developing a Weather Plugin, videos
« Reply #29 on: July 30, 2013, 05:18:21 am »
This is being discussed. Most likely it will consist of adding parameter for unit to commands and events, as well as device data in the climate plugin to specify display units.