ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#22168 - 10/18/10 01:01 AM LinuxMCE
RayBe Offline
newbie


Registered: 10/18/10
Posts: 3
hi all,
i have a ocelot, my goal is to get it working with LinuxMCE through a so called GSD-device driver, http://wiki.linuxmce.org/index.php/GSD

i found the CPU-XA Protocol.

i want to use the ocelot just as a ir sender/reciever;
sending the ir codes (stored in linuxmce, NOT internal ocelot) to my tv for example. the ocelot works so to say as a USBUIRT.

what command/protocol should i use?

is anybody familiar with LinuxMCE who is willing to help me?
or is there anybody who can point me in the right direction?

Thanks a lot,
br,
Raymond

Top
#22173 - 10/23/10 04:45 PM Re: LinuxMCE [Re: RayBe]
bvnoldguy Offline
journeyman


Registered: 07/20/10
Posts: 50
I visited the LinuxMCE web site. Looks neat, but what is it (not "what does it do")? Is it an RPM, a platform, A piece of Iron (hardware) or some combination of the above? The "user friendly stuff" is terribly confusing. I would like to know more.
---
My house server has no serial ports. I am using a $10 USB / serial adapter. The platform is CentOS 5 (Red Hat Enterprise Linux) which means that the distro is a bit behind the times in the name of stability. No special drivers were needed. It appeared as "/dev/ttyUSB0".
---
Since my service is running as a "no special privileges" userid, I had to add the serial port owner group to the userid. No problems with SELinux. I can send you the Python code for the serial port.
---
I've never used the IR stuff {the Ocelot lives in lights out wiring closet} but the serial port commands are:
Send local IR
<90 / 0x5A> <0> <0> <0>
Learn IR
<91 / 0x5B> <4560 / frequency> <0> <0>
Send Remote IR
<92 / 0x5C> IR# LSB> <0>
Select IR # for upload
<93 / 0x5D> <0> <0> <0>
Fetch IR data
<94 / 0x5E> <0> <0> <0>
---
My guess is that The Ocelot needs to own a mirror of your IR "data base"

Top
#22176 - 10/23/10 05:20 PM Re: LinuxMCE [Re: bvnoldguy]
bvnoldguy Offline
journeyman


Registered: 07/20/10
Posts: 50
Well, since it ships as an ISO, it must be a platform. Why would one choose it over another distro?. FYI, my CentOS server is headless - no human interface. The hardware cost $140 US with 2gB of RAM, plus the drives (about $250 US for a pair of Seagate 2tB drives). If I didn't need all the on-line storage, I would have used a $170 Acer AR1600. Also, the hardware is a complete overkill (except for the storage which is ~75% used).
---
What do you want the Ocelot to do for you? The primary reason I have one is reliability. My house server has a UPS, which it shares with the Ocelot. The configuration is set to run the server for 15 minutes (without external power) and the Ocelot for another hour.

Top
#22177 - 10/24/10 03:24 AM Re: LinuxMCE [Re: bvnoldguy]
RayBe Offline
newbie


Registered: 10/18/10
Posts: 3
hi bvnodguy,
thanks for your reply.

LinuxMCE is a domotica-system, a total house controlling appliance.
see http://www.linuxmce.org

Send Remote IR
<92 / 0x5C> IR# LSB> <0>
brings up a few questions, i am a complete newbie but willing to learn.
how must i read all the parameters:

1- 'send remote ir' does this command mean i can send a ir-code to the serial-port wich the ocelot will send to a ir-emitter?
2- '92' does it mean anything or is it just a command?
3- '0x5C' does it mean anything or is it just a command?
4- 'IR#' what do i have to put here and where do i get it?
5- ' LSB' what do i have to put here and where do i get it?
6- '0' what is this?

my goal is to use GSD (see my first post) to send ir-codes to the serialport wich are then send by the ocelot to a specific ir-emitter.

you suggested something else that sounds very interesting:
'My guess is that The Ocelot needs to own a mirror of your IR "data base" '
7- how do i do that?
8- i asume that every ir code i have has a number inside the ocelot, how would a serialcommand look if i wanted to send the ir code from say position 777 of my data base?

thanks upfront
br
Raymond

Top
#22179 - 10/24/10 06:03 PM Re: LinuxMCE [Re: RayBe]
bvnoldguy Offline
journeyman


