Pulse-Eight CEC +

Questions and comments specific to a particular plugin should go here.
Post Reply
nYce
Posts: 42
Joined: Wed Mar 28, 2018 2:29 am

Re: Pulse-Eight CEC +

Post by nYce » Tue May 01, 2018 9:34 pm

another idea on the HDMI Number:

Maybe the device needs this number so it can send the "set as active device" as "set the active device to device on hdmi port x"

or maybe to interpret the codes correct, if you press a source button on your AVR/TV..

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Tue May 01, 2018 9:55 pm

Holy shit. I found the problem. It wasn't smack right in my face. But there it is. You should also have a problem with logging if you have the setting for each adapter differently.

I will have this issue sorted in the next 10 minutes or so.

This is an exact reason of asking those questions. because if i didn't and we didn't go through this specific test I would have not looked for a problem in this location. The lynch pin that told me where to look as the fact that you said you unplugged the Beamer adapter but the events still had the name Beamer. This is because the Beamer adapter loads last and sets a variable that gets used only in the events. the behavior is not what i expected in how i set up the code. But the debugging is also set up in the same manner. so that is going to have an issue as well. I know 100% how to fix the problem. because i just ran into the same exact issue with something else i was working on. LOL.

I am also going to add a means to delete an adapter from the plugin config. This is not present in the current release. I have also figured out how to use the command callback to achieve some of the other features i wanted from libCEC.. The biggest feature i wanted to add i am not sure I will be able to add, that is to make the adapter emulate an AVR.

Also in this next release you will be able to select more then a single device type to emulate.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Tue May 01, 2018 11:43 pm

OK sorry that took longer then expected.


I did a bunch of things tho.

I managed to speed up the start time.
I added some error handling (this was for the quicker start time)
I changed the startup printout to be more informative
I change the emulation controls so you can now select more then one device type to emulate
I added a Loading Adapters message at the top of the plugin config dialog.
I widened the plugin config dialog. This was because of some of the controls getting chopped off.
I believe i have fixed the issue with the events. and with the logging options for the adapters.

I added a way to delete an adapter from the plugin. if you delete the adapter name it will remove the adapter. or if you do not want to use an adapter with EventGhost but it gets detected. Leave the name as "Enter Name" and it will not load the adapter. If an adapter is plugged into your computer it will always show up in the config dialog. Do as stated above and the adapter will not be used even tho it is listed.

I did want to ask since you have 2 adapters. How does the config dialog work for you? do the bars open and close properly for each adapter? I know about the controls loading in a jumble at the top left. I am working on this. The whole folding bar things is a spin off from an existing control. the existing one didn't allow you to have scroll bars so i had to rewrite a large portion of it to add the scroll bars. I thought this was the best possible setup for multiple adapters. Do you like how when you change the name the new name appears in the bar?

new version is attached.
Attachments
PulseEightPlus-0.2.1b.egplugin
(361.84 KiB) Downloaded 28 times
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by nYce » Wed May 02, 2018 1:22 am

nice!!
events are fired off as intended now! I get the right events.
i also like the log:
03:06:55 CEC: Loading Adapters...
03:06:55 CEC: Starting adapter PC on port COM8
03:06:55 CEC: Starting adapter Beamer on port COM9
03:06:56 Plugin: Pulse-Eight CEC+
03:06:58 CEC Adapter Started
03:06:58 Adapter Name: PC
03:06:58 Adapter Serial Port: COM8
03:06:58 Adapter Device Emulation: recording device, playback device
03:06:58 Available Devices: PC, Playback 1, AVR-X540BT
03:06:58 AVR Volume Control: Off
03:06:58 CEC Adapter Started
03:06:58 Adapter Name: Beamer
03:06:58 Adapter Serial Port: COM9
03:06:58 Adapter Device Emulation: recording device, playback device
03:06:58 Available Devices: Beamer, Playback 1, AVR-X2400H
03:06:58 AVR Volume Control: Off

Interesting though, that it says AVR Volume Control: Off since i checked the "AVR Audio" settings for both AVRs.

