Pulse-Eight CEC +

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
kgschlosser
Site Admin
Posts: 3700
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat Apr 21, 2018 5:32 pm

You cannot make it look like an AVR device. But if your AVR supports CEC you should be able to control the volume on your AVR with the plugin.

I am going to be putting some time into working on this plugin today I tool a few days ff working on it I am not good at C++ programming so it takes a while between researching. compiling and failure. I am trying to add power events that will work properly without the need to poll The libCEC dll ode is like a rats nest with jumping all over the place through various code files to do a single task. so it takes a while to follow through the code to find out exactly where i need to add or change something.


as an example. if i wanted to get the current power status as a sting.


it goes from a function GetPowerStatus located in libcec.i to GetDevicePowerStatus in cec.h to GetDevicePowerStatus in LibCEC.cpp to GetDevice in CECProcessor.cpp back to At in CECDeviceMap.cpp.... now all of that was to get the device query. then off to GetPowerStatus in CECBusDevice.cpp once we have the device. then it checks to see if the device is present so off to GetStatus in CECBusDevice.cpp and is the status is unknown off to PollDevice in CECProcessor.cpp then back to At in CECDeviceMap.cpp to get the primary device then to TransmitPolll in CECBusDevice.cpp to tell the primary device to poll the device then to TransmitPoll in CECCommandHandler.cpp.. now at this point we still do not know the state of the device yet. But i have a feeling you get the idea.

This code is a rats nest so it takes a long while to map out how something is working. then make a change. and when it fails (not if) go back and follow the steps through it again to see why it failed. and rinse and repeat. I have asked in the libCEC repo for some help with this with no avail. This would be far easier for someone that is familiar with the maze of commands to add. But I am not. so it is taking a horrendous amount of time to do this. and to be honest i got a little burnt on it. well more then a little. so i took a break and started working on something else. some times ya just have to walk away and come back fresh.
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Sat Apr 21, 2018 6:29 pm

kgschlosser wrote:
Sat Apr 21, 2018 5:32 pm
You cannot make it look like an AVR device. But if your AVR supports CEC you should be able to control the volume on your AVR with the plugin.

I am going to be putting some time into working on this plugin today I tool a few days ff working on it I am not good at C++ programming so it takes a while between researching. compiling and failure. I am trying to add power events that will work properly without the need to poll The libCEC dll ode is like a rats nest with jumping all over the place through various code files to do a single task. so it takes a while to follow through the code to find out exactly where i need to add or change something.


as an example. if i wanted to get the current power status as a sting.


it goes from a function GetPowerStatus located in libcec.i to GetDevicePowerStatus in cec.h to GetDevicePowerStatus in LibCEC.cpp to GetDevice in CECProcessor.cpp back to At in CECDeviceMap.cpp.... now all of that was to get the device query. then off to GetPowerStatus in CECBusDevice.cpp once we have the device. then it checks to see if the device is present so off to GetStatus in CECBusDevice.cpp and is the status is unknown off to PollDevice in CECProcessor.cpp then back to At in CECDeviceMap.cpp to get the primary device then to TransmitPolll in CECBusDevice.cpp to tell the primary device to poll the device then to TransmitPoll in CECCommandHandler.cpp.. now at this point we still do not know the state of the device yet. But i have a feeling you get the idea.

This code is a rats nest so it takes a long while to map out how something is working. then make a change. and when it fails (not if) go back and follow the steps through it again to see why it failed. and rinse and repeat. I have asked in the libCEC repo for some help with this with no avail. This would be far easier for someone that is familiar with the maze of commands to add. But I am not. so it is taking a horrendous amount of time to do this. and to be honest i got a little burnt on it. well more then a little. so i took a break and started working on something else. some times ya just have to walk away and come back fresh.
Wow, okay! good luck with the code :/

Do you think there will be a version with the basic features working first so we can maybe already check, if there are some hiccups, while you figure out how to add all the new possible commands?

I'm also not into c++ programming, but would like to help! :)

LG

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat Apr 21, 2018 6:49 pm

That's not a bad idea. Let me put together a version using the original libCEC.dll with the "extra goodies" disabled
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Sat Apr 28, 2018 10:54 am