Registered: 07/20/10
Posts: 50
Thanks for the references. They have proven very informative. Never heard of a domotica system before. Much to learn!
---
By the way, A few years ago, I tried to convert to Myth-TV. The effort became a non-starter. I already had 10 years of customizing my setup that would have to be undone. My system had three layers (Myth-TV had only two). 3 DVR hosts in the back-end, 8 hosts in the front end, and the house server in the middle. The house server uses WOL to power the DVR's up and xppi (a form of XML) to instruct the DVR's as to what they should record. At the end of the recording cycle, the DVR's would export the recordings to the house server and shutdown.
---
I've posted a private message to you so I can send you some stuff too large to post.
- I've answered your questions (as best I can) at the end of this post.
---
I've poked around a bit on the Web. It seems that LinuxMCE is a special purpose distribution of the Ubuntu persuasion, in the same sense that MAC OS-X is a special purpose distro of BSD Linux (AKA Darwin). 99.9% of the stuff posted on the Ubuntu forums applies directly to Fedora (my preferred platform) as well. Kubuntu uses the KDE UI, whereas Fedora, Red Hat (RHEL), and Ubuntu use Gnome. I have a lot of KDE apps, and they run, without modification, in the Gnome UI. KDE is more Windows like & Gnome is more MAC like; but, who cares?
---
I also guess that an ideal host (hardware system) for this distro would be something you would hook up to a TV as a media controller. A tablet host, like an iPhone or iPad also seems to be appropriate. The distro seems to be quite proficient at HID (Human Interface Device) multiplexing {doing the same thing, but with many different HID types}.
---
I've tripped over some things called Pluto and Orbits. Too complicated for my brief introduction. What I have figured out is that there is a lot of Python, and thus - a lot of Python support, in the distro. There is, also, an ongoing migration to Java for the screen design tools. Some random factoids.
- Android is Java oriented,
- while the upcoming Chromium OS is Python oriented.
- There is a dialect of Python called Jython that runs in the JRE {Java Runtime Environment}
- Python is named after Monte, of Holy Grail fame. Really! Truly!! No kidding!!!
- QT is an OSF (Open Software Foundation) widget factory owned and supported by Nokia, which makes .... QT is bound to both Java and Python.
- The UI of the OLPC (One Laptop Per Child) is 100% Python.
- You might be wondering as to why I mention these factoids?
---
When it comes to making an Ocelot a back end, programmable controller, there are two approaches, both based on Mark A. Day's XALIB.
---
The first, which appears to be the simplest (until you really start to use it) is an RPC (Remote Procedure Call) approach. A sort of Q&A, if you will. What is in Var #3?, send IR #5! kind of thing.
---
The second, requires an external command queue (a button queue if you like), where each value in the range of 1 to 65535 (0x0001 to 0xFFFF) represents a request of some kind. An Ocelot VAR is set aside for the queue. When the VAR is zero, the next "button" command is sent (via the serial port).
---
Why the second approach? Simplified latency and synchronization management! The Q&A approach often looses an incoming Q while processing an earlier Q or vise-versa. This leaves you with three choices: 1) random, unpredictable behavior, 2) reject the incoming Q if the Ocelot is busy, or 3) building a more complicated queuing mechanism.
---
I did look up GSD from your post. Sounds like a software wrapper for the /dev/tty... Linux device (COMn for Windows :-). I use the pyserial package (another software wrapper), because I implemented in Python.
---
- the stuff I posted is a series of serial port Ocelot device orders in byte stream form.
- 92 in decimal is 0x5C,
- LSB == Least Significant Byte. To send a 256 (0x0100) to the Ocelot, you send a <0x00> and then a <0x01>. AKA {MSB ==> Most Significant Byte}. There are exceptions to this rule :-(
- 0 ==> 0x00
---
I do use IR in my home theater, but not with the Ocelot - so my understanding is NOT based on any significant experience. It's mostly guesswork and a tiny bit of experience.
---
The Ocelot's atomic unit of IR is a full IR sequence (non Ocelot device command). These sequences can uploaded and downloaded via the serial port. There has been no mention of supporting any specific standard. You would have to examine the contents of a few sequences to determine that. Also, I'm sure the wizards at ADI can help with this.
--
Once the library of IR sequences is uploaded to the Ocelot, the IR transmission can be triggered via the serial port. The ADI modules also accept IR sequences; but they have to match patterns on hand, to be recognized. The IR event can be retrieved via the serial port. The published Ocelot limits that I have, are: sequences 1 thru 80 can be sent or received, and sequences from 81 thru 65535 can only be sent. Changing the Ocelot's on-board IR sequence "library" re-boots the Ocelot. Bummer! No, on the fly, revisions to the IR sequence "library".
---
Thus, you would need to "calculate" the Ocelot equivalents of your LMCE IR sequence database, where IR #777 matches the key 777 of the LMCE and export the results (mirror) to the Ocelot. You would, by necessity, have to organize your LMCE DB to live within the constraints imposed by the Ocelot to make this work. My ADI C-Max docs are probably not up to date.
--- TTFN


Edited by bvnoldguy (10/24/10 06:25 PM)
Edit Reason: missing info

Top
#22189 - 10/29/10 12:06 PM Re: LinuxMCE [Re: bvnoldguy]
bvnoldguy Offline
journeyman


Registered: 07/20/10
Posts: 50
H'ha!! I've figured out what LinuxMCE is. It's a DCE domain with the LinuxMCE Core as the domain controller. Nice packaging, very sophisticated under the covers. Very straightforward to deploy, if your objectives line up with the LMCS's goals - which are well defined on the wiki.
---
Scripting language seems to be Ruby. My Python "cpuxa.py" should convert to Ruby in a straightforward manner, because it does not contain the IP bind of Mark A. Day's xalib. The languages are quite similar. The Ocelot / cpuxa.py needs to be incorporated into a DCE compatible network interface.


Edited by bvnoldguy (10/29/10 12:11 PM)

Top
#22191 - 10/31/10 12:13 PM Re: LinuxMCE [Re: bvnoldguy]
RayBe Offline
newbie


Registered: 10/18/10
Posts: 3
what would be the best option?

1;
store all of my ir-codes in the ocelot and let LMCE send those codes from within the ocelot when needed?

2;
let LMCE control/store all of the ir-codes and when they need to be send, the signal would go from lmce to serial port then to ocelot then to ir-emitter.

i am complete newbie here so sorry for the maybe dumb question \:\)

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 49 anonymous users online.
Recent Posts
Ocelot not working
by JPO
11/08/17 06:02 AM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4004 Topics
23442 Posts

Max Online: 132 @ 11/13/16 10:07 AM
November
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30