PC Remote Controller

Questions and comments specific to a particular plugin should go here.
Post Reply
olejek85
Posts: 5
Joined: Sun Oct 16, 2016 8:25 pm

PC Remote Controller

Post by olejek85 » Sat Oct 29, 2016 2:54 pm

Hi people! I need your help!
I have this device
Image
and I think it is a full analog remote for which you created the plugin "PC Remote Controller"
whether it is possible to modify the plug your PC Remote Controller to control my work with him?
I tried to edit the __init__.py : replaced hardwareId and guid on my device! plug-in runs and is the following message ...
Image
click yes - getting errors
Image
here is the information of my remote:
Device Name: \\?\HID#VID_1D57&PID_AD02&MI_00&Col02#7&221b3d42&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
***************** TYPE HID ******************
Vendor Id: 1D57
Product Id: AD02
Version No: 261
Usage for the device: 0001
Usage Page for the device: 000C
********************************************
Thank and sorry for my english;)

User avatar
kgschlosser
Site Admin
Posts: 3407
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: PC Remote Controller

Post by kgschlosser » Sat Oct 29, 2016 3:24 pm

remote control input for windows works one of 2 ways. as emulated keyboard presses. or the Microsoft EHome drivers. need to know which this uses. you can look in your devicemanager and if you see USBCIR driver or MIcrosoft ehome driver then it's the latter and you will use the MCE Remote windows 7 plugin. and to install that plugin i always tell people to do this process because it seems to work and gets everything installed properly.


remove any plugins from EG that you installed to control the remote. close EG.

go into you your device manager and uninstall any drivers for the remote. DO NOT UNPLUG THE REMOTE leave it plugged into the usb. keep the remote havnd and have the receiver in a place that you can send command to the receiver via the remote.

restart you computer. while the computer is restarting. as soon as you see the windows logo. pick a button on the remote any button. and keep pressing it while it is aimed at the receiver. keep on doing it even after windows has loaded. you should hear a bunch of device installation sucessfull installation tones. the same sound when you plug in a usb device. keep pressing until you hear a couple of them.

if you hear a device unplugged tone something went wrong.

once done. then you want to run eventghost as an administrator. you can do this by right clicking on the icon and click on run as administrator from the menu.

then install the MCE Remote Windows Vista/7 plugin. and in the configuration for the plugin you will then install the Alternate MCE IR Service once that service is installed you can then close EG and and start it again as a normal user.... now depending on the remote you are using and whether or not it uses the standard MCE ir codes. you may or may not get events in the log. if not you will need to go and create a new macro with the action Learn Remote Codes. i typically like to set the thing to 5 for the number of successful codes. make sure you are in a spot where you have no LED Lights, or Fluorescent lights or Mirrors and best not to do this directly in front of your monitor. this is all due to things like stray IR which LEDs give off IR as does Fluorescent Lights and mirrors and reflective surfaces will cause bounce. (the receiver receiving multiple codes) you will only have to do this one time but we want to make sure that every code is nice and clean. you will also want the receiver 3" from the front of the remote. i usually put my finger on the button get them in position and then put a hat or a shirt over the remote and receiver. it seems to be the easiest way.

and when you earn the code press the button like you would normally do when using it to control say a TV. you will see the successful counter go up. do that for each and every button.

if you have a remote that doesn't not use the microsoft standard set of ir codes you will not get pretty looking events in the log telling you what button you pressed you will get an event showing you the code instead. that being said. IR codes come in different "Flavors" there is NEC JVC SONY SAMSUNG and so on and so forth. and each flavor will have multiple types. now some "Flavors" and "Types" have a rotating code pattern NEC is like this. so when you press play for instance a code will come up. if you press play again it's a different code. but it will switch back and forth between them. so you may have to tinker with the code learning a little bit in order to get every single code if that is the case. You also will be able to use any remote that sends IR you are not stuck with the limited number of buttons and the cheap and cheezy feel of an MCE remote. so if you have a box of older remotes you no longer have the device it goes to. (like i do) find one that better suits you and you like how it produces events in Eventghost and go with that one.

The "Old Style" MCE remote is emulated keyboard pressses. ICK!!!!. but it works. and I know nothing about really. but you will use the original MCE Remote Plugin for this type. now here seems to be a 3rd kind of remote that keeps on showing up and it uses a serial interface. you are on your own with this one. they all seem to be different and really have no standard and they come with their own driver. now you may get lucky and have somehting like the Tira Plugin work or the X-10 Remote plugin. but you are going to have to go throu them and try

Good luck.
If you like the work I have been doing then feel free to Image

User avatar
topix
Experienced User
Posts: 390
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: PC Remote Controller

Post by topix » Mon Nov 07, 2016 4:48 pm

There seems to be a bug in the code. As seen in the screenshot the line 329 of WinUsb.py is the problem. As a first workaround you could edit the file and change "wt" to just "w". After that, try again the driver installation.

