I am sending my iphones pitch and yaw to eventghost to attempt to use it as a mouse control on my HTPC.
UDP broadcasts come as "yaw", "value" and "pitch", "value"
Is it possible to set the mouse position on screen with variable data coming from events with the mouse plugin?
It's been a loooong time since I have done anything new with eventghost. I was actually stunned to see the Onkyo serial plugin as part of the distribution that I wrote so many years ago.
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.
Mouse plugin
Re: Mouse plugin
I'm trying to do a python command with the payload
eg.plugins.Mouse.MoveAbsolute(eg.event.payload)
How do I need to format the eg.event.payload line for the mouse plugin?
eg.plugins.Mouse.MoveAbsolute(eg.event.payload)
How do I need to format the eg.event.payload line for the mouse plugin?
Re: Mouse plugin
I was able to figure it out.
eg.plugins.Mouse.MouseAbsolute(int(eg.event.payload[0]),int(eg.event.payload[1]))
I created a "magic" remote as part of my home CommandFusion remote on our iphones. It uses the gyro data from the iphone to figure out where your iphone is pointed and moves the mouse cursor around on the TV screen with mouse click as well as scroll wheel dragging on the right side of the screen.
eg.plugins.Mouse.MouseAbsolute(int(eg.event.payload[0]),int(eg.event.payload[1]))
I created a "magic" remote as part of my home CommandFusion remote on our iphones. It uses the gyro data from the iphone to figure out where your iphone is pointed and moves the mouse cursor around on the TV screen with mouse click as well as scroll wheel dragging on the right side of the screen.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Mouse plugin
OK that just sounds pretty bad ass i must say..
I will guarantee there is no other HA software that would allow that to be possible.
Now here is the real cool thing about something like that..
A lot of TV's come with remote controls that either have a joy or use a gyroscope. Samsung TV's are one of them. I know how to control the mouse movements on Samsung TV's. So you can do the same thing as what you did except it would move the native mouse for the TV.
I will guarantee there is no other HA software that would allow that to be possible.
Now here is the real cool thing about something like that..
A lot of TV's come with remote controls that either have a joy or use a gyroscope. Samsung TV's are one of them. I know how to control the mouse movements on Samsung TV's. So you can do the same thing as what you did except it would move the native mouse for the TV.
Re: Mouse plugin
Commandfusion demo allows a single page without paying. If thereÔÇÖs interest IÔÇÖll break the mouse control out of my full remote and make a demo zip file available
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Mouse plugin
I messed about with this some. There are some simple apps available that will transmit the accelerometer and the gyroscope data from an android device to a PC. The interpretation of the data is the complex part and putting in place smoothing routines to get rid of "float". The really hard part is calibration.. There needs to be some kind of a calibration routine in order to set the angle of travel. If you take a TV and it is a 60" that is 5 feet away. the angle of travel for your arm is going to be much greater then the same TV at 15 feet. so in order to keep the mouse pointer in line with where you are pointing the "remote" this needs to be accounted for. Toss in there the resolution of the screen and now it gets to be some pretty complex math. Mouse movements are comprised of acceleration factor, max speed and angle of travel so those numbers would need to be calculated correctly. I have looked and there is not a single "air mouse" app for an android device that takes these factors into consideration. it assumes you are using it on a PC monitor.. I have a 3 monitor setup on my PC so the angle of travel is about 90 degrees where as if I had a single monitor it would be about 25 degrees. because the apps available use a pre defined set of metrics for say a 1920 x 1080 screen at some unknown screen size the apps do not properly handle the cursor to device locations. They also do not take into account multiple monitors. so from 0, 0 for a location with is the upper left hand corner of my primary monitor i have one to the left and one to the right so the actual screen area is -1920, 0 to 3840, 1080 this shifts the cursor movement from the device movement.
You also have the biggest issue is that not a single one of these applications is designed for single hand use. they have the left and right buttons out of reach of a thumb and it could cause you to drop the device if you are trying to use it single handed which is how you would use the thing.
I am not an android developer I would not know how to go about making a proper GUI for the device.. If someone has that knowledge then we can work together and hammer this out no problem. I love the idea of being able to do this But I do not have the time to learn development for android.
You also have the biggest issue is that not a single one of these applications is designed for single hand use. they have the left and right buttons out of reach of a thumb and it could cause you to drop the device if you are trying to use it single handed which is how you would use the thing.
I am not an android developer I would not know how to go about making a proper GUI for the device.. If someone has that knowledge then we can work together and hammer this out no problem. I love the idea of being able to do this But I do not have the time to learn development for android.
