Pulse-Eight CEC +

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Fri May 04, 2018 12:00 am

OK so the SetVolume should now be fixed.

That information is because you have logging enabled for the adapter you have named "PC".

Did you have a chance to check out the GetVolume yet? I am curious to know if it is not working. Try that first before the set volume because the set volume relies on get volume. kinda funny how that works. But it is because libCEC gives no concession for volume direct input. So how i have done added it is i grab the current volume level. if the volume level you want to set it to is higher i call volume up and if lower i call volume down. after that call i grab the volume again to see if it has changed and if not the program waits 1 second and checks again. if it still has not changed then it exits. if it has it loops back to the beginning. it does this until the reported volume is the same as the volume that you want to set it to. Kinda crafty eh?

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

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Fri May 04, 2018 12:35 am

as far as the logging data you saw


message format
[source][destination]:[command]:[command parameters]

Code: Select all

00:46:29 CEC INFO: PC: << 15:8f   - source is a TV destination is an AVR : the command is give power status
00:46:29 CEC INFO: PC: << 10   ??? I Have no idea
00:46:29 CEC INFO: PC: << 10   ??? I Have no idea
00:46:29 CEC INFO: PC: >> 51:90:00 - source is an AVR destination is a TV : command is report power status : and the parameters is power on
00:46:30 CEC INFO: PC: << 15:71 - TV AVR : Audio Status
00:46:30 CEC INFO: PC: >> 51:7a:37 AVR TV : Report Audio Status : and i believe the 37 is for 55% volume level.

Now if you do not have any device emulation boxes checked off then I am going to guess that the adapter defaults to a TV.
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 » Fri May 04, 2018 1:57 am

Test on PulseEightPlus-0.3.2b.egplugin
kgschlosser wrote:
Fri May 04, 2018 12:35 am
as far as the logging data you saw


message format
[source][destination]:[command]:[command parameters]

Code: Select all

00:46:29 CEC INFO: PC: << 15:8f   - source is a TV destination is an AVR : the command is give power status
00:46:29 CEC INFO: PC: << 10   ??? I Have no idea
00:46:29 CEC INFO: PC: << 10   ??? I Have no idea
00:46:29 CEC INFO: PC: >> 51:90:00 - source is an AVR destination is a TV : command is report power status : and the parameters is power on
00:46:30 CEC INFO: PC: << 15:71 - TV AVR : Audio Status
00:46:30 CEC INFO: PC: >> 51:7a:37 AVR TV : Report Audio Status : and i believe the 37 is for 55% volume level.

Are the 10s maybe the Poll for the master device? Although it just stops them after a while..
kgschlosser wrote:
Fri May 04, 2018 12:35 am
Now if you do not have any device emulation boxes checked off then I am going to guess that the adapter defaults to a TV.
I have at least checked "recording device". I think it doesnt work, if i leave all boxes unchecked. Then i cant set Adapter/devices properly.
kgschlosser wrote:
Fri May 04, 2018 12:00 am
OK so the SetVolume should now be fixed.

Did you have a chance to check out the GetVolume yet? I am curious to know if it is not working. Try that first before the set volume because the set volume relies on get volume. kinda funny how that works. But it is because libCEC gives no concession for volume direct input. So how i have done added it is i grab the current volume level. if the volume level you want to set it to is higher i call volume up and if lower i call volume down. after that call i grab the volume again to see if it has changed and if not the program waits 1 second and checks again. if it still has not changed then it exits. if it has it loops back to the beginning. it does this until the reported volume is the same as the volume that you want to set it to. Kinda crafty eh?

attached is a new version.
Getting AVR volume:

Code: Select all

03:54:43   Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
03:54:43      Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
03:54:44      Dump Result to Log
03:54:44         55
Setting AVR volume:

Code: Select all

03:54:59   Pulse-Eight CEC+: Set Volume to 5: Adapter: Beamer on COM9
Getting AVR volume:

