Pulse-Eight CEC +

Questions and comments specific to a particular plugin should go here.
tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Mon May 28, 2018 1:10 pm

Hi kgschlosser,

First of all, thanks for your work with evenghost and the pulse-eight plugin.
I have been using pulse-eight with eventghost for the last 4 years, to remote control my HTPC using Samsung Remote TV.
This weekend I lost my mind and spent 1200€ on a OLED LG C7V :D

I decided it was a good idea to upgrade eventghost and licec, but after trying different versions of eventghost , libcec , Pulseeight plugin I am still getting error messages on EG.
To be honest, I am now kind of lost what versions should I use.

Last combination was:
EventGhost_WIP-2018.05.06-11.06.16_Setup.exe
libCEC-4.0.2.zip (downloaded from first page of this forum)
PulseEightPlus-0.1.0b.egplugin (downloaded from first page of this forum)

Can you please enlight me what are the correct versions to install?

Thank you

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Mon May 28, 2018 5:34 pm

ok so here goes.

if you click on the build button at the top of the forum that is going to be the most recent build of EG available. it is stable and usable. it has some corrections in it from the latest RC version. It is OK to use it.

if you install this version download/file.php?id=6381 of the plugin it is going to be the latest version. it was still in testing that is the reason as to why it has not put onto the first page. Uninstall libCEC from your computer this should not need to be installed anymore. You have to make sure that you also uninstall the plugin from your EG tree. once you dio that then you are going to have to delete the plugin manually. there is probably going to be 2 versions installed. one on program files (x86)\eentghost\plugins and one in %programdata%\eventghost\plugins. be sure to delete both.

then run the .egtree file from the link above by double clicking on it. this will add the plugin to eventghost. then you should be able to add it to your tree.

if you have any problems please include a copy of the error in the forum post. this will help me to isolate the issue.
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Tue May 29, 2018 9:59 pm

Hello,
Thanks for the quick reply.
Following your instructions, I don't receive any more errors.
However I still can not make it work.
When I try to add an event, I only have system events available?
What I am doing wrong?

I am attaching the script I was using before, as you can see I had CEC events.
Now, when I try to add an event, there are no cec events, only system...


Before:
Image

Now:
Image
Thanks !

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Wed May 30, 2018 10:07 am

OK. so does the plugin find the adapter? and did you name the adapter and set the options for it? You MUST set the HDMI port in the options to the port number on the TV that the CEC adapter is plugged into.

I have not been able to test the Key Events for the plugin. so if this was working before then you are going to have to test it for me. And how yu are going to do that is follow the instructions above. You should get an event telling you that the CEC adapter is connected when the plugin starts. if you do not get this event then you have not given the adapter a name in the plugin config dialog.

Once you have gotten an event for the adapter being connected. try and turn the TV on and off from the Power on a device action. or Power off a device action. if the TV turns on and off then we know that the plugin has connected properly. Then try pressing a button on the remote. and see if you get an event for that button press in the log. If you do then great! you will want to drag and drop the event into a macro. The reason why i did not add the events or the button presses to the list that you can bring up is because it is hit or miss on which devices will generate what button press events if any at all. And since we have the drag and drop mechanism in place it is pretty simple to press the button to get the event and add it to the macro that way.
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Thu May 31, 2018 1:35 am

Hello again,

This is whats happening:
Pluggin apparently finds the adapter, and CEC adapter is connected, like you see on the screenshot.
I have done the recommended plugin configurations, but still can't get any key press event.
I have done the power off and power on my TV remote, and it seems the power on event is caught but not the power off.
Sending an action to power-on the TV does not works.
Any key pressed on the remote is not shown on status log.
I am pretty sure, the cec-events are being received, because using libcec debugger I can see them arriving.

Not sure what can I do more.
Any ideas?

Thanks for your help.

Screenshot:
Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 31, 2018 1:41 pm