kgschlosser wrote:
Sat Apr 21, 2018 6:49 pm
That's not a bad idea. Let me put together a version using the original libCEC.dll with the "extra goodies" disabled
Thx. Waiting for it.. still have 2 adapters that i cant use yet :(

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat Apr 28, 2018 8:17 pm

Aaaaaahhhhhhh. If I could be more then one person. LOL


sorry about the delay. I have my house torn apart. And if i take to long to get all the work done I will have to face the wrath of the ball and chain. So I have been putting most of my time and energy into finishing up this heap load of work. If you like I can point her in your direction and tell her that nYce said that I have to stop working on the house and work on the plug-in instead.LOL. it would be very amusing to watch that scenario unfold.
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Sun Apr 29, 2018 1:25 am

Alright.. I'll take the wrath on me!.. maybe not the whole.. since it would kill me instantly and then you dont have to finish the plugin anymore, so she will come back for you...

its okay, take your time!
Just dont forget meee :*( ;-)

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sun Apr 29, 2018 8:38 am

OK you can give this one a shot.

It is not compatible with any previous versions. you will need to delete the plugin from the tree, and also go to both of the plugin folders and delete the plugin. then install this one.
This thing is going to have some issues I am sure. I tested it with powering on and off my Samsung TV and that seems to work just fine.

I changed up how the volume actions worked. If no avr is present and set to be the audio device then the plugin will send the remote control volume up/down/mute for the TV instead.

I have also added partial tuner controls channel up and down. I still have to add the actions for those.

The devices populating has been corrected.
Also make sure you wait intil you see the message in the log for your adapters being loaded before trying any actions.

The config dialog for the plugin is all new. let me know if it works properly. I had to write a custom GUI control for it to work the new way. I think it is much easier to deal with multiple adapters with tis new mechanism.

There are a whole slew of new options available for each adapter. there are tool tips for each of the options. so simply hover the mouse to get some insight as to what the setting does.
Attachments
PulseEightPlus-0.2.0b.egplugin
(361 KiB) Downloaded 8 times
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Sun Apr 29, 2018 10:50 am

Woohoo!! TY!

1. On the Plugin-Settings. Cant open the Tab for the second new adapter, after i closed it. (luckily its open at the start)

2. The settings for automatically switch off the pc or turn it to standby: Why give extra options for that instead of let people use eventghost with a trigger/action themself for this option? I thought thats what eventghost is for :D

3. Initializing the Plugin seems fine. It finds both of my adapters. But:
My Device Names:
Com 8 -> PC
Com 9 -> Beamer

12:24:14 libCEC version: 4.0.2 Loaded: compiled on Windows-10.0.15063, features: P8_USB, P8_detect Adapter Device Name: PC
12:24:17 libCEC version: 4.0.2 Loaded: compiled on Windows-10.0.15063, features: P8_USB, P8_detect Adapter Device Name: Beamer

It seems like it sets the com port for both devices to the same Port (in my case Port8.. My devices are connected on port 8 and 9)
Does the P stands for the Port?

Turning on AVR on adapter com9: 12:28:18 PulseEight.Beamer.Audio.Power.On
Turning off AVR on adapter com9: 12:30:35 PulseEight.Beamer.Audio.Power.Off

Turning on AVR on adapter com8: 12:31:27 PulseEight.Beamer.Audio.Power.On
Turning off AVR on adapter com8: 12:30:59 PulseEight.Beamer.Audio.Power.Off

There seems to be problem. It always thinks both devices are "beamer". But just for the Events. For Actions everything works. (See Point 4)

4. Actions:
I can select all Adapters/Devices! yay! No Blank dropdowns anymore.
Power On and Off also works for both adapters and both AVRs turn off and on as wanted.
Still the bug with the events, that it always fires the events as if they were from the first adapter. (See Point 3)

4. Reopening the PECEC+ Confguration Settings takes some time (first a empty settings page). But loads fine after a while.



5.I'm just curious, how do i have to understand the terms: I can set the Adapter Devices Types to Recording, Reserved, Tuner and Playback device.

If i got an PC to AVR to Beamer Setting. What is my devices type? Since i use it just for playback its a playback devices? my PC can also record i guess ;-) . I always leave it to "Recording Device" but would love to understand the different types..
I guess thats just needed so other devices in the chain can send commands to the pc?



I will test the remote inputs and volume next time!

LG Jay

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sun Apr 29, 2018 5:49 pm

ok so this is my understanding of how these things work.


You cannot record video with them. or audio. they provide no kind of an input for that on the PC.

when you set the device type of the adapter this is the type of device you want to emulate. certain CEC commands will work with certain cec devices.
as an example. sending a record command to a player device is kind of pointless.

