Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

New way to get MCE Remote signals in EG (for Vista/Win7)

If you have a question or need help, this is the place to be.
Post Reply
predatorftp
Posts: 42
Joined: Tue Aug 11, 2009 3:09 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by predatorftp »

Brett,

I have a bug report :|

the 1st port doesn't work and both option doesn't work too.

I switched the button to port 1 and the emitter didn't work while on port 2 it works 100% !
With radio button "Both" - none of the ports work.

I guess it's a simple fix.

Daniel
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

Bitmonster wrote:Just a quick note:
You will never be able to get each and every IR code working with the MCE blaster. The devices hardware simply isn't capable of reproducing every protocol. For example, it has no function for changing the modulation frequency.
So don't expect to much from the blaster capabilities. The USB-UIRT is much better in this aspect.

If you want to dive deeper in the theory of IR protocols, you can start here:
http://www.sbprojects.com/knowledge/ir/ir.htm
Understood. That said, I found a page at Westinghouse that lists codes to get my tv to work with many, many different remote controls out there. I'm attaching the pdf but you can also view it at the website: http://www.westinghousedigital.com/remotecodes.aspx and then clicking the link for LVM-37w1.

Is there anyway to use these simple codes to then figure out the correct pronto codes?

The document lists codes for almost 100 remote controls, so it must be using a relatively standard format no?

What can the usb-uirt do that the MCE blaster can't?
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by stottle »

@jitterjames -
I'll take a look at the code for having the device removed. That should be fixable. Besides uninstall/install, so could restart the device.

@predatorftp -
I thought I tested that, but I'll take a look. You've got blasters in both ports? What do you get when you run the GetBlasterInfo action?

@jitterjames (regarding the westinghouse remote) -
I tested the modes listed (Raw, RC5, RC5X, RC6) by setting up a USB-UIRT and my Mce receiver pointing at each other. I created a transmit action in the USB-UIRT and checked what EG detected from the Mce receiver. Then I input the same pronto code in an MceRemote action, and made sure the USB-UIRT/EG detected the same thing. As I said before, the pronto code you listed didn't work in the USB-UIRT, so I think its an invalid code (also, the 2nd four digits are supposed to be a frequency. 0000 is not a valid frequency, 0073 is 36000 Hz - a very common frequency). I have code for RC6A, but the USB-UIRT won't transmit those, so it is untested (BTW, the IRSS code is incorrect for RC6A as well).

As for learning, given the variations on decoding implementations (see eg.Classes.IrDecoder classes for some examples), that is a complex problem, and I'd be glad for some glad. Speaking of which....

@Bitmonster - how the IrEncoder coming?

Brett
predatorftp
Posts: 42
Joined: Tue Aug 11, 2009 3:09 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by predatorftp »

brett,

when using the "Get mce transveiver blaster ..." i get "Blaster Data: 6"

I have both ports occupied

I need help with finding pronto codes for my TV - remote central doesn't have what i need i could only find the on \ off commands for my TV and i am looking for the HDMI inputs select codes.

anyway whats the type of codes the service uses ? is it discreet or pronto (sorry for the confusion)

My TV is: LG LCD 42LG60FR

thanks.
Daniel
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by stottle »

predatorftp wrote:when using the "Get mce transveiver blaster ..." i get "Blaster Data: 6"
Ok, I know what the problem is. I'll get a fix out as soon as I can.
predatorftp wrote:I need help with finding pronto codes for my TV - remote central doesn't have what i need i could only find the on \ off commands for my TV and i am looking for the HDMI inputs select codes.
Since there isn't a learn function yet, I'm not sure what to tell you if RemoteCentral doesn't have codes. What does EG produce when it detects the codes you want?
predatorftp wrote:anyway whats the type of codes the service uses ? is it discreet or pronto (sorry for the confusion)
The services basically uses the on/off times (I guess that would be discrete?).

Brett
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

@predatorftp: are you able to get the hdmi commands working using "transmit last received code"?
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

back to me and my needs. :D

OK, by removing the first three sets of 0000s I am actually able to send some commands to my TV. Only some of them work and some do the wrong thing so the problem here is just that I've got a list of pronto codes for a similar tv but not mine. Well I knew that anyway.

