Good day,
I purchased an LG Smart TV and the magic remote "AN-MR500G" comes bundled with it. So I started looking around on how to use the magic remote with its gyroscope capability to control my HTPC.
It connects to Windows normally through Bluetooth HID and label it "LGE Magic Remote MR14" as a Bluetooth HID mouse. Naturally, no interactions at all from the remote with Windows after pairing.
I launched EG and added the Generic HID plugin and choose LG Magic Remote checking the "Trigger Enduring events for buttons" and once I press OK, a stream of input keeps rolling in the log as shown in the image attached.
I was wondering how to go from here and try to get the remote`s buttons and gyroscope functionality to work with EG.
Thank you and have a Happy New Year!
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.
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.
Generic HID - LG Magic Remote
Re: Generic HID - LG Magic Remote
read read read, break, fix, repeat.
read more.
gyro remote sounds fun.
good luck.
read more.
gyro remote sounds fun.
good luck.
eventghost.net
Be there or be square.
Be there or be square.
Re: Generic HID - LG Magic Remote
Hi Zian,
Thank you for the quick reply.
Any pointers or hints ? I wouldn`t mind a link or two to read them
... I searched the forum a couple of times and googled the subject thoroughly but currently I am stuck.
For example... Why the HID.Values are ascending even though I kept the remote stationary to limit any readings.. I am assuming a lot of data is being transmitted i.e.: gyro data. button data, battery status and so on.
Thank you for the quick reply.
Any pointers or hints ? I wouldn`t mind a link or two to read them
For example... Why the HID.Values are ascending even though I kept the remote stationary to limit any readings.. I am assuming a lot of data is being transmitted i.e.: gyro data. button data, battery status and so on.
Re: Generic HID - LG Magic Remote
The remote looks like it IS working with EG (see left side of your images?)
What do you want EG to do?
That would be the right side of your images.... Event/config tree.
You have nothing there but the one.
FILL it. Do stuff.
Add plug in's, add programs, add tasks... do stuff.
Drag and drop.
http://www.eventghost.net/docs/
http://www.eventghost.net/mediawiki/ind ... =Main_Page
What do you want EG to do?
That would be the right side of your images.... Event/config tree.
You have nothing there but the one.
FILL it. Do stuff.
Add plug in's, add programs, add tasks... do stuff.
Drag and drop.
http://www.eventghost.net/docs/
http://www.eventghost.net/mediawiki/ind ... =Main_Page
eventghost.net
Be there or be square.
Be there or be square.
Re: Generic HID - LG Magic Remote
zian wrote:The remote looks like it IS working with EG (see left side of your images?)
What do you want EG to do?
That would be the right side of your images.... Event/config tree.
You have nothing there but the one.
FILL it. Do stuff.
Add plug in's, add programs, add tasks... do stuff.
Drag and drop.
http://www.eventghost.net/docs/
http://www.eventghost.net/mediawiki/ind ... =Main_Page
I agree with you that it seems that EG is working with the remote. However, the events keeps scrolling fast in the log (left side of the image) even when I leave the remote on the disk i.e.stationary. I would like to be able to control mouse cursor when the remote is moved (take advantage of the gyroscopic function of the remote). Is there any link to where I can link gyro and axis of the mouse X, Y. Or even to start understanding the data flowing from the remote ?
Thank you for the links. I tried linking HID.Values from the log to the Mouse->Move absolute and also with Move Relative but to no avail. Obviously I do not understand the meaning of the values the remote is generating.
Thank you again Zian.
Re: Generic HID - LG Magic Remote
So I figured that I am not getting something helpful with the "Trigger Enduring events for buttons" so I changed it "Use Raw Data as event name".
I am attaching a picture illustrating my findings... Obviously the raw data shows that the remote sends a block of data with several bytes ...Each byte is responsible for sending a particular output from the remote. I am not aware of the significance of each byte yet.. Hopefully someone who knows would help ..that would be greatly appreciated. The bytes I am aware of by now are the red underlined in the picture "8044" corresponds to "OK" or enter button and "8007" which corresponds to the left button... by continuing the trials I can get all the codes of other buttons that is no problem... but I still do not know which parts corresponds to the X and Y axis of the gyroscope.
At this stage ...any help would be truly appreciated...
I am attaching a picture illustrating my findings... Obviously the raw data shows that the remote sends a block of data with several bytes ...Each byte is responsible for sending a particular output from the remote. I am not aware of the significance of each byte yet.. Hopefully someone who knows would help ..that would be greatly appreciated. The bytes I am aware of by now are the red underlined in the picture "8044" corresponds to "OK" or enter button and "8007" which corresponds to the left button... by continuing the trials I can get all the codes of other buttons that is no problem... but I still do not know which parts corresponds to the X and Y axis of the gyroscope.
At this stage ...any help would be truly appreciated...
Re: Generic HID - LG Magic Remote
At this stage, I am half way through understanding the bytes that LG Magic Remote sends through the Bluetooth HID, but I have no Python background to make a python script comparing hexadecimal strings and linking the results to EG actions. If anyone is willing to help writing the python code I could continue testing and come up with the rest of the used bytes which I do not understand yet.
Re: Generic HID - LG Magic Remote
Gyro to me = someplace in space = Damn near infinite possibilities, codes, signals...
=
Goodluck infinatim
=
Me smart allic.
=
Goodluck infinatim
=
Me smart allic.
eventghost.net
Be there or be square.
Be there or be square.
Re: Generic HID - LG Magic Remote
Hi Zian,
I managed to start a python script which can now check if the value 8044 is pressed or not.
For some reason I can not interact directly with the Mouse plugin and have to let the script call an event linked to the Mouse plugin.
When I am testing the script now...if I press the "OK" button I get the left mouse click .. but the script is only ON when I am testing it.
I have two easy questions which I hope you can help me with.
1- How to get the python script to always "listen" to eg.event.suffix ? since I am getting continuous events, I want the script to be always checking the new values.
2- Is there a way to directly access the Mouse plugin so I can start working on the relative and absolute movement of the mouse ?
Thank you
I managed to start a python script which can now check if the value 8044 is pressed or not.
Code: Select all
newValue = str(eg.event.suffix)
test1 = newValue[10:14]
if test1 == '8044':
eg.TriggerEvent("LeftMouseBtn")
else:
print "NO"
When I am testing the script now...if I press the "OK" button I get the left mouse click .. but the script is only ON when I am testing it.
I have two easy questions which I hope you can help me with.
1- How to get the python script to always "listen" to eg.event.suffix ? since I am getting continuous events, I want the script to be always checking the new values.
2- Is there a way to directly access the Mouse plugin so I can start working on the relative and absolute movement of the mouse ?
Thank you
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Generic HID - LG Magic Remote
1) add an event with just a star (*) to the macro
2) use the famous 'Copy As Python' command and paste the result into your script. As example for Mouse actions, this is how it will look
2) use the famous 'Copy As Python' command and paste the result into your script. As example for Mouse actions, this is how it will look
Code: Select all
#move the cursor to center of screen
eg.plugins.Mouse.MoveAbsolute(None, None, None, True)
#move the cursor to position x=8, y=15
eg.plugins.Mouse.MoveAbsolute(8, 15, None, False)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM