Author Topic: DCE device as a standalone ruby script  (Read 2962 times)

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
DCE device as a standalone ruby script
« on: December 11, 2008, 08:57:47 am »
I would like to build a DCE device with a scripting language, and because there is already a lot of ruby code for this that will be my choice. However I don't want to have it embedded like a GSD device and have the code stored in the database, I would like to have instead a standalone script in /usr/pluto/bin as I find it easier to work on than using the web GUI.

Which files can I include to benefit from the same method definitions as when running a GSD? Is there such a library of ruby methods that allow connection to the router, DB, send/receive messages and events ?

any pointers welcome...
(I so would like that the ruby/LMCE tutorial webcast had been recorded :)

On a related topic, when writing a DCE device, is it really bad to have it access the database directly? Or should I really stick to using DCE messages to get the info I need (list of lamps, rooms, etc)?

thanks !

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: DCE device as a standalone ruby script
« Reply #1 on: December 11, 2008, 05:38:59 pm »
Hi,

if I remember right, first Internet session for developers was doing something similar. Ddamron and Tschak led that session.
Don't know if it was recorded, but it would be nice. I'm also interested in skeleton for a standalone Ruby device.

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: DCE device as a standalone ruby script
« Reply #2 on: December 11, 2008, 08:48:38 pm »
Bulek,

I'm pretty sure it was not recorded because of technical issues. Next time, I suggest to use Webex. I'm just a bit biased ;)

Ddamron, Tschak, would you have something to get us started ?


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: DCE device as a standalone ruby script
« Reply #3 on: December 11, 2008, 09:16:09 pm »
the general info plugin e.g. has functions to get and set devicedata..

br, Hari
rock your home - http://www.agocontrol.com home automation