Now i am working on this bit of it. but lib CEC as made by Pulse Eight (P8) LOL does not produce any real information for changing of any deck modes (player and recording devices) it also does not do anything with Tuner devices.

I am not sure if you got the hint as to what the P8 is. that is for Pulse Eight. so long as you see 2 of those messages you are good to go.

I am really hoping that you do not have these adapters daisy chained together onto the same HDMI wire. each adapter is going to need it's own AVR and it's own TV a single adapter is good for that whole HDMI Chain. (HDMI chain is any device that is plugged into a single TV.)

Now from my reading I do not know if the keypress events will work unless you change the HDMI port setting to the HDMMI port number on the TV that you have the adapter plugged into.

The events are generated use the name that you have given the device. that name is in one of the CEC menus on the device it's self.

for some reason I am thinking that you have the CEC adapters daisy chained.
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Sun Apr 29, 2018 6:47 pm

1. Alright. Now i know, what P8 stands for. TY.
2. Alright.. My P8 simulates my PC, i already understand that, but u say, it doenst matter, what device type i set it to, since we react on all cec commands as we want.
3. Haha.. no.. u think im stupid.. of course i have 2 separate chains.. else i would not need 2 fucking expensive adapters xD

my setup is as followed:

PC -> P8(Named: Beamer) -> AVR1 -> Beamer (for movies and stuff)
PC -> P8(Named: PC) -> AVR2 -> Monitor (for games and surfing on the desk)

I got 2 adapters/AVRs/Hdmi-chains, since my home-cinema is not where my desk is, but i use the same computer for everything.


But still. My Problem is with this config:

When i turn one of my AVRs on (pressing the button on the AVR). I get an event in Eventghost: PulseEight.Beamer.Audio.Power.On
But its always [...].Beamer.[...] and never [...].PC.[...]



4. Setting the HDMI-Port. I dont understand it right i think.
So i have to set the hdmi port, the TV/Projector/Beamer it is going in? I mean..

i got: PC(Hdmi out (0?)) -> in (hdmi 1) AVR out (hdmi 1) -> Projector (hdmi 1)/Monitor (hdmi 1)

so if i understand correctly i have to choose the HDMI in of the AVR in the settings?

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Mon Apr 30, 2018 1:40 am

nYce wrote:
Sun Apr 29, 2018 6:47 pm
1. Alright. Now i know, what P8 stands for. TY.
OK cool. I am going to modify that output to be a bit more descriptive as the which adapter and port loaded
nYce wrote:
Sun Apr 29, 2018 6:47 pm
2. Alright.. My P8 simulates my PC, i already understand that, but u say, it doenst matter, what device type i set it to, since we react on all cec commands as we want.
It does matter the device. But it doesn't. this is an odd thing. this all basically works as such.

if your TV asks PlaybackDevice 1 what's it's current mode is. the playback device would respond back with it's play mode. now the TV is not going to ask what a Tuner devices playback mode is because it does not have one. So with this if you set your adapter to a tuner your TV will not send it playback commands. It all depends on how much/little the devices on the CEC network support. The way this is supposed to work is. If you have the source set to a playback device. when you press the play button on the TV remote it is supposed to send the CEC command to that playback device to start playing. so if you do not have the adapter set to a playback device but you are using it as an HTPC for movie playback it is never going to receive the command to play.

This is all future crap. because at the moment the back end of the plugin (libCEC) does not support forwarding of these commands. to the spicific device it is aimed at. libCEC does however support a generalized command notification. I have not seen this work nor do i know what message come through it or how they are even formatted. I have not tested this portion of it to see. There are events generated in eventghost for a command notification.

nYce wrote:
Sun Apr 29, 2018 6:47 pm
3. Haha.. no.. u think im stupid.. of course i have 2 separate chains.. else i would not need 2 fucking expensive adapters xD
This is one of those kinds of comments i do not really appreciate. I do not assume anything about a persons setup or how they have things wired up. All i am simply doing is going down the trouble shooting list. I am a big fan of this statement "It is always the simplest things that are overlooked that cause the most complex problems." my intention is not to make you feel less intelligent. but please do remember there are all kinds of odd setups. and also varying knowledge by the user. The biggest thing is also that this is not just a conversation for you and I. There are other that are going to read this. so we have to make sure they too understand how things are supposed to work.