ok when you see the events in the log that say PulseEight.cecada.TV.Power.On that means that the TV is currently on. so if you go over to your TV and press the power button on the TV you will gets events in EventGhost for the power state changing on the TV. You do not want to run an action to turn the TV on from that event. which is what it looks like you have done. when you see PulseEight.cecada.TV.Power.Standby this is the TV in a low power state (or off) The TV never fully turns off. if it did then your remote would not work nor would the CEC adapter. so off is standby.

if you create a macro with the Power on a device action set to your TV and your adapter. then in the same macro create the action to power off the TV. if you right click on the action then click on execute in the menu that pops up. this will execute only that specific action. You can also try using the power from the remote control actions as well.


I am going to have to install the old plugin and see if i get remote key presses with it. I have never tested this to see if i do. I will also double check my code to see if maybe i missed something.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 31, 2018 2:34 pm

ok so I found the problem with the remote key presses. attached is a new version of the plugin.
Attachments
PulseEightPlus-0.4.6b.egplugin
(375.28 KiB) Downloaded 75 times
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Thu May 31, 2018 10:16 pm

Thanks alot, with the new plugin worked as it should!
All the hdmi-cec events are now shown.

Just one more question.
I am trying to emulate a mouse, using the UP/DOWN/RIGHT/LEFT TV remote.
It works, however the pointer moves very slowwwwwwww. The hdmi cec events cadence is not fast enough to emulate a decent mouse.
Probably I am not doing the right way. Below is the script I built, do you have any optimization advise?

Image

Best Regards,
Nuno

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 31, 2018 10:56 pm

we can institute a counter with a timed reset. so the longer you hold it the faster it will go.


copy this code. and then right click on your configuration tree and click paste. Paste directly into EventGhost DO NOT edit your save file

This has 4 macros one for each direction. you will need to drag and drop your events into the macros.

The start value for the mouse movement is 2 pixels it will increase an additional 2 pixels each time the event comes in. so after 5 events your mouse would move a total of 30 pixels. (2, 4, 6, 8, 10) this should give a nice linear speed increase. If there is a wait of 2 seconds or more it will reset back to 2.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP-2018.05.25-17.43.19">
    <Folder Name="MoveMouse" XML_Guid="{51A0409E-E983-42A3-93B7-172FB31FC593}" Expanded="True">
        <Macro Name="MoveMouseUp" XML_Guid="{64671C02-61F6-4A75-89E3-4987C294E9C2}" Expanded="True">
            <Action Name="MouseUp" XML_Guid="{FEDF7E5D-AA77-45B0-BD12-01A48CF72CC9}">
                EventGhost.PythonScript(u'import time\n\ntry:\n    counter += 2\n    if time.time() - last_event_time  &gt;= 2:\n        counter = 2\n    \nexcept:\n    counter = 2\n    \nlast_event_time = time.time()\n\neg.plugins.Mouse.MoveRelative(0, -counter, False)')
            </Action>
        </Macro>
        <Macro Name="MoveMouseDown" XML_Guid="{64671C02-61F6-4A75-89E3-4987C294E9C2}" Expanded="True">
            <Action Name="MouseDown" XML_Guid="{FEDF7E5D-AA77-45B0-BD12-01A48CF72CC9}">
                EventGhost.PythonScript(u'import time\n\ntry:\n    counter += 2\n    if time.time() - last_event_time  &gt;= 2:\n        counter = 2\n    \nexcept:\n    counter = 2\n    \nlast_event_time = time.time()\n\neg.plugins.Mouse.MoveRelative(0, counter, False)')
            </Action>
        </Macro>
        <Macro Name="MoveMouseLeft" XML_Guid="{ACFB7EC5-5153-4207-AFD6-135ACD401456}" Expanded="True">
            <Action Name="MouseLeft" XML_Guid="{FEDF7E5D-AA77-45B0-BD12-01A48CF72CC9}">
                EventGhost.PythonScript(u'import time\n\ntry:\n    counter += 2\n    if time.time() - last_event_time  &gt;= 2:\n        counter = 2\n    \nexcept:\n    counter = 2\n    \nlast_event_time = time.time()\n\neg.plugins.Mouse.MoveRelative(-counter, 0, False)')
            </Action>
        </Macro>
        <Macro Name="MoveMouseRight" XML_Guid="{64671C02-61F6-4A75-89E3-4987C294E9C2}" Expanded="True">
            <Action Name="MouseRight" XML_Guid="{FEDF7E5D-AA77-45B0-BD12-01A48CF72CC9}">
                EventGhost.PythonScript(u'import time\n\ntry:\n    counter += 2\n    if time.time() - last_event_time  &gt;= 2:\n        counter = 2\n    \nexcept:\n    counter = 2\n    \nlast_event_time = time.time()\n\neg.plugins.Mouse.MoveRelative(counter, 0, False)')
            </Action>
        </Macro>
    </Folder>