So I've established that MCE can talk to my TV, but the problem is that I can't learn the pronto codes properly, so without a proper list of codes I am screwed. Actually I figured out most of the codes I need, but not "power" which is pretty key. If the idea is to get rid of the 2nd remote, I need to switch the power on and off!

So maybe I can assist you some way in developping a better way to figure out the pronto codes?

First I'm going to try "transmit last code" with one of the buttons that I know works... I'll let you know.
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

Here's the line of code that I added to try to display the pronto code when I press point my remote at the mce and press a button.

the new line is in red.

def HandleData(self):
"""
This runs once a connection to the named pipe is made. It receives the ir data and passes it to the plugins IRDecoder.
"""
if self.sentMessageOnce:
eg.PrintNotice("MCE_Vista: Connected to MceIr pipe, started handling IR events")
nMax = 2048;
self.result = []
self.codeData = self.lastCode = ""
self.readOvlap = win32file.OVERLAPPED()
self.readOvlap.hEvent = win32event.CreateEvent(None, 0, 0, None)
handles = [self.plugin.hFinishedEvent,self.readOvlap.hEvent]
while self.keepRunning:
try:
(hr,data) = win32file.ReadFile(self.file,nMax,self.readOvlap)
except:
win32file.CloseHandle(self.file)
self.file = None
return
rc = win32event.WaitForMultipleObjects(handles, False, win32event.INFINITE)
if rc == win32event.WAIT_OBJECT_0: #Finished event
self.keepRunning = False
break
try:
nGot = self.readOvlap.InternalHigh
if nGot == 5 or nGot == 9: #Query result, not ir code data
eg.result = data
if data[0] == "b".encode("ascii"):
self.BlasterData = unpack(ptr_fmt,data[1:nGot])[0]
win32event.SetEvent(self.blasterEvent)
continue
self.codeData = self.codeData + data[0:nGot]
vals = unpack_from((nGot/4)*"i",data)

for i,v in enumerate(vals):
a = abs(v)
self.result.append(a)
if a > 6500: #button held?
#eg.PrintNotice("Sending ir code %s"%str(self.result))
print (pronto.ConvertIrCodeToProntoRaw(36000,self.result))
self.plugin.irDecoder.Decode(self.result, len(self.result))
from_back = (i+1)*4 - nGot
if from_back < 0:
self.lastCode = self.codeData[:from_back]
self.codeData = self.codeData[from_back:]
else:
self.lastCode = self.codeData
self.codeData = ""
self.result = []
except:
pass
eg.PrintNotice("MCE_Vista: Handle Data finished")


I think it works for my dvd remote, but not the TV. I get output but it's all wrong. maybe I need to change the 36000 to something else?
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

@Brett: the parameter in your ConvertIrCodeToProntoRaw is called freq, so I guess I need to get that number right in order for the function to work. You said: " 0073 is 36000 Hz - a very common frequency)" certainly I always get back codes that start with 0073 from the function regardless of the remote I am using.

all the codes that work on my westinghouse start with 006D. What frequency would that be? The code for "power" starts with 0071 but it's the only one in the list with that number, so it might be wrong.

sorry my small brain can't find away to convert 0073 to 36000 or I would do the math myself!

or am I way off on this anyway?
predatorftp
Posts: 42
Joined: Tue Aug 11, 2009 3:09 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by predatorftp »

jitterjames wrote:@predatorftp: are you able to get the hdmi commands working using "transmit last received code"?
No, transmit last received code doesn't work for me at all. I am going to try your peace of code in the .py and tell you what happened :)

Edit:
Well i did your trick to show the pronto code and copy paste it to the send pronto code - and it doesnt work for sure it gives a series of hex codes that doesn't look anything like the kind of codes that worked.

Example:
This is the code to turn ON my TV (ripped off a ccf file for central)
0000 006D 0022 0002 0157 00AB 0016 0015 0016 0015 0016 003F 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 003F 0016 003F 0016 0015 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 0015 0016 0015 0016 003F 0016 0015 0016 0015 0016 0015 0016 003F 0016 003F 0016 003F 0016 003F 0016 0015 0016 003F 0016 003F 0016 003F 0016 0015 0016 0015 0016 05F3 0156 0055 0016 0E4D