see here
viewtopic.php?p=47347#p47347

nYce wrote:
Sun Apr 29, 2018 6:47 pm
my setup is as followed:

PC -> P8(Named: Beamer) -> AVR1 -> Beamer (for movies and stuff)
PC -> P8(Named: PC) -> AVR2 -> Monitor (for games and surfing on the desk)
if you can tell me what devices are in each chain. that would help me a lot.
nYce wrote:
Sun Apr 29, 2018 6:47 pm
I got 2 adapters/AVRs/Hdmi-chains, since my home-cinema is not where my desk is, but i use the same computer for everything.

But still. My Problem is with this config:

When i turn one of my AVRs on (pressing the button on the AVR). I get an event in Eventghost: PulseEight.Beamer.Audio.Power.On
But its always [...].Beamer.[...] and never [...].PC.[...]
I am going to question this again. I should have asked this before. At no place do the 2 CEC Networks intersect?. This includes the 2 CEC adapters being plugged into the same video card via HDMI. If they are both plugged into the same video card they are on the same network.

nYce wrote:
Sun Apr 29, 2018 6:47 pm
4. Setting the HDMI-Port. I dont understand it right i think.
So i have to set the hdmi port, the TV/Projector/Beamer it is going in? I mean..

i got: PC(Hdmi out (0?)) -> in (hdmi 1) AVR out (hdmi 1) -> Projector (hdmi 1)/Monitor (hdmi 1)
I am not 100% sure of how this HDMI port thing works. and which devices produce key press events. In the libCEC docs it uses the TV as the device for the HDMI port setting. it does not make any reference to any other device nor does it say t"The HDMI port on the device" it specifically states "the HDMI port on the TV that the adapter is plugged into". So if used exactly as it states. then you would place the CEC adapter between the TV and the PC. but this could be under the premise that you are wanting to transmit video to the TV so you place it in the middle of the HDMI wire between the 2.

I am guessing at this and do not know if it is only intended to be plugged into a TV or not.
I have mine connected to my TV with only an HDMI cable going from the adapter to the TV and not from the adapter to the PC. It seems to work fine.

But I would set the HDMI port number to the HDMI port number on the device where the HDMI cable plugs into that is attached to the CEC adapter. But i do not know if you press buttons on the AVR remote if they will be sent to the CEC adapter which would cause events in EG. it may not. You will have to test this and let me know.


a little more information in CEC networks.

a TV typically has 4 or more HDMI ports. all of those HDMI ports will have a CEC wire. these wires are always connected to one another and the TV it's self. No matter what input you have the TV set to. This holds true for any device that has HDMI ports. So if you have the 2 AVR's plugged into the same TV you now have a single CEC network. or if you have some kind of a HDMI splitter for a single Blu-Ray player and the splitter is connected to 2 TV's you now have a single CEC network. Some peoples setups get very complex with splitters and switches and extenders. so we need to make sure. I have checked the code again. I cannot seem to find anything that jumps out as to why the events are showing up like that. the code for anything to do with adapter commands and events is designed to be for each adapter. so the code block is started for a specific adapter and has it's own data set. at no point does it get shared between 2 adapters. I am trying to find a place where the data sets can get crossed for some reason not having any success tho.
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Mon Apr 30, 2018 12:27 pm

kgschlosser wrote:
Mon Apr 30, 2018 1:40 am
nYce wrote:
Sun Apr 29, 2018 6:47 pm
3. Haha.. no.. u think im stupid.. of course i have 2 separate chains.. else i would not need 2 fucking expensive adapters xD
This is one of those kinds of comments i do not really appreciate. I do not assume anything about a persons setup or how they have things wired up. All i am simply doing is going down the trouble shooting list. I am a big fan of this statement "It is always the simplest things that are overlooked that cause the most complex problems." my intention is not to make you feel less intelligent. but please do remember there are all kinds of odd setups. and also varying knowledge by the user. The biggest thing is also that this is not just a conversation for you and I. There are other that are going to read this. so we have to make sure they too understand how things are supposed to work.

see here
viewtopic.php?p=47347#p47347

Alright. I didnt want to offend you here. For me it just sounded funny to setup 2 adapters in a chain. I understand, that we try to keep these posts as readable as possible for other users too. I also didn't feel offended by your question.
I'm also a big fan of "have you tried turn it off and on again..." so of course simple things matter!
kgschlosser wrote:
Mon Apr 30, 2018 1:40 am
nYce wrote:
Sun Apr 29, 2018 6:47 pm
my setup is as followed:

