ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#15609 - 04/17/06 02:22 PM How can the Ocelot learn IR codes from OSX?
bobo Offline
newbie


Registered: 04/05/06
Posts: 1
Hi there,

I just got my shiny new Ocelot in the mail and have been playing with it via a usb-serial adapter on OSX. With a few simple modifications to XALIB 0.48, I got it to compile on OSX 10.4.6 with gcc 4.0.0 - which has allowed me to interface the cpuxa server through misterhouse. I can turn lights on and off through X-10, etc... neat! (even cooler when you consider the TTS and speech recognition built into OSX! And the new intel mini's only 600 bucks!) I am also currently playing around with HouseMonkey which seems pretty awesome so far.

My big outstanding issue however, is how am I going to get my Ocelot to learn new IR codes? I can't really use the C-Max software or any of those other windows only tools that let you upload custom files of IR codes. The reason I opted to go with the Ocelot was that I'm kind of pissed at having 5 remote controls for my entertainment system. My ultimate dream here is to just say "computer, tv on" and have the projector, stereo receiver, and Sattelite tuner all set to the right thing with the lights faded off and the channel changed to comedy central.

I was going to try to get Jay Hogg's IR-Tools package to compile under OSX, but the links I found googling for it seem broken:
http://www.2imagineit.net/ha/
http://mywebpages.comcast.net/ncherry/common/cpuxad/irtools-020.tgz

Does anybody know how I can go about learning IR codes from OSX?

thanks a bunch in advance
-Bob

Top
#15610 - 04/17/06 02:43 PM Re: How can the Ocelot learn IR codes from OSX? [Re: bobo]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
You can tell the Ocelot to learn a IR code by sending it a serial command. Look at the link for the serial protocol here (for for the "Learn IR" command):

http://www.appdigusers.com/forum/showflat.php/Cat/0/Number/187542/an/0/page/0#Post187542

If you already have a serial port utility that talks to the Ocelot (possibly the XALIB program you're referring to) then you would need to add support for the "Learn IR"
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15611 - 04/25/06 08:48 AM Re: How can the Ocelot learn IR codes from OSX? [Re: bobo]
Barry Parr Offline
journeyman


Registered: 02/15/04
Posts: 98
Loc: NZ
Another Option for IR is Processing the Data On The PC.
The Ocelot can Be Setup to Dump All IR Data Out The Serial Port.
If you have some skills in serial data IO & Understand The Format Of The IR Dump , It Can be a Very Usefull Feature.
checkout irmax for some info on the format.


It's just a case of Setting 1 or 2 parameters in the ocelot.
I don't have the param #s or values avail at the mo , but if you are interested , I will post them tomorrow.

Top
#15612 - 04/25/06 09:53 AM Re: How can the Ocelot learn IR codes from OSX? [Re: Barry Parr]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Barry, actually there is no need to modify any parameters for the purpose of saving LIR codes to file for modifying them with IR-Max. The parameters related to IR are parameters 17 and 18, which relate to notification messages when the controller receives and recognizes an IR code:

17 - Auto IR

0 = Off
1 = On
Send IR number when a comparison match exists, 0xFD (RX) or 0xFC (TX),IR_ number

18 - Send ASCII IR

0 = Off
1 = Send ASCII string on IR recognize + T000xxx where xxx = IR number recognized.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15613 - 04/25/06 05:45 PM Re: How can the Ocelot learn IR codes from OSX? [Re: Guy Lavoie]
Barry Parr Offline
journeyman


Registered: 02/15/04
Posts: 98
Loc: NZ
Hi Guy
When Auto IR is set to 3 , It will dump the received data.
200 bytes.
It's a while since I had used the feature , so I gave it a quick test.
This is what I got when I pointed the remote at the ocelot.

FE E4 70 8F 0D 8F 0D 8F 0E 8F 0D 8F 0D 8F 0E 8F
0D 8F 0D 8F 2A 8E 2A 8F 2A 8F 29 8F 2A 8F 29 8F
2A 8F 29 90 0D 8E 0E 8F 0D 8F 2A 8F 0D 8F 0E 8E
0D 90 0D 8F 29 8F 2A 8E 29 90 0D 8E 2A 8F 2A 8F
2A 8E 2A 8F 7E 7E 7E 7E 7E 7E 7E 79 FE E5 38 8E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E
7E 7E 7E 7E 7E 7E 7E 7E

Top
#15614 - 04/25/06 07:36 PM Re: How can the Ocelot learn IR codes from OSX? [Re: Barry Parr]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Oh that, yes I remember. That could be handy for someone who just wants to add a couple of new codes to his LIR file (using IR-Max) and wants to avoid the long process of saving the codes to a disk file. It would be really handy if there was a way to also send a single code to the controller in a similar manner with a serial command, either for immediate transmission or to add to the stored codes (with a specified code location number).
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15615 - 04/26/06 01:13 AM Re: How can the Ocelot learn IR codes from OSX? [Re: Guy Lavoie]
Barry Parr Offline
journeyman


Registered: 02/15/04
Posts: 98
Loc: NZ
Suppose I'm getting a bit off topic here ......

I just dusted off a Half finnished vb prog i wrote a Long time ago.

This is a Small portion Of a HUGE program.

These are some structures
'========================
Public Type typeLIRstruct
FreqModifier As Byte
DataPWM(0 To 199) As Byte
Filler(0 To 22) As Byte
Comments As String * 32
End Type

Public Type typeIRdata
SysMapName As String
LirData As typeLIRstruct
IncludeInThisUpdate As Boolean
PwmArray() As Long
End Type
Private mIRdata(0 To 1024) As typeIRdata

'=========================================
Private Function FillSndArray_AddChkSum(ParamArray ByteArray() As Variant) As Boolean
Dim X, ArrLen As Byte, CSum As Byte

ArrLen = UBound(ByteArray)
' wLog "FillSndArray_AddChkSum ArrLen", arrLen
ReDim SndByteArray(ArrLen + 1)

For X = 0 To ArrLen
SndByteArray(X) = ByteArray(X)
Next

CSum = Calc_Checksum(SndByteArray, ArrLen)

SndByteArray(ArrLen + 1) = CSum

End Function
'==============================================

This Isn't a function , just a section Of a piece of code.
Easy enough to modify ....

UpLoadThisIR:
With mIRdata(mCurrentIRid).LirData
lastone = -1

ReDim SndByteArray(0 To 263)
SndByteArray(0) = &HD5
SndByteArray(1) = 0
SndByteArray(2) = 0
SndByteArray(3) = &H87
SndByteArray(4) = &HB3
SndByteArray(5) = 0
SndByteArray(6) = .FreqModifier
lastone = 6
For X = 0 To 199
lastone = lastone + 1
SndByteArray(lastone) = .DataPWM(X)
Next
For X = 0 To 22
lastone = lastone + 1
SndByteArray(lastone) = .Filler(X)
Next
Do While Len(.Comments) < 32
.Comments = .Comments & " "
Loop
For X = 1 To 32
lastone = lastone + 1
SndByteArray(lastone) = CByte(Asc(Mid(.Comments, X, 1)))
Next

i = calc_crc(SndByteArray, 261)
SndByteArray(262) = i \ 256
SndByteArray(263) = i Mod 256
end with
'=======================
Then Send the SndByteArray
Ya get a 6,0,6 responce

Set The Address where the data is to go
'(LSB & MSB are Bytes so these calcs work)
LSB = mCurrentIRid Mod 256
MSB = mCurrentIRid \ 256

FillSndArray_AddChkSum &HC8, &H5D, LSB, MSB, 0, 0, 0

Then Send the SndByteArray
Ya get a 6,0,6 Responce

Job Done ... I Think ...

Someone from appdig might be able to verify I got right/wrong..
I may get inspired next week and test out a SIMPLE utility.

Top
#15616 - 07/11/06 11:41 PM Re: How can the Ocelot learn IR codes from OSX? [Re: Barry Parr]
David Norwood Offline
newbie


Registered: 11/20/03
Posts: 11
Loc: Thousand Oaks, CA
Sorry I'm a little late to this thread, but you can use nxacmd (part of xalib) to learn and send infrared codes.

I wrote the Ocelot interface for Misterhouse if you have any questions about that.

David

Top
#21177 - 06/24/09 12:19 PM Re: How can the Ocelot learn IR codes from OSX? [Re: Guy Lavoie]
emabonacchi Offline
junior


Registered: 03/12/09
Posts: 33
 Originally Posted By: Guy Lavoie
You can tell the Ocelot to learn a IR code by sending it a serial command. Look at the link for the serial protocol here (for for the "Learn IR" command):

http://www.appdigusers.com/forum/showflat.php/Cat/0/Number/187542/an/0/page/0#Post187542

If you already have a serial port utility that talks to the Ocelot (possibly the XALIB program you're referring to) then you would need to add support for the "Learn IR"


We are in 2009!!!

Today the user has NOT to be crazy with many configuraton!!!

If you spend MANY MANY MANY money buying something, you PRETEND to be able to use it even if you are not a genious!!!!

You are selling OLD products NEVER UPGRADED!!!

It's time you to upgrade the software controlling your products!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

W E A R E I N 2 0 0 9 ! ! ! ! ! ! ! ! !

Top
#22045 - 08/21/10 06:57 PM Re: How can the Ocelot learn IR codes from OSX? [Re: emabonacchi]
bvnoldguy Offline
journeyman


Registered: 07/20/10
Posts: 50
I have a working Python XALIB module in my Panther project - an upgrade to my 2002 Hyena project. It's been tested on Windows XP, CentOS 5 (rhel), Fedora FC-13. It has no GTK dependencies, so it should work on OS-X, but I have no test platform. The server app (pxa_server) is 100% Python 2.4 compliant and uses wxPython.
---
The pxa (Python XAlib) server is multithreaded (main, GUI, Ocelot, 8 @ inet). I got a lot of help from the wxPython support team.
---
Anybody interested?

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 64 anonymous users online.
Recent Posts
Cmax Message: Failed to set data for a 'delay'
by John Vomastic
07/03/17 10:14 PM
Shout Box

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

Max Online: 132 @ 11/13/16 10:07 AM
July
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 31