Realtime decoding of IR signals
Posted: Mon Jun 29, 2020 4:13 pm
I want to start off by saying hello. I am new to this forum sp please excuse my ignorance as to where this post should actually go. It fits into several different categories.
I am the administrator of an application called EventGhost. I am sure that a few of you have heard of it. I am updating the IR capabilities in EG (EventGhost) one of the updates gets rid of the Windows service(alternatemceir.exe) for the MCE transceivers. This was a problematic approach and has caused all kinds of varying issues over the years. I needed to be removed/replaced. I wrote a python binding to the IR API in Windows as the replacement.
The second thing that needs a face lift is the IR decoding capabilities. The number of protocols that EG currently supports is limited and I wanted to expand on this.
The first thing I had looked at doing is locating a decoder that supported the majority of the protocols available and was written in C. The only thing I was able to locate was code that is attached to a device of some type whether it be an Arduino or an ESP Wifi chip. I needed something that was only a decoder and nothing else. It needed to be able to be compiled into a dll. I was not able to locate such a thing.
So then I began looking at 3rd party software that I could run from the command line. feed in the RLC and have it spit out the decoded information. While there is software that does this it cannot be used in realtime decoding. The ones that i found that provided a large enough list of supported protocols were coded in java. and the VM takes to long to start up. Keeping it running is also not an option because of the JVM's lack of releasing unused resources back to the OS. It also has to large a resource footprint to keep running for what it does.
I was not able to locate an ir decoder that is written in Python and had no reliance on other software like WinLiRC (which is no longer developed).
I have now had to shift gears into writing a python decoder/encoder. The project is only going to have a single purpose to decode and encode. it has 0 attachments to any other software and 0 attachments to any kind of a device.
I first started writing an IRP parser and realized that there could be issues with it and it would be a big headache to debug the thing. I decided on writing a base class that handles the bulk of the work. for protocols that have some unique things to them or there are only a small number of protocols that may share a way it decodes I elected to handle these decodes in a subclass of the decoder. going this route is easier to debug if there is a problem. a change is not likely to break everything and I have been able to add encoding and decoding for approx 136 protocols in < a weeks time.
There are a few protocols where I am having a hard time understanding the IRP and how to apply it to the RLC. If someone would be willing to provide me an education it would be most helpful. The protocols I am having an issue with I am sure you already know which ones they are , here is the list.
Epson
Grundig
GWTS
Humax 4 Phase
Lutron
Nokia
PCTV
PID 0083
Sejin
pretty much the protocols that have timings like this
<8,4|4,4|2,4|1,4>
and also like this.
<-1|1>
I believe the timings that are like this <8,4|4,4|2,4|1,4> represent
00
01
10
11
and I think the protocols that have timings like this <-1|1> would be a series of bits that would be the mark or space divided by the applicable timing.
I am going to spend some more time tinkering to see if I can figure it out. I tried applying my first thought to the Grundig16 protocol with no success. maybe it will work with a different one. I se that the Grundig16 protocol has an explanation for it bit I do not understand what it means.
Any help would be greatly appreciated.
Thanks again
Kevin
I am the administrator of an application called EventGhost. I am sure that a few of you have heard of it. I am updating the IR capabilities in EG (EventGhost) one of the updates gets rid of the Windows service(alternatemceir.exe) for the MCE transceivers. This was a problematic approach and has caused all kinds of varying issues over the years. I needed to be removed/replaced. I wrote a python binding to the IR API in Windows as the replacement.
The second thing that needs a face lift is the IR decoding capabilities. The number of protocols that EG currently supports is limited and I wanted to expand on this.
The first thing I had looked at doing is locating a decoder that supported the majority of the protocols available and was written in C. The only thing I was able to locate was code that is attached to a device of some type whether it be an Arduino or an ESP Wifi chip. I needed something that was only a decoder and nothing else. It needed to be able to be compiled into a dll. I was not able to locate such a thing.
So then I began looking at 3rd party software that I could run from the command line. feed in the RLC and have it spit out the decoded information. While there is software that does this it cannot be used in realtime decoding. The ones that i found that provided a large enough list of supported protocols were coded in java. and the VM takes to long to start up. Keeping it running is also not an option because of the JVM's lack of releasing unused resources back to the OS. It also has to large a resource footprint to keep running for what it does.
I was not able to locate an ir decoder that is written in Python and had no reliance on other software like WinLiRC (which is no longer developed).
I have now had to shift gears into writing a python decoder/encoder. The project is only going to have a single purpose to decode and encode. it has 0 attachments to any other software and 0 attachments to any kind of a device.
I first started writing an IRP parser and realized that there could be issues with it and it would be a big headache to debug the thing. I decided on writing a base class that handles the bulk of the work. for protocols that have some unique things to them or there are only a small number of protocols that may share a way it decodes I elected to handle these decodes in a subclass of the decoder. going this route is easier to debug if there is a problem. a change is not likely to break everything and I have been able to add encoding and decoding for approx 136 protocols in < a weeks time.
There are a few protocols where I am having a hard time understanding the IRP and how to apply it to the RLC. If someone would be willing to provide me an education it would be most helpful. The protocols I am having an issue with I am sure you already know which ones they are , here is the list.
Epson
Grundig
GWTS
Humax 4 Phase
Lutron
Nokia
PCTV
PID 0083
Sejin
pretty much the protocols that have timings like this
<8,4|4,4|2,4|1,4>
and also like this.
<-1|1>
I believe the timings that are like this <8,4|4,4|2,4|1,4> represent
00
01
10
11
and I think the protocols that have timings like this <-1|1> would be a series of bits that would be the mark or space divided by the applicable timing.
I am going to spend some more time tinkering to see if I can figure it out. I tried applying my first thought to the Grundig16 protocol with no success. maybe it will work with a different one. I se that the Grundig16 protocol has an explanation for it bit I do not understand what it means.
Any help would be greatly appreciated.
Thanks again
Kevin