kgschlosser wrote:
Tue May 01, 2018 11:43 pm
I did want to ask since you have 2 adapters. How does the config dialog work for you? do the bars open and close properly for each adapter? I know about the controls loading in a jumble at the top left. I am working on this. The whole folding bar things is a spin off from an existing control. the existing one didn't allow you to have scroll bars so i had to rewrite a large portion of it to add the scroll bars. I thought this was the best possible setup for multiple adapters. Do you like how when you change the name the new name appears in the bar?
I like the style of the bars.
i just encounter a little error with two adapters:

first when i open the settings:
error15.PNG
it doesnt show me any second adapter. only if i close the bar on the button top right:
error16.PNG
after it is closed i have both adapter-bars visible:
error17.PNG
I cant open the one again, that is open in the beginning.
i can open and close the second (top) bar although.


i will continue testing different actions and events tomorrow.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Wed May 02, 2018 4:47 am

TY for being patient with me and working on this. But because of the testing process it pointed out where the problem was. I didn't mean to be a pain in the ass about it and sorry if i came across that way.

The dialog i will work on. I am going to pull the code and put it on a "test bench" I have to write up something that will make it run as if there are multiple adapters. and see if I can get the glitches worked out of it.

And we also discovered something new. On your video card the display port and HDMI CEC wires are not tied together. What flavor of video card do you have? I would assume Nvidia because you mentioned that are a gamer. Ati cards are best used in workstations, VM servers and also multi monitor/TV connections. tho the latter has been getting closer to being even for the 2 brands.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Wed May 02, 2018 12:52 pm

OK give this one a shot. The plugin config dialog should now be fixed..
Attachments
PulseEightPlus-0.2.3b.egplugin
(364.73 KiB) Downloaded 23 times
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by nYce » Wed May 02, 2018 4:18 pm

kgschlosser wrote:
Wed May 02, 2018 4:47 am
TY for being patient with me and working on this. But because of the testing process it pointed out where the problem was. I didn't mean to be a pain in the ass about it and sorry if i came across that way.
I'm glad i can help. Thank you for developing the plugin in the first place!
kgschlosser wrote:
Wed May 02, 2018 4:47 am
And we also discovered something new. On your video card the display port and HDMI CEC wires are not tied together. What flavor of video card do you have? I would assume Nvidia because you mentioned that are a gamer. Ati cards are best used in workstations, VM servers and also multi monitor/TV connections. tho the latter has been getting closer to being even for the 2 brands.
I got a MSI Geforce GTX 1080.

We cant be sure yet.
It is possible the wires are connected and my HDMItoDP cable is not connecting the CEC-wire. But i guess they are not.

kgschlosser wrote:
Wed May 02, 2018 12:52 pm
OK give this one a shot. The plugin config dialog should now be fixed..
Yes. Config closes and opens as intended.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Wed May 02, 2018 7:14 pm

I was up all night fixing that dialog. So I hope it works good.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 03, 2018 12:31 am

I do have a question for ya. do you get events if you go and manually turn up the volume on your avr? do the volume actions work?
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 03, 2018 8:04 am

OK so here is a new version.

Fixed - Player Mode action
Fixed - selecting multiple emulation types
Fixed - Raw command
Fixed - Display Message
Fixed - Unconfigured action dialogs showing selections but the OK button is grayed out
Fixed - Display Message action showing more then TV as a device

Removed - GetDeckControlMode action
Removed - SetDeckControlMode
Removed - Command Events

Added - GetTunerStatus action
Added - GiveTunerStatus action
Added - TunerChannelUp action
Added - TunerChannelDown action
Added - TunerStatusEvents action
Added - PlayerStatusEvents action
Added - SetPlayerMode action
Added - GetPlayerStatus action
Added - GivePlayerStatus action

