News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Developing a Weather Plugin, videos

Started by tschak909, July 18, 2013, 07:33:38 AM

Previous topic - Next topic

bushtech

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

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

Quote from: tschak909 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
Yes, and YES.
Excellent video. Darn, if only I'd watched this before I mucked about with sqlCVS the first time.

coley

Quote from: tschak909 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
Yep watching and learning, thanks for doing these.
-Coley.
~ 12.04 Alpha: [url="http://linuxmce.iptp.org/snapshots"]http://linuxmce.iptp.org/snapshots[/url]
~ 10.04 Final: [url="http://linuxmce.iptp.org/release/LinuxMCE-1004-final.iso"]http://linuxmce.iptp.org/release/LinuxMCE-1004-final.iso[/url]
~ My setup: [url="http://wiki.linuxmce.org/index.php/User:Coley"]http://wiki.linuxmce.org/index.php/User:Coley[/url]

mkbrown69

Quote from: jamo on July 24, 2013, 11:19:05 AM
Yes, and YES.
Excellent video. Darn, if only I'd watched this before I mucked about with sqlCVS the first time.
+1  ;)

WhateverFits

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!
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

tschak909

Dude, you realize you can come on IRC, in the -devel channel, and just ASK me questions, right? ;)

-Thom

WhateverFits

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.
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

mkbrown69

Quote from: tschak909 on July 23, 2013, 06:41:24 AM
It's an apt and honest question.

-Thom

Thom,

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


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

A new video has been uploaded: https://vimeo.com/71142359

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

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

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

This is the test harness script, that I am using to test the Weather Plugin, as you see, it's just MessageSends:


/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

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

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.