Code: Select all

03:55:18   Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
03:55:18      Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
03:55:19      Dump Result to Log
03:55:19         55
It just does one volume up on the setVolume (from -30,5db to -31db).. and the get always returns 55.

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Fri May 04, 2018 6:32 am

ok so define always.


you have a Denon/Marantz AVR. and they both have a volume range of -80 to +10. (there is sometimes a boosted volume to +18 depending on DSP mode)


so if we re-range those numbers to a 0 to 100

Code: Select all

def re_range(value, o_min, o_max, n_min, n_max):
  return (value - o_min) * (n_max - n_min) / (0_max - 0_min) + n_min

new_min = 0
new_max = 100
old_min = -80
old_max = 10

old_value = -30

print re_range(old_value, old_min, old_max, new_min, new_max)

old_value = 30.5
print re_range(old_value, old_min, old_max, new_min, new_max)

the output is

Code: Select all

55
55.0
because your AVR does a 0.5 step on the volume. and because of how the ranges are set up you would have to decrease the volume to 31 to see a change in the numbers.

Now I know you stated it always returns 55. and I know This is going to be one of those questions again. But the 55 does line up with the -30.0 and -30.5 so for the sake of me knowing the answer. You did try it with the volume set to say -50?

I do not have a CEC compliant AVR and if there is an issue it is going to take me a bit to work through. I already know why it only makes a single step and the funny thing is I already fixed that issue several hours ago.


now provided the get volume returns a value other then 55 the next bit should work.

I have attached a new version that should hopefully address the issue with the single step on the volume. The thing with how it is going to work is because of the .5 step and the fact that the CEC protocol only handles 1 percent at a time. there are cases as in your example where -30 and -30.5 both are 55% so when you tell the volume to increase to 55% it is going to stop at -30 and if you decrease to 55% it will stop at 30.5. the volume up and down will do the .5 for ya.

Now what i do not know is how long it will take in order to change the volume from say 10% to 80%. I set a timeout for the thread for 10 seconds. I feel this should be a long enough amount of time. if it is not let me know.

also. do you get events for the volume change if you manually turn the knob on the AVR?
Attachments
PulseEightPlus-0.3.3b.egplugin
(368.4 KiB) Downloaded 26 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 » Fri May 04, 2018 12:01 pm

Alright. Lets specify:

i got
DENON AVR-X2400h (my Beamer chain, Com9 adapter)
DENON AVR-X540BT (my PC chain, Com8 adapter)

Both devices have a range from -79,5dB - 18.0dB
i can also set it to % but i like this scale more.

---

test now:
PulseEightPlus-0.3.3b.egplugin
DENON AVR-X2400h (my Beamer chain, Com9 adapter)

Volume is manually set to -10dB.
GetVolume:
13:54:09 Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:54:09 Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:54:09 Dump Result to Log
13:54:09 71
Volume is manually set to -20dB.

Code: Select all

13:55:14   Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:55:14      Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:55:14      Dump Result to Log
13:55:14         71

Volume is manually set to -50dB.

Code: Select all

13:55:14   Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:55:14      Pulse-Eight CEC+: Get AVR Volume: Adapter: Beamer on COM9
13:55:14      Dump Result to Log
13:55:14         71

So as i said: it stays.
in a test before i always got the value 42.
Maybe it just updates all 5min or something?
Is there a delay i can ask for the values?
Do i have to clear the result var?
The value seems to be maybe not that bad for the first value (71%=-10db?)?



Set the Volume gives my following error traceback:

Code: Select all

13:57:56   Pulse-Eight CEC+: Set Volume to 10: Adapter: Beamer on COM9
13:57:57   Exception in thread Thread-14:
13:57:57   Traceback (most recent call last):
13:57:57     File "threading.pyc", line 801, in __bootstrap_inner
13:57:57     File "threading.pyc", line 754, in run
13:57:57     File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\__init__.py", line 1290, in do
13:57:57       start = time.time()
13:57:57   NameError: global name 'time' is not defined
13:57:57 
---