</EventGhost>
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Fri Jun 01, 2018 11:05 am

Hello my friend,

Worked much better!
Is not like a mouse, but it's quite usable.
I will post a video later on, showing the user experience (UX).

Have a great weekend.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Fri Jun 01, 2018 11:24 am

we can adjust the speed if needed.
I can also implement an acceleration curve.
up to you
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Mon Jun 04, 2018 11:49 am

Hi,

You can see it on action on the video below:

https://youtu.be/K6Qg0Lug3Ig
(Look at the mouse pointer on the lower right corner)

Like I said, it's usable, but I feel there is room to improvement. What you think?

Can we try that acceleration curve or any other parameter?

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Mon Jun 04, 2018 4:09 pm

let me set up a test rig and work out the speed issues. see if i can't get it closer to a natural mouse movement.
If you like the work I have been doing then feel free to Image

tatankov
Posts: 8
Joined: Mon May 28, 2018 1:08 pm

Re: Pulse-Eight CEC +

Post by tatankov » Mon Jun 04, 2018 5:21 pm

Thanks Kevin,

A typical mouse reports its position to the computer every 8 milliseconds (125 Hz polling rate).

Just by curiosity, do you think EventGhost could handle such high rate of event reporting? It won't crash?

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Tue Jun 05, 2018 8:36 am

EventGhost does not talk to the mouse. It sends the commands to Windows to move the pointer. the pointer and what you see on the screen are in no way connected to one another. When you move a mouse the drivers use the same mechanism to move the pointer that EG does. Well maybe LOL. EG is currently using an outdated mechanism i just found out recently. I will be updating that in the near future.


Try changing the value on the key repeat setting in the plugin config. I think it's for sending key presses but honestly i cannot remember.

I really do hate using enduring events because it causes the whole event system to come to a grinding halt while the enduring event is running a macro. I think what needs to be done is i have to set in place a mechanism that will average the duration between repeat key press events and run a thread to handle the movement of the mouse that will have a timeout of that averaged duration. so when you stop pressing it will stop moving if not event comes in in that time period. I am thinking of the best way to handle it. I have some ideas rolling around in my head. I think this will be something i may add to the plugin it's self as an option that can be turned on and off via an action which can be coupled with key press events from the remote to turn it on or off. This can be set up so that the macro will only be active if the current source is set to the adapter.

Let me go and dig up the code i wrote for the new style mouse control. Would you like to have the page up and down work like scrolling the wheel?? and the back and enter buttons to act like aux 3 and 4 (i think it's 3 and 4) but the back and forward buttons on a mouse? I am trying to think of what would be good mouse wheel tilt button (horizontal scroll). You can use the multitap plugin to "re event" the number buttons so they will act like old school flip phone text messaging that will generate events that represent the letters and you can use those with the emulate keystrokes action to be able to type.
If you like the work I have been doing then feel free to Image

Post Reply