Added - Player.StatusRequest event
Added - Player.PlayForward.Request event
Added - Player.PlayReverse.Request event
Added - Player.PlayStill.Request event
Added - Player.FastForwardMin.Request event
Added - Player.FastForwardMedium.Request event
Added - Player.FastForwardMax.Request event
Added - Player.FastReverseMin.Request event
Added - Player.FastReverseMedium.Request event
Added - Player.FastReverseMax.Request event
Added - Player.SlowForwardMin.Request event
Added - Player.SlowForwardMedium.Request event
Added - Player.SlowForwardMax.Request event
Added - Player.SlowReverseMin.Request event
Added - Player.SlowReverseMedium.Request event
Added - Player.SlowReverseMax.Request event
Added - Player.SkipForward.Request event
Added - Player.SkipBack.Request event
Added - Player.Eject.Request event
Added - Player.Stop.Request event
Added - Player.Play.Status event
Added - Player.PlayReverse.Status event
Added - Player.Still.Status event
Added - Player.Slow.Status event
Added - Player.SlowReverse.Status event
Added - Player.FastForward.Status event
Added - Player.FastReverse.Status event
Added - Player.NoMedia.Status event
Added - Player.Stop.Status event
Added - Player.SkipForward.Status event
Added - Player.SkipBack.Status event
Added - Player.SearchForward.Status event
Added - Player.SearchReverse.Status event
Added - Player.Other.Status event
Added - Player.LgOther.Status event

Added - Tuner.StatusRequest event
Added - Tuner.Off.Status event
Added - Tuner.Digital.Status event
Added - Tuner.Analog.Status event
Added - Tuner.ChannelUp.Request event
Added - Tuner.ChannelDown.Request event

Added - Menu.StateRequest event
Added - Menu.Activate.Request event
Added - Menu.Deactivate.Request event
Added - Menu.LanguageSet.Request.(2 letter language code) event
Added - Menu.LanguageGet.Request event
Attachments
PulseEightPlus-0.3.0b.egplugin
(368.26 KiB) Downloaded 23 times
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by nYce » Thu May 03, 2018 10:12 am

kgschlosser wrote:
Thu May 03, 2018 12:31 am
I do have a question for ya. do you get events if you go and manually turn up the volume on your avr? do the volume actions work?
All tests with the DENON AVR-X540BT and the DENON AVR-X2400H.

Testing both versions, since i found out, i don't get power events on 0.3.0 anymore:
PulseEightPlus-0.3.0b.egplugin
PulseEightPlus-0.2.1b.egplugin


Actions:
Volume Up does work.
Volume Down does work.

get AVR Volume:
just gives me this line in the log, but nothing happens:

Code: Select all

11:46:43   Pulse-Eight CEC+: Get AVR Volume: Adapter: PC on COM8

Set AVR Volume:
gives me an error if i switch the Adapter (Beamer is default, switching to PC):

Code: Select all

11:47:07   Traceback (most recent call last) (WIP-2018.03.02-11.16.00):
11:47:07     File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\gui_controls.py", line 1788, in on_choice
11:47:07       choices.remove('')
11:47:07   ValueError: list.remove(x): x not in list
Running the Action seems to set the volume but crashes EG. Sometimes at least..

Events:
I dont get any events from turning the AVR volume on the AVR or by remote. (not in both P8+ versions)

---


After my tests i found out! there seems to be a bug in your last version: I dont get any events.
So power on/off events like in your last version (0.2.1b): 11:59:22 PulseEight.PC.Audio.Power.On
are completly gone.


---

On my setup i set to wake the AVR for my PC adapter (just this one, the other one i dont want to wake).
On initialize i get following output:
12:18:45 CEC Adapter Started
12:18:45 Adapter Name: PC
12:18:45 Adapter Serial Port: COM8
12:18:45 Adapter Device Emulation: recording device, playback device
12:18:45 Available Devices: PC, Playback 1, AVR-X540BT
12:18:45 AVR Volume Control: On
12:18:45 CEC Adapter Started
12:18:45 Adapter Name: Beamer
12:18:45 Adapter Serial Port: COM9
12:18:45 Adapter Device Emulation: recording device, playback device
12:18:45 Available Devices: Beamer, Playback 1, AVR-X2400H
12:18:45 AVR Volume Control: Off

It seems like the AVR Volume Control is just linked to the "Wake AVR" in the plugin Settings?


---
for my PC adapter i turned all logs on. So there should be some stuff. But why does it Poll soooo often?
Running 0.3.0b just to check whats in the info:

Code: Select all

12:17:29   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:29   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:29   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:30   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:31   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:31   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:31   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:31   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
12:17:31   DEBUG: 0 Dummy-12: CEC DEBUG: PC: << Recorder 1 (1) -> TV (0): POLL
These lines just repeat endlessly.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 03, 2018 4:45 pm

CEC is all based off having a Master device in the chain. and that master device is a TV. so if you don't have one the libCEC software is written so that it keeps on asking the adapter to look check for one.