ah.. so much to write down, maybe we should just do a teamviewer/remote session and i show you all the stuff to let you see :X

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Fri May 04, 2018 2:21 pm

that would be a whole hell of a lot easier.

And shit I thought i did an import for the time module.


Here is the fix for the time issue.

The updates come in every 200 milliseconds, You should see this if you turn on the debugging option for one of the adapters.
But... what i do not know is how long before the AVR will report a volume change.

The scale on your AVR is irreverent because all the AVR does is run the same code as i provided to you in the previous post and converts the 0-100 back to DB because the internals of the AVR use the 0db as a reference to clean output power. and the 0-100 scale on your AVR will support half percent steps. the issue is that the cec protocol does not support half percentages only whole. But the VolumeUp and VolumeDown commands in the CEC protocol that your AVR uses causes the volume to move only a 1/2 point. but this will report back the same percentage. It's a bug in the programming of the AVR. The avr should move the volume the correct amount as dictated by the CEC protocol. or they need to change the CEC specification. but for the life of me I have no idea where to submit the change. Now on the other hand i can start making some noise to Marantz/Denon tho the people there are the biggest idiots. If you ahve the time you should take a look at their API for controlling those things over TCP. There is no standard at all between their commands. it looks like one person created it. they quit or got fired. then another took over and did something different. and this process has happened no less the 10 times. Not a single person followed a format that was used by another individual. it's loony tunes. The reason that it is such a headache is because they have some bonkers number of commands with an even larger number of responses and the responses can vary between models/firmwares and to make it all worse they don't even have everything documented and they can't answer what some of the things are. they simply send a link to their site where the file they want you to download is corrupted LOL. and it is apparent the issues do not stop there and are also with their interpenetration of the CEC protocol.

I really did want to by a Marantz 8805 with 8077 amp and a 7025 amp to run the subs. but with the software issues and the API being a disaster it makes me wonder how the rest is. because those are the really simple things to get right. So I have decided to stick with my Harman Kardon 745 it's 12 years old but with the power supply upgrade I did and because my Kef's run at 6ohm i should be getting around 1000 watts RMS out of it. It sucks because I am not able to use the internal video switching for it because they did not give you a video pass through feature for the HDMI. so it is limited to HDMI 1.1. 1080i video. But since I have everything on HTPC's it really isn't that much of an issue.

attached is a new version. But I am thinking that the set volume is not going to work properly if you are not getting correct volume's returned when you change the volume.



If you add a dump result to log after a volume up or down action this should return the new volume. Now remember you may have to execute the macro 2 times before you see a change.

even better if you add the following to a python script and put the script after either of those actions it will convert the percent back to dB.

Code: Select all

def re_range(value, o_min, o_max, n_min, n_max):
  return (value - o_min) * (n_max - n_min) / (o_max - o_min) + n_min

new_min = -80
new_max = 18
old_min = 0
old_max = 100

db_volume = re_range(eg.result, old_min, old_max, new_min, new_max)

eg.plugins.EventGhost.ShowOSD('Volume {0}{1} {2} dB'.format('/' * eg.result, '.' * (100 - eg.result), str(db_volume)), u'0;-33;0;0;0;700;0;0;0;0;3;2;1;66;Lucida Handwriting', (13, 243, 1), (0, 0, 0), 5, (0, 0), 0, 5.0, None)
There is a nice little bonus in this script for ya
Attachments
PulseEightPlus-0.3.4b.egplugin
(368.43 KiB) Downloaded 23 times
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1299
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Pulse-Eight CEC +

Post by jonib » Fri May 04, 2018 3:24 pm

Hi, so this thread kept bugging me so I got a Pulse-Eight CEC adapter, even though I feel it's a bit expensive just to turn On and Off my HDTV. :oops:

