CECRemote [0.9.7] (6 Viewers)

Tuomaa

Portal Pro
September 21, 2007
129
148
Home Country
Finland Finland
If I want to use the USB remote to control the system and the cec plugin only to switch the tv on and off
- do I then need the cec adapter anyway?
Yes, you need the Pulse-Eight CEC adapter to use this plugin.
 

Zoidberg77

MP Donator
  • Premium Supporter
  • July 12, 2011
    392
    206
    Home Country
    Germany Germany
    Hi,
    libCEC 3.0 has been released (see blog.pulse-eight.com). I don't know if it is noteworthy (since everything is working fine for me with 2.2), just wanted to drop the info.
    Cheers
     

    Tuomaa

    Portal Pro
    September 21, 2007
    129
    148
    Home Country
    Finland Finland

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    Hello @Tuomaa,
    I have noticed a problem with the new version 0.96 after I have configured a new living room client.

    Steps to reproduce:
    1. Start MePo
    2. Send the new client to sleep with it's power button
      The new client is a PiPo x8. A Tablet in a desktop like box. It uses Windows connected standby, not S3. (This also leads to another problem. Will describe it after this one)
    3. Swith of the TV manually
    4. wake up the client with the power button
    5. MePo crash
      The log says that there is a problem with CECRemote
    Code:
    [2015-07-27 14:32:01,923] [Log    ] [17       ] [DEBUG] - CecRemote: Loading configuration...
    [2015-07-27 14:32:01,939] [Log    ] [MPMain   ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2015-07-27 14:32:01,970] [Log    ] [17       ] [DEBUG] - CecRemote: Configuration not set, abort
    [2015-07-27 14:32:01,986] [Log    ] [MPMain   ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Philips TV
    [2015-07-27 14:32:02,002] [Log    ] [17       ] [DEBUG] - CecRemote: Opening connection to CEC-Adapter...
    [2015-07-27 14:32:02,033] [Log    ] [MPMain   ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2015-07-27 14:32:02,048] [Log    ] [17       ] [DEBUG] - CecRemote: Unable to connect, library (libCEC) doesn't exist!
    [2015-07-27 14:32:02,064] [Log    ] [MPMain   ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Terrahorst
    [2015-07-27 14:32:02,095] [Error  ] [17       ] [ERROR] - MediaPortal: Unhandled exception occured
    [2015-07-27 14:32:02,111] [Log    ] [MPMain   ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2015-07-27 14:32:02,142] [Log    ] [17       ] [ERROR] - Exception: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       bei CecRemote.Base.CecClientBase.GetVendor(CecLogicalAddress device)
       bei CecRemote.CecRemoteClient.OnStart()
       bei CecRemote.Base.CecClientBase.ReceiveAlert(CecAlert alert, CecParameter data)
       bei CecSharp.CecCallbackMethods.CecAlertManaged(libcec_alert alert, libcec_parameter* data)  Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.  Site   : System.String GetVendor(CecSharp.CecLogicalAddress)  Source : CecRemote  Stack Trace:     bei CecRemote.Base.CecClientBase.GetVendor(CecLogicalAddress device)
       bei CecRemote.CecRemoteClient.OnStart()
       bei CecRemote.Base.CecClientBase.ReceiveAlert(CecAlert alert, CecParameter data)
       bei CecSharp.CecCallbackMethods.CecAlertManaged(libcec_alert alert, libcec_parameter* data)

    The other thing:
    The new client does not support the legathy Windows powermanagement with S3/S4 ect. only "Windows Connected Standby".
    I have configured the virtual TVOff button to "Suspend Windows". This lead to a situation where I have to unplug the device from power to let it start again.
    Sending the device to Suspend with the MePO GUI leads to the same issue. Sending it to S3 with a batchfile too.
    Do you have any ideas about that?

    Edit:
    What I forgot to mention:
    The plugin in is configured to send my TV and the AVR to standby whet the client goes to sleep. This does not work too. The logs contain this scenario too.

    Edit 2:
    Terminate Screensaver when button pressed does not work with Windows 8.1
     
    Last edited:

    Tuomaa

    Portal Pro
    September 21, 2007
    129
    148
    Home Country
    Finland Finland
    Hello @Tuomaa,
    The new client does not support the legathy Windows powermanagement with S3/S4 ect. only "Windows Connected Standby".
    I have configured the virtual TVOff button to "Suspend Windows". This lead to a situation where I have to unplug the device from power to let it start again.
    Sending the device to Suspend with the MePO GUI leads to the same issue. Sending it to S3 with a batchfile too.
    Do you have any ideas about that?

    Connected standby / InstantGo is problematic, because as far as I know, windows doesn't generate sleep/resume events for it the same way it does for normal S3 etc. sleep states. You said the device is like a tablet in a box. Does it have a display? If the display goes on/off with the connected standby state, monitoring display-guid could be a potential workaround.
     

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    Does it have a display?
    Hello, THX for answering!!
    It has a display!

    upload_2015-7-28_12-20-37.png


    The Display is turned of when the client goes to sleep. I also have connected my TV as a second screen with HDMI (My assumption is that this the normal use case for such boxes).
    So if you want to support such devices you should monitor the display which carries the MePo GUI.
     

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    as far as I know, windows doesn't generate sleep/resume events for it the same way it does for normal S3 etc. sleep states
    It seems to me that there could be a solution for this issue ...
    This is a code example (exe included) that shows how to receive Windows notifications, when a PC is suspended (put into sleep mode) or resumes from sleep.

    Basically, it shows how to implement a WM_POWERBROADCAST notification.

    On Windows 8, however, WM_POWERBROADCAST is no longer sent to a desktop application, unless it explicitely registers for it. A new Windows 8 sleep mode called "connected standby" (enabled on most tablet PCs with Win8) is responsible for that. The code example re-enables WM_POWERBROADCAST for Windows 8 connected standby as well.

    https://downloads.embarcadero.com/Item/29612
     

    Tuomaa

    Portal Pro
    September 21, 2007
    129
    148
    Home Country
    Finland Finland
    It seems to me that there could be a solution for this issue ...

    OK. That code is for delphi, but anyway, seems there is at least unmanaged ways to get those events. Since this is a plugin, ideally it should be mediaportal that subscribes for those messages and passes them to plugins, but that is also somewhat inconvenient since those methods are only available for win 8 +. I still think the monitor trick is at least worth trying, since this is directly from Microsoft:
    ConnectedStandby is synonymous with screen off on an AOAC capable system...
    I'll make some code later to test it and if it doesn't work I look into the other options.
     

    Users who are viewing this thread

    Top Bottom