Author Topic: Device templates  (Read 3252 times)

RayBe

  • Guru
  • ****
  • Posts: 315
    • View Profile
Device templates
« on: November 22, 2010, 03:24:10 pm »
Hi all,

I am in the middle of making a GSD-device for my Ocelot and a few device templates for my AV-gear (tv, receiver, cable box)
and have a few questions.

for my ocelot i use a usb to serial adapter must i still use the serial hack (http://wiki.linuxmce.org/index.php/Serial_Hack)
or is setting the comport to: /dev/ttyUSB0 sufficient?

in the plug & play section of the gsd-device how do i get the MAC-adress, where can i find it?

my approach for the GSD-ocelot-device:
i learn every ir-code i need in the ocelot, giving a device 50 memory locations.

i only use #384 Process Receive Command for Child field, in here i wrote a Ruby program that generates a serial-command that the Ocelot understands.
to generate this command i use:
- device_.childdevices_[cmd.devidto_].devdata_[12] to get the port-number, which i assign to the port-number of my Ocelot.
- cmd.id_ to get the command (http://wiki.linuxmce.org/index.php/Command_Table) fired within LinuxMCE to calculate the stored ir-position (wich one from the 50 of 1 device) in the Ocelot.
- cmd.devidto_ to get the device to determine if i must be in location 52, 102, 152 etc (every 50 is a deferent device).

my assumption was that when i add AV-devices it automatically generates a 'remote' in UI1 on a orbiter, so if i would press Move Up on a orbiter (which is cmd.id 200) my ruby-prog would pickup this signal and send the appropriate command to the Ocelot.

But there are no 'remotes' generated.

am i seeing things wrong? or did i forget to configure something?
in the AV-device section what comport must i use?

br,
Raymond



When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Device templates
« Reply #1 on: November 29, 2010, 09:13:25 am »
When creating an AV template, it is important to specify that the device provides an input. (This is done when you first set up the template, and can be changed on the screen where you enter the Ruby codes).

-Thom