Using Windows 10 Pro 64bit (1709), EventGhost 0.5.0-rc4 with PulseEightPlus-0.3.4b.egplugin

Quick comments for the plugin:
The "Loading adapters" in the config is very slow for me any chance it could cache the settings or something?

When adding actions it would be nice if my one and only adapter was autoselected (this is minor but still annoying)

I'm trying to do a HDMI-CEC command to power on my HDTV when EventGhost starts using "Main.OnInit" but I get a "CEC: Adapter EventGhost on com port COM3 not found" warning as the CEC stuff hasn't initialized yet, so a event when it has initialized would be nifty.


I also got these errors trying stuff out:

Code: Select all

Pulse-Eight CEC+: Send "Setup Menu" Remote Key to TV: Adapter: EventGhost on COM3
   Pulse-Eight CEC+: Send "Setup Menu" Remote Key to TV: Adapter: EventGhost on COM3
      Error in Action: "Pulse-Eight CEC+: Send "Setup Menu" Remote Key to TV: Adapter: EventGhost on COM3"
      Traceback (most recent call last) (0.5.0-rc4):
        File "C:\Program Files (x86)\Utils\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
          return self(*args)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__init__.py", line 1181, in __call__
          (key, device, adpater.name)
      NameError: global name 'adpater' is not defined

Spelling error: should be "adapter"

Code: Select all

Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3
   Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3
      Error in Action: "Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3"
      Traceback (most recent call last) (0.5.0-rc4):
        File "C:\Program Files (x86)\Utils\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
          return self(*args)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__init__.py", line 1564, in __call__
          dev.display_osd_message(message, duration)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\__init__.py", line 587, in display_osd_message
          self._adapter.SetOSDString(self._logical_address, duration, label)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\cec\__init__.py", line 1250, in SetOSDString
          return _cec.ICECAdapter_SetOSDString(self, iLogicalAddress, duration, strMessage)
      TypeError: in method 'ICECAdapter_SetOSDString', argument 4 of type 'char const *'

I'm having a problem sending a "Power on" to my HDTV after resuming from sleep, I'll post a followup after some more testing.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat May 05, 2018 2:50 pm

Hey jonib. Thanks for the suggestions. I have implimented all of them. And also fixed the errors you posted. I am working on the loading of the adapters I will. Hopefully have it finished up today.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat May 05, 2018 3:00 pm

As far as the sleep thing goes. If your computer drops power to that USB port it then disconnects the adapter. I will have to reconnect libCEC when the system resumes. Now I can do this. But there is going to be no choice in it. And it is a slow process. If you change the power options for the USB port so it retains power through a sleep. The plug-in should still work properly without the need to reconnect. So either I can code in the reset of the adapter whether or not the power stays on or I can tell folks to keep that USB powered up.

Don't know what should be done in this case
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1299
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Pulse-Eight CEC +

Post by jonib » Sat May 05, 2018 4:17 pm

kgschlosser wrote:
Sat May 05, 2018 2:50 pm
Hey jonib. Thanks for the suggestions. I have implimented all of them. And also fixed the errors you posted. I am working on the loading of the adapters I will. Hopefully have it finished up today.
Nice
As far as the sleep thing goes. If your computer drops power to that USB port it then disconnects the adapter. I will have to reconnect libCEC when the system resumes. Now I can do this. But there is going to be no choice in it. And it is a slow process. If you change the power options for the USB port so it retains power through a sleep. The plug-in should still work properly without the need to reconnect. So either I can code in the reset of the adapter whether or not the power stays on or I can tell folks to keep that USB powered up.

Don't know what should be done in this case
I did some more testing and now I can't turn on the HDTV at all, even after a full reboot/shutdown. :(

Code: Select all

