Ankündigung

Einklappen
Keine Ankündigung bisher.

Plex mit OpenHab steuern

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Plex mit OpenHab steuern

    Hallo in die Runde,

    ich habe bis jetzt immer mehr Ideen mit OpenHab umgesetzt bin aber nun wieder auf ein kleines Problem gestoßen und hoffe ihr könnt mir hier weiterhelfen:

    Ich habe das Plex Binding eingebaut und in der Config folgendes eingetragen. Die IP-Adresse des Plex Server ist korrekt ebenso der Port
    Code:
    ############################## Plex Binding ##########################################
    # IP address of the Plex server
    plex:host=192.xxx.xxx.37
    
    # Optional, port that the Plex server is running on. Default = 32400
    plex:port=32400
    
    # Refresh interval in ms. Default = 5000.
    plex:refresh=5000
    Die Items habe ich aus dem Beispiel https://github.com/openhab/openhab/wiki/Plex-Binding übernommen und die ID des Clients (32894211) übernommen
    Code:
    //Plex Media Server
    Switch PlexTVPower      "Power"         <video>     {plex="32894211#power"}
    String PlexTVStatus     "Status [%s]"   <video>     {plex="32894211#state"}
    String PlexTVTitle      "Title [%s]"    <video>     {plex="32894211#title"}
    String PlexTVType       "Type [%s]"     <video>     {plex="32894211#type"}
    
    Dimmer PlexTVProgress   "Progress [%.1f%%]"    <video>    {plex="32894211#playback/progress"}
    Dimmer PlexTVVolume     "Volume"        <video>     {plex="32894211#playback/volume"}
    Switch PlexTVPause      "Pause"         <video>     {plex="32894211#playback/pause"}
    Switch PlexTVPlay       "Play"          <video>     {plex="32894211#playback/play"}
    Switch PlexTVStop       "Stop"          <video>     {plex="32894211#playback/stop"}
    
    Switch PlexTVSelect     "Select"        <video>     {plex="32894211#navigation/select"}
    Switch PlexTVBack       "Back"          <video>     {plex="32894211#navigation/back"}
    Switch PlexTVUp         "Up"            <video>     {plex="32894211#navigation/moveUp"}
    Switch PlexTVDown       "Down"          <video>     {plex="32894211#navigation/moveDown"}
    Switch PlexTVLeft       "Left"          <video>     {plex="32894211#navigation/moveLeft"}
    Switch PlexTVRight      "Right"         <video>     {plex="32894211#navigation/moveRight"}
    
    Switch PlexTVForward    "Forward"       <video>     {plex="32894211#playback/stepForward"}
    Switch PlexTVReverse    "Reverse"       <video>     {plex="32894211#playback/stepBack"}
    Ebenso habe ich die Sitemap übernommen
    Code:
    Text label="Plex Media" icon="smartheater" {
                     Switch item=PlexTVPower
                     Text item=PlexTVStatus
                     Slider item=PlexTVProgress visibility=[PlexTVStatus!="Stopped"]
                     Setpoint item=PlexTVProgress visibility=[PlexTVStatus!="Stopped"] minValue=0 maxValue=100 step=1
                     Text item=PlexTVTitle visibility=[PlexTVStatus!="Stopped"]
                     Text item=PlexTVType visibility=[PlexTVStatus!="Stopped"]
                     Switch item=PlexTVPause
                     Switch item=PlexTVPlay
                     Switch item=PlexTVStop mappings=[ON="Stop"]
                     Slider item=PlexTVVolume
                    
                     Switch item=PlexTVSelect mappings=[ON="Select"]
                     Switch item=PlexTVBack mappings=[ON="Back"]
                     Switch item=PlexTVUp mappings=[ON="⬆"]
                     Switch item=PlexTVDown mappings=[ON="⬇"]
                     Switch item=PlexTVLeft mappings=[ON="⬅"]
                     Switch item=PlexTVRight mappings=[ON="➡"]
    
                     Switch item=PlexTVForward mappings=[ON="⤏"]
                     Switch item=PlexTVReverse mappings=[ON="⤎"]
                }
    Leider bekomme ich aber keine Infos gesendet, eine Steuerung ist ebenfalls nicht möglich. Ich bekomme immer die Fehlermeldung
    2015-08-14 09:53:46.638 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
    <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
    2015-08-14 09:53:56.799 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
    <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
    Wo liegt hier der Fehler? Muss ich in Plex noch was einstellen?

    Danke und Gruß
    Torsten


    #2
    Hallo Torsten,

    dein Player machineIdentifier sieht komisch aus. Poste mal http://<plex server ip>:<port>/status/sessions nachdem Du einen Film gestartet hast.

    Gruß
    Klaus

    Kommentar


      #3
      Hallo Klaus,

      danke für die schnelle Antwort. Du hattest recht dir ID des Players war falsch....

      Jetzt habe ich nur noch das Problem das ich den Film nicht steuern kann. Also Pause, Play, Stop, funktioniert leider nicht. Die Anzeige des Titels usw. funktioniert nun aber. :-)

      Hier mal das Ergebnis der von http://<plex server ip>:<port>/status/sessions ich habe zur besseren Übersicht nur den Teil des Players übernommen

      Code:
      <Player machineIdentifier="jhcedsu5nyd2o" platform="Samsung" product="Plex for Samsung" state="playing" title="BD-Player BD-F6500"/>
      Hier noch die Einträge aus der Log:
      Code:
      2015-08-14 10:54:49.605 [INFO ] [.o.b.w.i.s.WeatherJobScheduler] - Starting and scheduling weatherJob-home with interval of 5 minutes
      2015-08-14 10:56:10.617 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:15.004 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:20.093 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:24.602 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:27.219 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:29.646 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:30.256 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:30.616 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:30.961 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:31.399 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:31.399 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:32.073 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:42.455 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:42.783 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:43.112 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:43.410 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:43.613 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:43.770 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:43.927 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      2015-08-14 10:56:47.200 [WARN ] [.o.b.plex.internal.PlexBinding] - Cannot send command for item PlexTVPower, property power is read only
      2015-08-14 10:56:51.819 [ERROR] [.b.plex.internal.PlexConnector] - Error while sending command to Plex: Bad Request
      <html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
      Zuletzt geändert von toto1975; 14.08.2015, 10:23.

      Kommentar


        #4
        Den gleichen Fehler bekomme ich auch. Gibts da schon was neues? Ich bekomme alles angezeigt, kann aber über Openhab keine Änderungen machen.

        Kommentar


          #5
          Hallo DRAGandDrop,

          leider habe ich auch noch keine Lösung bekommen, aber ich halte dich auf dem laufenden wenn ich eine Lösung habe. Wäre super falls du früher eine Lösung findest du sie hier posten könntest.

          Viele Grüße
          Torsten

          Kommentar


            #6
            Hi Torsten,

            hab im anderen Forum gesehen, das es wohl mit der Plex Version zusammenhängt.
            Siehe hier. Da ist genau mein Fehler beschrieben. Bei mir läuft aktuell die 0.9.12.11 und damit gehts wohl nicht mehr.
            https://community.openhab.org/t/plex...d-request/2860

            Kommentar

            Lädt...
            X