olejek85
Posts: 5
Joined: Sun Oct 16, 2016 8:25 pm

Re: PC Remote Controller

Post by olejek85 » Wed Nov 09, 2016 11:50 am

Thanks topiks! it really works! I edit the file WinUsb.py and replaced the "w" in it "wt" and After that, the driver installation completed successfully!
Image
Аnd now he is in the system!
Image
But to my disappointment, EventGhost showed you next error "Error starting plugin: PC Remote Mini Could not open driver!" (
Image
Any ideas what to do next? Thanks!

User avatar
topix
Experienced User
Posts: 390
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: PC Remote Controller

Post by topix » Wed Nov 09, 2016 5:23 pm

Now i'm out. :oops: The WinUsb script tries to load the dll to connect to the remote, but fails. Using dll's is beyond my knowledge. Sorry.

olejek85
Posts: 5
Joined: Sun Oct 16, 2016 8:25 pm

Re: PC Remote Controller

Post by olejek85 » Wed Nov 09, 2016 7:09 pm

I did it!)
The problem was in the version EventGhost
After uninstall EventGhost EventGhost 0.5.0-beta4 and install EventGhost 0.4.1.r1722 plugin worked! but do not work all the buttons!
I think i need edit __init__.py so to replace first_code codes on my remote control buttons code:

BUTTONS = {
# first_code: (number_of_codes_to_ignore, name_of_the_event)
(1, 0, 30, 0): (0, 'Num1'),
(1, 0, 31, 0): (0, 'Num2'),
(1, 0, 32, 0): (0, 'Num3'),
(1, 0, 33, 0): (0, 'Num4'),
(1, 0, 34, 0): (0, 'Num5'),
(1, 0, 35, 0): (0, 'Num6'),
(1, 0, 36, 0): (0, 'Num7'),
(1, 0, 37, 0): (0, 'Num8'),
(1, 0, 38, 0): (0, 'Num9'),
(1, 0, 39, 0): (0, 'Num0'),
(1, 0, 13, 0): (0, 'Enter'),
(1, 0, 41, 0): (0, 'Escape'),
(1, 0, 42, 0): (0, 'Backspace'),
(1, 0, 43, 0): (0, 'Tabulator'),
(2, 0, 28, 0): (0, 'PageUp'),
(3, 0, 78, 0): (0, 'PageDown'),
(1, 0, 79, 0): (0, 'Right'),
(1, 0, 80, 0): (0, 'Left'),
(1, 0, 81, 0): (0, 'Down'),
(1, 0, 82, 0): (0, 'Up'),
(1, 1, 18, 0): (0, 'Open'),
(1, 4, 43, 0): (1, 'SwitchWindows'),
(2, 4, 61, 0): (1, 'Close'),
(1, 5, 4, 0): (5, 'Music'),
(1, 5, 5, 0): (5, 'MyMovies'),
(1, 5, 6, 0): (5, 'MyPhotos'),
(1, 5, 7, 0): (5, 'MyTV'),
(1, 8, 0, 0): (1, 'Start'),
(1, 8, 7, 0): (1, 'Desktop'),
(1, 8, 8, 0): (1, 'MyPC'),
(3, 35, 2, 0): (0, 'WWW'),
(3, 48, 2, 0): (1, 'FullScreen'),
(3, 138, 1, 0): (1, 'E-mail'),
(3, 181, 0, 0): (1, 'NextTrack'),
(3, 182, 0, 0): (1, 'PreviousTrack'),
(3, 183, 0, 0): (1, 'Stop'),
(3, 202, 0, 0): (1, 'Forward'),
(3, 203, 0, 0): (3, 'Rewind'),
(3, 205, 0, 0): (1, 'Play'),
(3, 226, 0, 0): (1, 'Mute'),
(3, 233, 0, 0): (0, 'VolumeUp'),
(3, 234, 0, 0): (0, 'VolumeDown'),
(6, 129, 0, 0): (0, 'Power'),
}

question - how do you know the code of all the buttons?

User avatar
topix
Experienced User
Posts: 390
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: PC Remote Controller

Post by topix » Wed Nov 09, 2016 9:15 pm

olejek85 wrote:The problem was in the version EventGhost
After uninstall EventGhost EventGhost 0.5.0-beta4 and install EventGhost 0.4.1.r1722 plugin worked! but do not work all the buttons!
Great! Then i will take a look at the weekend and try to find out what's different between 0.4 and 0.5.

User avatar
topix
Experienced User
Posts: 390
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: PC Remote Controller

Post by topix » Sat Nov 12, 2016 8:46 pm

After some testing and trying i possibly found the problem: It seems that the WinUsbWrapper.dll that comes with EG 0.5 is broken. When i use the dll from 0.4 i get events.

Post Reply