CEC: Loading Adapters...
CEC: Starting adapter EventGhost on port COM3
CEC Adapter Started
Adapter Name: EventGhost
Adapter Serial Port: COM3
Adapter Device Emulation: playback device
Available Devices: TV, EventGhost
AVR Volume Control: Off
CEC INFO: EventGhost: << 40:8f
CEC INFO: EventGhost: >> 04:90:02
Pulse-Eight CEC+: Power On TV: Adapter: Broadcast on COM3
   Wait: 5.0 sec(s)
      CEC INFO: EventGhost: << 40:8f
      CEC INFO: EventGhost: >> 04:90:02
   Pulse-Eight CEC+: Power On TV: Adapter: EventGhost on COM3
      CEC NOTICE: EventGhost: << powering on 'TV' (0)
      CEC INFO: EventGhost: << 40:04
   Pulse-Eight CEC+: Set TV as Active Source: Adapter: EventGhost on COM3
      CEC NOTICE: EventGhost: >> source activated: Playback 1 (4)
      CEC NOTICE: EventGhost: << powering on 'TV' (0)
      CEC INFO: EventGhost: << 40:04
      CEC NOTICE: EventGhost: << Playback 1 (4) -> broadcast (F): active source (2000)
      CEC INFO: EventGhost: << 4f:82:20:00
      CEC INFO: EventGhost: << 40:8e:00
CEC INFO: EventGhost: << 40:8f
CEC INFO: EventGhost: >> 04:90:02
So I tried "echo as | cec-client.exe -s" and it did not work either but the log seemed to indicate that the HDTV did power on very weird. :?

So I manually turned on my HDTV and now the plugin can turn the HDTV on/off again. :shock: The TV was off since yesterday.

The HDTV is a "Samsung LE40A766"

jonib

ps:
Unrelated but boy would it be nice if I got notified by email about new posts on this forum. :(
XBMC2 plugin to control XBMC. If you want to flatter me Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sat May 05, 2018 6:54 pm

You should be getting emails. I will double check the log and see if there are any errors. It will be about 20 minutes until I can do that.

The cec protocol is a mystical thing. My suggestion is if you are having problems with it is to unplug the HDMIs and usb from the adapter. Then unplug all devices f om power. First plug in the TV. Then the adapter. Then each dvice after that.
If you like the work I have been doing then feel free to Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sun May 06, 2018 8:20 am

@jonib

Did you get the test e-mail i sent from the forum?, I tested the e-mail system and it send to my gmail account without issue. and there are no errors in the logs. I wonder if your e-mail provider is blocking it.


Well i did as you requested. kind of. I think i one upped ya on this.

I did manage to speed up the connection times. This is only going to work if you have several plugins. the number of plugins is a guess.. If you want to use the Main.OnInit to cause some kind of action to take place with this plugin you are going to need to put it at the very top of the plugin list. It might work. if it does not i did add the connected event like you requested.

I also added a disconnected event.

The connected and disconnected events are dynamic. so if you unplug the adapter or plug the adapter in it will properly handle connecting and disconnecting the thing. (This may solve the issue with the sleep)

I reworked the plugin config dialog. It loads a whole heap faster. and the dialog will auto update when plugging or unplugging the device while it is open. The caption bar for the adapter will pulse red if the adapter is not connected. If you open the dialog and then plug in an adapter that has not been configured before it will make a new fold panel for that adapter. :D

I reformatted the plugin config dialog so it is narrower then it was before.
There was an issue when folding the panels in the plugin config. if you collapsed them all the bars would move to the top. This is no longer the case. they now all close to the bottom as they should.

I also fixed the typo.
I believe i fixed the OSD thing. you will have to check that.

I still need more information as far as the sleep issue goes. so i have yet to address that issue.
Attachments
PulseEightPlus-0.4.0b.egplugin
(370.22 KiB) Downloaded 26 times
If you like the work I have been doing then feel free to Image

jonib
Plugin Developer
Posts: 1299
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Pulse-Eight CEC +

Post by jonib » Sun May 06, 2018 1:14 pm

kgschlosser wrote:
Sun May 06, 2018 8:20 am
@jonib

Did you get the test e-mail i sent from the forum?, I tested the e-mail system and it send to my gmail account without issue. and there are no errors in the logs. I wonder if your e-mail provider is blocking it.
No mail, I logged in to my web-mail and checked and there should be no problem blocking mails.

Well i did as you requested. kind of. I think i one upped ya on this.
So I made a blank/new config as I had 10+ years of crap in it, and when I added your updated Pulse-Eight CEC+ plugin I got this:

Code: Select all

Traceback (most recent call last) (0.5.0-rc4):
  File "wx\_core.pyc", line 16766, in <lambda>
  File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__init__.py", line 979, in add_adapter
    ) = adptr
