LinuxMCE Forums
May 25, 2013, 04:42:14 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
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
 
   Home   Help Search Chat Login Register  
Pages: [1] 2
  Print  
Author Topic: Ruby GSD codes help  (Read 2749 times)
digitaldan
Newbie
*
Posts: 13


View Profile
« on: September 30, 2008, 03:21:38 pm »

Hi I'm very close to releasing a ruby/GSD interface to HAI's ( http://www.homeauto.com ) Omni line of home automation controllers.  As it stands I have the networking, 128 bit aes encryption, lights, security, thermostats and aux sensors working. I just have a few questions I'm hoping a GSD guru might help me out with.

1. How or who calls "#756 Report Child Devices" ? I can call this manually but I would assume LinuxMCE would do this for me.  My code will auto discover children, I would assume this is the right place to put it. Right now its not automatically being called.

2. On startup or reload LinuxMCE needs to know the state of lights, temps, etc.... Is this something that should be done in "#355 Process Initialize" or is there another method for reporting state?  If so, again what triggers linuxmce to do this?

3. How or where can I found out how methods are called and who calls them? I don't understand the relationship between  "command groups", "events" and the "device category" and how they effect what GSD methods get called and by what.  Could someone explain this a little more?

For what its worth my device is in the "Interfaces - Security Interface #80" and has the "Ruby Internal Commands" and "Security Panel" command groups.  It also has "Alarm panel mode change #67", "Reporting Child Devices #54" and  "Sensor Tripped #9" events.

Thanks!
Dan-

 
Logged
Amathus
Regular Poster
**
Posts: 37


View Profile
« Reply #1 on: October 01, 2008, 05:47:47 am »

I really wish I could help you technically, but I am a real dumb nut when it comes to code. However, I do resell HAI gear and would be VERY excited to test out the RUBY code once you have it finalised - PLEASE - Cheers.
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #2 on: October 02, 2008, 02:40:02 pm »

I would suggest sending a private message to ddamron. He is our resident GSD hacker.

-Thom
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2622


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #3 on: October 03, 2008, 05:47:34 pm »

3. How or where can I found out how methods are called and who calls them? I don't understand the relationship between  "command groups", "events" and the "device category" and how they effect what GSD methods get called and by what.  Could someone explain this a little more?

A little note on command groups etc. On the orbiter when you click a button, a commandgroup gets executed. This commandgroup can contain multiple Command entries, which in turn send messages to devices or device categories. The difference is for example, if you just want to turn off all media devices in a room, you don't send a message to a single media device, but to a group "Media Devices" (I don't know if such a group really exists, but you hopefully get my point). Events happen and execute command groups.

hth
rgds
Oliver
Logged

hari
Administrator
LinuxMCE God
*****
Posts: 2413



View Profile WWW
« Reply #4 on: October 03, 2008, 11:50:59 pm »

1. How or who calls "#756 Report Child Devices" ? I can call this manually but I would assume LinuxMCE would do this for me.  My code will auto discover children, I would assume this is the right place to put it. Right now its not automatically being called.
report child devices should send an event to lmce reporting all child devices. You can call this to report devices after you built a list at startup.

Quote
2. On startup or reload LinuxMCE needs to know the state of lights, temps, etc.... Is this something that should be done in "#355 Process Initialize" or is there another method for reporting state?  If so, again what triggers linuxmce to do this?
you usually send events for your child devices when e.g. a sensor is tripped or a light level changes.

Quote
3. How or where can I found out how methods are called and who calls them? I don't understand the relationship between  "command groups", "events" and the "device category" and how they effect what GSD methods get called and by what.  Could someone explain this a little more?
look at the dcerouter plugins.

best regards,
Hari
Logged

rock your home - http://www.agocontrol.com home automation
hari
Administrator
LinuxMCE God
*****
Posts: 2413



View Profile WWW
« Reply #5 on: October 03, 2008, 11:54:19 pm »

look at the apex destiny device template for some ruby security interface examples

best regards,
Hari
Logged

rock your home - http://www.agocontrol.com home automation
dlewis
Guru
****
Posts: 401


View Profile
« Reply #6 on: October 05, 2008, 08:11:37 pm »

DigitalDan,

Any updates on this? Got any screenshots? Thanks!

-D
Logged
digitaldan
Newbie
*
Posts: 13


View Profile
« Reply #7 on: October 06, 2008, 08:00:35 pm »

Thanks, I used the DSC security panel as a model which is very similar.   I am very close to releasing it, what I have left to do is error handling, temperature control and omni -> linuxmce events of lights, security, temps, etc....  Hopefully I have the hardest part behind me.  For the record this will require at least version 2.16 to work (i'm using the new TCP based protocol to talk with the omni pro).  I will let people know here when it is ready. 

One more question, when I report on devices LinuxMCE is appending the device type to the name and then truncating the name after 30 characters, for example when I report a child with the description "Garage Lights", LinuxMCE adds it as "Light Switch (dimmable) Garage".  How can I prevent it from appending the type to the name/description?
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2622


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #8 on: October 13, 2008, 03:02:21 pm »

digitaldan,

if you look at the pluto_main schema, you will find that column Description in table Device is 30 characters long.

rgds
Oliver
Logged

dlewis
Guru
****
Posts: 401


View Profile
« Reply #9 on: October 13, 2008, 03:18:16 pm »

Hey Dan,

Thanks for the update. Please keep us posted on the progress.

I spoke to some of the LinuxMCE dev guys. They said that 30 is the default in the database. You can edit the descriptions to your liking. Also, you can alter the schema of pluto_main, but this is not suggested. Larger descriptions don't make sense on the orbiters, as they would not fit on the UI1 buttons (as far as they know). Thanks again!

-D
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2622


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #10 on: October 13, 2008, 08:24:58 pm »

dlewis,

you are waaaay to slow.

rgds
Oliver

Smiley
Logged

digitaldan
Newbie
*
Posts: 13


View Profile
« Reply #11 on: October 13, 2008, 08:32:29 pm »

Thanks, the problem is not so much the length but that LinuxMCE is appending things like "Light Switch (dimmable)" to the front of the name and eating much of that 30 char limit.

I'm taking a little break from the ruby code to work on a second release of my iPhone app "H@me" as well as a Java/Apache Axis frontend to my omni (how cool would it be to have a web service enable home?).  I will post here once I come back and get it fully working.

D-
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #12 on: October 13, 2008, 08:40:34 pm »

This can already be done either:

(1) with the web orbiter
(2) from a mobile orbiter on a supported cell phone.

-Thom
Logged
digitaldan
Newbie
*
Posts: 13


View Profile
« Reply #13 on: October 13, 2008, 09:01:26 pm »

This can already be done either:

(1) with the web orbiter
(2) from a mobile orbiter on a supported cell phone.

-Thom


I meant web service as in rest, soap and json, specifically with all the features of my omni, not just the ones that LinuxMCE overlap with.  Once that happens then integration with other systems like linuxmce, xbmc, etc... become much easier.

D
Logged
dlewis
Guru
****
Posts: 401


View Profile
« Reply #14 on: October 13, 2008, 10:02:32 pm »

posde, I guess I am to slow... lol...

Dan, keep us updated on how this goes. Looks like you're working on some great stuff for LinuxMCE and the HAI Omni Pro...
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!