Ok, here's a quick update.
This version doesn't use the eg.ThreadWorker class, instead it uses threading.Thread directly.
I was also looking at the sleep capability. I knew that if the machine was awake, the remote's power button would generate an IR code that eg could use. Because of that, I thought that my service would need to handle some sort of event to wake from sleep. But it turns out that only devices are kept awake and able to wake the computer, and the Mce IR device is already set up to do that. So wake from sleep just works. And, since EG has actions for putting the machine to sleep already, they can be triggered by the Power event if desired. One more thing off the list, and no coding required! I love it when that happens.
Also, I changed the install code to remove ...DA, ...DB and ...DC registry codes for CodeSetNum. I'm hoping that fixes the problem BitMonster had.
The new version is attached.
Bitmonster wrote:
Today I get the following message on Windows 7 RC 32bit every time:
Code:
Plugin: Microsoft MCE Remote - Vista/Win7
MCE_Vista: Run started
MCE_Vista: Connect started
MCE_Vista: MceIr pipe is not available, app doesn't seem to be running
Will continue to try to connect to MceIr
Message = Alle Pipeinstanzen sind ausgelastet.
The last message means something like "all pipe instances are utilized". But the plugin still works.
The following message should appear later in the log: "MCE_Vista: Connected to MceIr pipe, started handling IR events", which is output if the client can't connect initially (which prints your message), but is able to connect later. What usually happens is that EG was started/stopped, with the service still running. The service only accepts one connection, which is kept open until a write fails. If EG was started/stopped with the connection open, starting EG again will hit this condition. But once a write fails, which should happen on any new IR signal hitting the receiver, the service tries to connect again and everything will start working. The only alternative would be to have the service periodically try to some sort of "heartbeat" message to tell if the connection goes down, which seemed like overkill.
Bitmonster wrote:
It is really nice, the plugin uses the eg.IrDecoder. But it looks like I have to fine-tune the decoder in the future, so it works as reliable as the original decoder.
??? It is the original decoder. I'm not sure what you mean. I do know that my USB-UIRT seems a bit more reliable, but I just assumed that was differences in the accuracy of the device measuring the IR pulses. Do you mean eg.IrDecoder needs to be tweaked for this device?
Bitmonster wrote:
Do you have any plans to work on the blasting stuff also? It is to long ago that I have looked into the old code of the old replacement driver of Bruno Fleurette, but it looked like the blasting would use the same format as the receiving (these continues 8-bit streams). If we would have an interface to this blasting feature, it would be time to create some kind of generic eg.IrEncoder.
I don't think this would be hard to add, but the particular Mce Receiver I have doesn't have the blaster ports. Yes, the original code had hooks for this, and the format for output should be similar to the input to eg.IrDecoder. Does most of the EG code already exist for the USB-UIRT blast functionality?
Brett