ValueError: need more than 4 values to unpack
and a blank "Scanning for adapters...." dialog.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1299
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Pulse-Eight CEC +

Post by jonib » Sun May 06, 2018 1:49 pm

Using my old config.
kgschlosser wrote:
Sun May 06, 2018 8:20 am
I did manage to speed up the connection times. This is only going to work if you have several plugins. the number of plugins is a guess.. If you want to use the Main.OnInit to cause some kind of action to take place with this plugin you are going to need to put it at the very top of the plugin list. It might work. if it does not i did add the connected event like you requested.
Thanks for the connected event now I can, disable the CEC plugin when the system goes to sleep and the enable it when resuming, and with the event I know when it's ready and it seems to work now.
I reworked the plugin config dialog. It loads a whole heap faster. and the dialog will auto update when plugging or unplugging the device while it is open. The caption bar for the adapter will pulse red if the adapter is not connected. If you open the dialog and then plug in an adapter that has not been configured before it will make a new fold panel for that adapter. :D
Much better now it loads very fast. :D
I believe i fixed the OSD thing. you will have to check that.
:(

Code: Select all

Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3
   Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3
      Error in Action: "Pulse-Eight CEC+: Display a message on a TV: Adapter: EventGhost on COM3"
      Traceback (most recent call last) (0.5.0-rc4):
        File "C:\Program Files (x86)\Utils\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
          return self(*args)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__init__.py", line 1895, in __call__
          dev.display_osd_message(message, duration)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\__init__.py", line 594, in display_osd_message
          ctypes.byref(buf)
        File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__cec_core\cec\__init__.py", line 1250, in SetOSDString
          return _cec.ICECAdapter_SetOSDString(self, iLogicalAddress, duration, strMessage)
      TypeError: in method 'ICECAdapter_SetOSDString', argument 4 of type 'char const *'
I still need more information as far as the sleep issue goes. so i have yet to address that issue.
So it looks like If I disable the plugin before sleep and enable it after it works. but there seems to be a problem with (my HDTV or the CEC adapter) when the HDTV is in standby mode over night then I need to power it on via the remote. But I need to do some more testing with this.


New error:

Code: Select all

Exception in thread Thread-5:
Traceback (most recent call last):
  File "threading.pyc", line 801, in __bootstrap_inner
  File "threading.pyc", line 754, in run
  File "C:\ProgramData\EventGhost\plugins\PulseEightPlus\__init__.py", line 1029, in populate
    for adapter in adapter_ctrl:
TypeError: '_wxPyDeadObject' object is not iterable
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

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

Re: Pulse-Eight CEC +

Post by kgschlosser » Sun May 06, 2018 3:49 pm

ok i will add some exception catching for the latest error.

The OAD issue just dawned on me. The textctrl is probably returning a unicode object. so i will have to decode it using utf8. tho I do not know if the libCEC library supports unicode. I do not believe it does. I will give it a shot tho.

I will also add a shutdown and restart of the plugin when the computer sleeps and wakes.
If you like the work I have been doing then feel free to Image

Post Reply