PC -> P8(Named: Beamer) -> AVR1 -> Beamer (for movies and stuff)
PC -> P8(Named: PC) -> AVR2 -> Monitor (for games and surfing on the desk)
if you can tell me what devices are in each chain. that would help me a lot.
nYce wrote:
Sun Apr 29, 2018 6:47 pm
I got 2 adapters/AVRs/Hdmi-chains, since my home-cinema is not where my desk is, but i use the same computer for everything.

But still. My Problem is with this config:

When i turn one of my AVRs on (pressing the button on the AVR). I get an event in Eventghost: PulseEight.Beamer.Audio.Power.On
But its always [...].Beamer.[...] and never [...].PC.[...]
I am going to question this again. I should have asked this before. At no place do the 2 CEC Networks intersect?. This includes the 2 CEC adapters being plugged into the same video card via HDMI. If they are both plugged into the same video card they are on the same network.
My Setup is as described above, i'll try to extend:

Code: Select all

              PC (Geforce GTX 1080)
       HDMI out                    DP out
            |                                |
       hdmi cable                  dp->hdmi adapter/cable
            |                                |                       
       P8 (Com9)                  P8 (Com8)
            |                                |
       hdmi cable                 hdmi cable
            |                                |
       AVR1                          AVR2
            |                                |
       hdmi cable                 hdmi cable
            |                                |
       Projector                   Monitor
       
 

These should be two seperate chains. Even if they are both on the same graphics-card.. i dont think the DP-port supports any HDMI-CEC.

And even if i had 2 hdmi ports on my Geforce, u would say, the CEC-line would be connected, even if the card doesnt support HDMI-CEC at all?
Well, if you say so, its probably true! :D

I will just disconnect the one device from the Graphics card at all and report back when im home later.
Maybe eventghost doesn't give me just the events as if they were on the .Beamer.-chain then.

Another idea: Even if the adapters are in a chain. Should they not both trigger an event then?

Another note on my Setup:
If i choose an adapter in Eventghost -> Action -> P8+ -> PowerOnDevice it gives me the right devices for that chain.
So for adapter one (com9) it shows me the name of my AVR1 as device in the dropdown.
For adapter two (com8) it shows me the name for AVR2.

kgschlosser wrote:
Mon Apr 30, 2018 1:40 am
But I would set the HDMI port number to the HDMI port number on the device where the HDMI cable plugs into that is attached to the CEC adapter. But i do not know if you press buttons on the AVR remote if they will be sent to the CEC adapter which would cause events in EG. it may not. You will have to test this and let me know.
At the moment pressing buttons on the remote doesnt give any events, i think. I will test different settings and report.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Mon Apr 30, 2018 4:53 pm

they very well could be on the same chain because they are connected to the video card. a DP port follows the hdmi specification so I would imagine it would have a CEC wire. now whether or not the adapter uses this wire and connects the 2 together dpends on the display adapter. so for sake of testing. unplug it and see what happens.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Mon Apr 30, 2018 4:58 pm

this is the crazy world of electronics and who knows how they attach to each other.



another way to test is to unplug the USB for the Beamer CEC adapter and only test the one. and see if it start generating events properly. you can even move the USB port the Beamer one is plugged into. this will cause a reinstall of the drivers for it and it might get a different com port causing the other adapter to load first. lets see if the problem will then move to the other adapter.
If you like the work I have been doing then feel free to Image

nYce
Posts: 38
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Tue May 01, 2018 8:24 pm

I've tested it.

1. I disconnected my P8 (Com8, PC-chain) HDMI/DP cable from my PC. Still leaving the USB to get signals.

I still could run power on/off commands in eventghost for both chains.
It still gave me all events from turning the AVRs on/off in eventghost as if they were in my Beamer-chain.



2. I disconnected just the usb of my P8 (Com9, Beamer-chain).

i dont get any events for my AVR1. (since it is not connected anymore). I also cant send any commands.
i get events from my P8 (Com8, PC-chain). I can send commands to it.
But the events are always labeled like this:
22:10:56 PulseEight.Beamer.Audio.Power.On



Conclusion:
I have two seperate chains in my setup.
The plugin just creates events for boths adapters as if they were from my .Beamer. - Chain. Or its maybe just the log? and the events are different but get created with just the first device name?

Post Reply