I think I know where i broke the events. i will check into it in a bit.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Thu May 03, 2018 5:44 pm

OK so here is a new version

The SetVolume has been changed so it will not cause EG to hang if it fails.
Fixed an issue with the Config dialogs having problems with loading the devices.
Fixed Power Events
Fixed avr audio not being set.
Fixed startup output for an adapter to reflect the avr audio and not the wake avr setting.



When you use a "Get" action these actions do not show anything. they return information that information gets set into the variable eg.result. is you want to see the information then what you need to do is create a macro, add the get action to that macro. then add the action EventGhost\Dump Result to Log make sure the dump result is after the Get action, this will print out the information that has been returned to the log.

The Get actions are useful in python scripting. or as an example for use in something like the OSD action. in a lot of actions you have the ability to do {eg.result} in a text field which will populate that specific field at action run time.
Attachments
PulseEightPlus-0.3.1b.egplugin
(368.43 KiB) Downloaded 24 times
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by nYce » Thu May 03, 2018 10:20 pm

kgschlosser wrote:
Thu May 03, 2018 4:45 pm
CEC is all based off having a Master device in the chain. and that master device is a TV. so if you don't have one the libCEC software is written so that it keeps on asking the adapter to look check for one.

I think I know where i broke the events. i will check into it in a bit.
Hmm. but i think that often (~14 times a second) is power/cpu consuming? can we allow the plugin/adapter to host as a master itself? or can we just stop it from looking?

I'll check your new version in a second :)

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

Re: Pulse-Eight CEC +

Post by nYce » Thu May 03, 2018 11:19 pm

kgschlosser wrote:
Thu May 03, 2018 5:44 pm
OK so here is a new version

The SetVolume has been changed so it will not cause EG to hang if it fails.
Fixed an issue with the Config dialogs having problems with loading the devices.
Fixed Power Events
Fixed avr audio not being set.
Fixed startup output for an adapter to reflect the avr audio and not the wake avr setting.



When you use a "Get" action these actions do not show anything. they return information that information gets set into the variable eg.result. is you want to see the information then what you need to do is create a macro, add the get action to that macro. then add the action EventGhost\Dump Result to Log make sure the dump result is after the Get action, this will print out the information that has been returned to the log.

The Get actions are useful in python scripting. or as an example for use in something like the OSD action. in a lot of actions you have the ability to do {eg.result} in a text field which will populate that specific field at action run time.

with this new version:

Power events are working again, thx.

---

at the beginning i'm getting the following log. What does it mean?
00:46:26 CEC INFO: PC: << 10
00:46:27 CEC INFO: PC: << 10
00:46:27 CEC INFO: PC: << 10
00:46:27 CEC INFO: PC: << 10
00:46:28 CEC INFO: PC: << 10
00:46:28 CEC INFO: PC: << 10
00:46:28 CEC INFO: PC: << 10
00:46:28 CEC INFO: PC: << 10
00:46:29 CEC INFO: PC: << 15:8f
00:46:29 CEC INFO: PC: << 10
00:46:29 CEC INFO: PC: << 10
00:46:29 CEC INFO: PC: >> 51:90:00
00:46:30 CEC INFO: PC: << 15:71
00:46:30 CEC INFO: PC: >> 51:7a:37
00:46:30 CEC INFO: PC: << 10
00:46:31 CEC INFO: PC: << 10
00:46:31 CEC INFO: PC: << 10
00:46:31 CEC INFO: PC: << 10
00:46:31 CEC INFO: PC: << 10
00:46:32 CEC INFO: PC: << 10
00:46:32 CEC INFO: PC: << 10
00:46:32 CEC INFO: PC: << 10
00:46:33 CEC INFO: PC: << 10
00:46:33 CEC INFO: PC: << 10
---

Set Volume throws this error now:

Code: Select all

00:59:18   Exception in thread Thread-15:
00:59:18   Traceback (most recent call last):
00:59:18     File "threading.pyc", line 801, in __bootstrap_inner
00:59:18     File "threading.pyc", line 754, in run
00:59:18     File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\__init__.py", line 1290, in do
00:59:18       event = threading.event()
00:59:18   AttributeError: 'module' object has no attribute 'event'
00:59:18   

Post Reply