MQTT Plugin (4 Viewers)

applebee1

Portal Member
October 25, 2007
45
27
Add MQTT Commands ...
Very interessting - I have it installed and MP is sending messages (can see it with MQTT explorer).

I tried sending to MP - e.g. /Mediaportal/mypc/Command/message "30" for just cursor up, but nothing is coming to MP.
Should it work, if yes - what I am doing wrong?
 

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,041
    11,115
    Kyiv
    Home Country
    Ukraine Ukraine
    • Thread starter
    • Moderator
    • #34
    Command/message
    This is for displaying messages, and the plugin expects json there, an example in the first post.
    To emulate clicks, a topic is used - button.
    Like:
    *** Press button:
    Topic: Mediaportal/PC-NAME/Command/button
    Value: 34
     

    applebee1

    Portal Member
    October 25, 2007
    45
    27
    Thanks for your confirmation that it should work ;-)

    I am using Windows MQTT explorer for testing purpose - and it seems that its sending something??
    Where can it see it arrives and beeing

    Do I have to configure the input mapping with something, a key to a number or whatever. I have disabled the HID plugin in MP as I am using eventghost with IR transmitter.

    Another thing now: I have upgraded to MP 1.31 and with this version when MQTT plugin enabled - it crashes when watching live TV. I have checked it - live TV works when plugin is disabled, when enabled - MP live TV crashes MP...

    I was so happy that I found this plugin when using MP and homeassistant (as eventghost with MQTT plugins is not anymore online/can't find to download)...
     

    Attachments

    • MQTT.JPG
      MQTT.JPG
      126.2 KB

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,041
    11,115
    Kyiv
    Home Country
    Ukraine Ukraine
    • Thread starter
    • Moderator
    • #36
    Where can it see it arrives and beeing
    You can turn on the debug mode in the plugin, I don't remember if it's in the GUI configurator, but it's definitely in the configuration file.
    Do I have to configure the input mapping with something, a key to a number or whatever. I have disabled the HID plugin in MP as I am using eventghost with IR transmitter.
    The standard mapping is used, the Media Portal is not at hand now, but in my opinion there are settings for it in the MQTT plugin.
    Another thing now: I have upgraded to MP 1.31 and with this version when MQTT plugin enabled - it crashes when watching live TV. I have checked it - live TV works when plugin is disabled, when enabled - MP live TV crashes MP...
    Any Logs?
    I was so happy that I found this plugin when using MP and homeassistant (as eventghost with MQTT plugins is not anymore online/can't find to download)...
    Well, I hope we find what the problem is and solve them, I use the plugin every day, and so far I have not found any problems.
     

    applebee1

    Portal Member
    October 25, 2007
    45
    27
    Topic: Mediaportal/PC-NAME/Command/button Payload (Value): 34 not Value: 34 only Key Number code :)
    Thanks - I have tried both ways.... ;-)

    ..and here comes the log - it is starting when I press the enable live TV button in MP.
    Then it writes constantly error messages - see below - until I terminate the task (MP is freezed). Without MQTT plugin live TV works as expected.
    (the previous hartbeat error is also there when MQTT is disabled, it doesn't impact the program execution)

    [2023-08-07 13:07:53,962] [Log ] [MPMain ] [ERROR] - Exception: System.TypeLoadException: Der Typ "LatestMediaHandler.MQTTItem" in der Assembly "LatestMediaHandler, Version=2.3.0.52, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden.
    bei MQTTPlugin.MQTTPlugin.SetLevelForPlayback(String mediaType, String Level)
    bei MQTTPlugin.MQTTPlugin.OnPlayBackStopped(MediaType type, Int32 i, String s)
    bei MediaPortal.Player.g_Player.StoppedHandler.Invoke(MediaType type, Int32 stoptime, String filename)
    bei MediaPortal.Player.g_Player.OnStopped()
    bei MediaPortal.Player.g_Player.doStop(Boolean keepTimeShifting, Boolean keepExclusiveModeOn)
    bei MediaPortal.Player.g_Player.Stop()
    bei MediaPortal.D3D.OnFormClosing(FormClosingEventArgs formClosingEventArgs)
    bei System.Windows.Forms.Form.WmClose(Message& m)
    bei System.Windows.Forms.Form.WndProc(Message& m)
    bei MediaPortalApp.WndProc(Message& msg) Message: Der Typ "LatestMediaHandler.MQTTItem" in der Assembly "LatestMediaHandler, Version=2.3.0.52, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden. Site : Void SetLevelForPlayback(System.String, System.String) Source : MQTTPlugin Stack Trace: bei MQTTPlugin.MQTTPlugin.SetLevelForPlayback(String mediaType, String Level)
    bei MQTTPlugin.MQTTPlugin.OnPlayBackStopped(MediaType type, Int32 i, String s)
    bei MediaPortal.Player.g_Player.StoppedHandler.Invoke(MediaType type, Int32 stoptime, String filename)
    bei MediaPortal.Player.g_Player.OnStopped()
    bei MediaPortal.Player.g_Player.doStop(Boolean keepTimeShifting, Boolean keepExclusiveModeOn)
    bei MediaPortal.Player.g_Player.Stop()
    bei MediaPortal.D3D.OnFormClosing(FormClosingEventArgs formClosingEventArgs)
    bei System.Windows.Forms.Form.WmClose(Message& m)
    bei System.Windows.Forms.Form.WndProc(Message& m)
    bei MediaPortalApp.WndProc(Message& msg)
    [2023-08-07 13:07:53,982] [Log ] [MPMain ] [ERROR] - Exception: System.TypeLoadException: Der Typ "LatestMediaHandler.MQTTItem" in der Assembly "LatestMediaHandler, Version=2.3.0.52, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden.
    bei MQTTPlugin.MQTTPlugin.SetLevelForPlayback(String mediaType, String Level)
    bei MQTTPlugin.MQTTPlugin.OnPlayBackStopped(MediaType type, Int32 i, String s)
    bei MediaPortal.Player.g_Player.StoppedHandler.Invoke(MediaType type, Int32 stoptime, String filename)
    bei MediaPortal.Player.g_Player.OnStopped()
    bei MediaPortal.Player.g_Player.doStop(Boolean keepTimeShifting, Boolean keepExclusiveModeOn)
    bei MediaPortal.Player.g_Player.Stop()
    bei MediaPortal.D3D.OnFormClosing(FormClosingEventArgs formClosingEventArgs)
    bei System.Windows.Forms.Form.WmClose(Message& m)
    bei System.Windows.Forms.Form.WndProc(Message& m)
    bei MediaPortalApp.WndProc(Message& msg) Message: Der Typ "LatestMediaHandler.MQTTItem" in der Assembly "LatestMediaHandler, Version=2.3.0.52, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden. Site : Void SetLevelForPlayback(System.String, System.String) Source : MQTTPlugin Stack Trace: bei MQTTPlugin.MQTTPlugin.SetLevelForPlayback(String mediaType, String Level)
    bei MQTTPlugin.MQTTPlugin.OnPlayBackStopped(MediaType type, Int32 i, String s)
    bei MediaPortal.Player.g_Player.StoppedHandler.Invoke(MediaType type, Int32 stoptime, String filename)
    bei MediaPortal.Player.g_Player.OnStopped()
    bei MediaPortal.Player.g_Player.doStop(Boolean keepTimeShifting, Boolean keepExclusiveModeOn)
    bei MediaPortal.Player.g_Player.Stop()
    bei MediaPortal.D3D.OnFormClosing(FormClosingEventArgs formClosingEventArgs)
    bei System.Windows.Forms.Form.WmClose(Message& m)
    bei System.Windows.Forms.Form.WndProc(Message& m)
    bei MediaPortalApp.WndProc(Message& msg)
     

    Attachments

    • log.zip
      16.6 KB

    applebee1

    Portal Member
    October 25, 2007
    45
    27
    in addition: the plugin latest media handler is disabled in MP

    and when lastest media handler is enabled - same problem...
     
    Last edited:

    Users who are viewing this thread

    Top Bottom