This is the code to turn OFF my TV (ripped off a ccf file for central)
0000 006D 0022 0002 0157 00AB 0016 0015 0016 0015 0016 003F 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 003F 0016 003F 0016 0015 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 003F 0016 0015 0016 003F 0016 0015 0016 0015 0016 0015 0016 003F 0016 003F 0016 0015 0016 003F 0016 0015 0016 003F 0016 003F 0016 003F 0016 0015 0016 0015 0016 05F3 0156 0055 0016 0E4D

This is the code I get from showing the pronto code in the log:
0000 0073 0000 0002 004F 0012 0D8F 2710
0000 0073 0000 0001 0141 2710
0000 0073 0000 0002 004F 0012 0D8F 2710

I don't understand it ether.

@Brett
I guess my question wasn't clear enough, I found the CCF file that allowed me to extract (using the tool you gave us) a hex code that allowed me to turn off and on my TV (using the "Send pronto code" macro), so now i am looking for the codes to operate the HDMI inputs.
I found one code that allows me to change to HDMI-1 but i don't find the rest of them in remote central.

In order to help me find that code i need to know what type of codes the "send pronto code" accepts. some of the terms i encounter are "discrete" "pronto" "Philips" "pcf" and so on.
I want to know what to look for because i am completely confused :(
thanks for finding the bug and fixing it :) --> you are the man !
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

that looks similar to what I am getting back (3 lines that start with 0073) and my tv pronto codes also start with 0000 006d.

hopefully Stottle will have a brainwave.

If it helps I can compile a list of pronto codes and the corresponding pronto codes that come back from the function, but I'll wait in case that's just a waste of time.

I'm getting the feeling now that this should be possible if we can figure out the correct way to call the convert function, and maybe the function needs some modification to work with a wider range of codes. Certainly I'm feeling that the mce is capable of at least generating the codes, so it can probably decode them too with the correct software.

nothing worth doing is ever easy right? There are some other opinions in this house as to what's "worth doing" though...

J.
predatorftp
Posts: 42
Joined: Tue Aug 11, 2009 3:09 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by predatorftp »

News,

I managed to solve my needs from the blaster point of view. but i still didn't find a good CCF with the exact codes i need. but i am more than satisfied.

I am at your service for further verifications and tests.

Daniel
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by stottle »

Ok, I'm trying to catch up....

First off, anyone do any java programming? I don't, but I found the tonto project and it has java source code. It is able to read and write CCF files, which include the pronto codes but also the UI information that is used by the remote. I was able to decipher part of it, but I couldn't find where it pulled out the pronto codes (at by just looking at the code, I don't have an IDE set up to debug java). It would be great to be able to read CCF files and pull out all of the pronto codes automatically, if someone could help with that.

If anyone is interested, the tonto page is here, and the source download is the java class zip on this page.

As for the frequency, the Mce Remote doesn't tell what frequency the ir was collected at. So I just use 36000. The pronto codes include the freq, so I can send that back to the receiver during transmit. But received codes always get 36000.

The formula for freq is
freq = int(1000000/(prontoCarrier*prontoClock))
where prontoClock = 0.241246
and prontoCarrier is the 2nd value in the pronto code, converted from hex to decimal. So 73 = 115 decimal. freq = int(1000000/(115*.241246)) = int(1000000/27.74329) = 36044.

6D = 109 (decimal) => freq = 38028.

@predatorftp -
Ok, your question makes a lot more sense. I thought you meant "I can't find a particular pronto code. Can you find it for me?" Honestly, I know the code understand pronto format, but I don't know what other formats are out there, or how to convert between them.

Brett
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by jitterjames »

Ok. So bottom line, we need to know the pronto code. There is no way to "learn" it using the MCE receiver.

Is that right?
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: New way to get MCE Remote signals in EG (for Vista/Win7)

Post by stottle »

jitterjames wrote:Ok. So bottom line, we need to know the pronto code. There is no way to "learn" it using the MCE receiver.

Is that right?
Until code for learning is developed, you need the pronto code. Right now that is certainly easier. Is it possible to develop a method to learn the codes? Yes, but nobody has developed it for EG.

Brett
Post Reply