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
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jspeckman

#16
Developers / Re: GSD network connection help
February 03, 2008, 04:41:39 PM
Hi all,
  I've got a new version of the weather code.  I've had this code running for a while now, just haven't had time to post it.  I was going to post it now, but everytime I try I get a error message saying 'Cannot access attachments upload path'.  I did a search, but no solutions to this were found.  Anyway the auto retrieval code is working, and I fixed the problem I was having with the editor removing my xml tags.  Since it was part of a regex I simply used the tag I am searching for without the first '<'.  The editor likes it and the regex code finds only the data I'm looking for.  Also added some more logging.  I've had it running for a couple days now and it seems well behaved so far.  I'd like to start adding data retrieval now so that other devices (and hopefully events) can get weather data whenever they want it, rather than waiting an hour to see if something changed.

Thanks,
Jason
#17
Developers / Re: GSD network connection help
January 23, 2008, 11:40:03 PM
Made a couple of changes.  I'm currently testing the code with the register as message interceptor removed to see how things work.  I also added some code to the idle loop to automaticly get weather updates every 15 past the hour.  I'll post the new code once it's been tested a bit.  I've also run into an odd problem that maybe someone can elighten me with an answer or pointer.  The ruby editor in the admin site is deleting parts of my code when I hit the update button.  Half of the xml tags were missing, I added them back in, clicked update and they were gone again???  They're part of the regex and I really need them to stay.  Does the editor know something I don't?  It seems to think it's smarter than me (maybe it is).  Ideas?

Thanks,
Jason
#18
Developers / Re: GSD network connection help
January 20, 2008, 10:21:18 PM
You guys are correct, it's supposed to set up a message interceptor for climate messages.  Honestly I don't really understand it.  I copied the formating from step 14 in the plain text dce messages tutorial  replacing security event (84) with climate event (10).  However after reading your replies and looking in the database again, it appears that security events should be (9).  Like I said I don't really understand what is going on, but I try what I think works and hopefully you guys who've been writing the more complex devices can help me out.

Thanks,
Jason

PS I did find I had incorrect event numbers in the other 2 messagesend commands.  Weather changed  and temperature changed.  I have corrected those to so far.
#19
Developers / Re: GSD network connection help
January 20, 2008, 02:30:10 AM
For the shell command to messagesend?  It's the only way I know how at the moment.  I haven't quite figured out how to use the command function yet.  I'm also not entirely sure if the command function supports all the same options as messagesend.  So for now I stuck with what I know to have it working faster.  I would like to do away with as many system calls as possible.

Jason
#20
Developers / Re: GSD network connection help
January 19, 2008, 06:23:06 PM
OK, here's what I've got so far.

Jason
#21
Developers / Re: GSD network connection help
January 19, 2008, 12:46:44 AM
Hi again,
  I answered one of my questions and solved one problem.  You can include libraries and this fixed my connecting to website problem.
Now on to passing data.  Should I post what I have so far here, in a new thread or start a new wiki page for it?  I'm asking 'cause I don't know which is best and where it will benefit the most people.

Thanks,
Jason
#22
Developers / Re: GSD network connection help
January 18, 2008, 05:15:35 PM
Thanks for the input.  I had given some thought to child devices, but hadn't gone any further with it.  I wanted to ask first.  All my previous work is over in the plutohome wiki.  I'd be happy to start a page over here.  Retrieving data would also be useful for sunrise/sunset as well.  I have need for knowing when say a half hour before sunrise is.  I know currently those times are calculated in one of the plugins (forget which one) and an event fires off at that time, versus being stored for retrieval at any time.

Jason
#23
Developers / GSD network connection help
January 18, 2008, 03:13:24 PM
Hi all,
  I'm in the process of rewriting a weather plugin that I had written a while back and need a little help.  The plugin goes out to weather.gov to retrieve the current weather conditions.  Originally I did this by having ruby shell out to a perl script to do the actual work.  The perl script in turn used lynx and grep to get the info, parse it with regex's and the insert the data directly into the database.  I'm now working on redoing the entire thing in ruby.  I wrote a test version as a ruby script (stand alone with no linuxmce functions)  that uses net/http.  This works fine.  Now I'm putting the code into linuxmce and have run into a small snag.  I'm trying to use conn_ to connect to the website, but don't really know how to use it.  I've looked at the panasonic ip camera code, as well as other examples and all of the connect to user defined ip addresses.  Is this the only way?  Can I use additional ruby libraries with the embedded ruby?
  Also, what is the best way to retrieve data from my device.  Here's an example of with I want to do: Weather device retrieves weather conditions once an hour.  If there is any change since last time, an event is fired off.  A respond to event is setup to shut off my outdoor fountain if an event is received from the weather device that it is now raining or there is lightning.  This is working in the old version no problem.  What I want to add is when the timed event to turn the fountain on happens, I would like to check the weather device for if it is currently raining or whatever and not turn the fountain on if the weather is already bad.  Is this possible?

Thanks,
Jason
#24
Developers / Re: Audio only Xine player for lmce
November 15, 2007, 04:23:07 PM
Sounds like the audio only xine player has come a long way.  I am all about not reinventing the wheel.  Does it still require creating a fake md?  What all if-then-else's need to be added and where?  The squeezeslave is supposed to be able to sync to each other and/or it's hardware counterparts.  The benefit over not being written in java is that it should be able to stay in sync and not suffer any lag or other performance issues.  As to syncing with xine players I do not know.

Jason
#25
Developers / Re: Audio only Xine player for lmce
November 15, 2007, 03:14:22 PM
Hi all,
  Just thought I'd throw in my 2 cents.  I was working on using JACK and mplayer under pluto to achieve multi zone audio on the core under pluto.  I recently built an mce core that I'm in the process of migrating to.  Even though I got a working jack plugin, I never got anywhere with the mplayer plugin due to my lack of c++ knowledge.  Anyway I'm currently looking into using squeezeslave as a solution.  It's a command line only counterpart to softsqueeze.  The good thing is it's written in c.  The bad thing is it only supports oss and not alsa or jack, so out of the box it doesn't support breaking up the sound card(s) into multiple channels.  I'm investigating workarounds for this as I think this would be easier than a new plugin from the ground up.  If you guys think an audio only xine player is the way to go, great.  I'd like to help out any way I can with getting some kind of multi zone core audio solution up and running.

Thanks,
Jason