Announcement

Collapse
No announcement yet.

Anyone using Plex / Tautulli to trigger Events?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by Ltek View Post
    Michael McSharry is there an order I need to check the A boxes or something else to get them to have Parent/Child relationship?


    BLPlex doesnt create HS devices for several of us and Blade has not responded so we cant use it.
    I get the following for all my plex clients? Are you guys looking for more then these?

    Click image for larger version

Name:	Capture.PNG
Views:	250
Size:	42.4 KB
ID:	1418358

    Comment


      #32
      mik3 please keep on topic = mcsMQTT receiving Tautulli data. If you want to joint in thread about the problem/bug with BLPlex please click here

      Comment


        #33
        The order does not make any difference. I did a quick demo. The first is after the topic was received. I then check some of the A column sub checkboxes. Note the parent device checkbox was inserted by the plugin. The third is the HS DeviceUtility view at this point.

        Click image for larger version

Name:	Capture1.PNG
Views:	201
Size:	37.4 KB
ID:	1418370

        Click image for larger version

Name:	Capture2.PNG
Views:	186
Size:	51.8 KB
ID:	1418371

        Click image for larger version

Name:	Capture3.PNG
Views:	186
Size:	33.9 KB
ID:	1418372

        It is probably not beneficial to pursue escape vs. URI encoding. Your real objective is to allow JSON syntax to be used and to do this the quotes encasing the body element data would need to be replaced with { and }. I suspect the easiest implementation would be that if the user used { and } encasing then Tautulli would exclude their quotes around the element.

        Comment


          #34
          Not to distract from the discussion at hand. Not sure if it helps, but if you have Plex Pass, Plex has a webhook feature.

          https://support.plex.tv/articles/115002267687-webhooks/
          Len


          HomeSeer Version: HS3 Pro Edition 3.0.0.435
          Linux version: Linux homeseer Ubuntu 16.04 x86_64
          Number of Devices: 633
          Number of Events: 773

          Enabled Plug-Ins
          2.0.54.0: BLBackup
          2.0.40.0: BLLAN
          3.0.0.48: EasyTrigger
          30.0.0.36: RFXCOM
          3.0.6.2: SDJ-Health
          3.0.0.87: weatherXML
          3.0.1.190: Z-Wave

          Comment


            #35
            Originally posted by lveatch View Post
            Not to distract from the discussion at hand. Not sure if it helps, but if you have Plex Pass, Plex has a webhook feature.
            https://support.plex.tv/articles/115002267687-webhooks/
            Webhooks requires us to provide a URL to a "listener" (dont think that the official term). Michael McSharry would your plugin act as such?

            Comment


              #36
              I have not yet run across a need for webhooks so not implemented. It is easy to do, but I do not see how this helps any. All that would changed is the payload is delivered with a different protocol, but when it gets into the HS realm you still need to dissect it and assess when something needs to be with the data.

              Are you still having difficulty with creating a set of devices with mcsMQTT?

              Comment


                #37
                Originally posted by Michael McSharry View Post
                Are you still having difficulty with creating a set of devices with mcsMQTT?
                All good, working as I'd hoped - thanks to you!!

                I appreciate all your help and providing such great PIs.

                Comment


                  #38


                  Hi All. I'm struggling to get Tautulli MQTT payloads to appear in mcsMQTT. I'm new to MQTT and have read through this thread and the manual and can't understand what I'm doing wrong/missing.

                  What I was is pretty basic compared to what was discussed here. All I want is a device that defines a playback state of Plex for a given IP address. So if Playback starts, send a "Playback Started" event. If it stops send "Playback Stopped" etc. Then I can trigger lights up or lights down in my Den that has the Plex player.


                  My MQTT Settings in Tautulli:
                  Broker IP: (IP of my HomeSeer Server)
                  Port 1883
                  Protocol: 3.1.1
                  Client ID: mcsMQTT on HomeTrollerPlusG1
                  Topic: Plex/DenTV

                  Text for all the play states:

                  subject line: playState
                  body message: "status":"Playback Started"

                  subject line: playState
                  body message: "status":"Playback Stopped"

                  etc.

                  My Condition is to use the IP Address of my Plex player in the Den

                  In mcsMQTT Plugin:
                  I left all the default settings for the broker

                  I used: edit/add to add the topic from Tautulli
                  I tried: Plex/DenTV
                  I tried: Plex/DenTV:body
                  I tried: Plex/DenTV:body:status

                  I also tried both "list" and "button" for control type as suggested in this thread.

                  Nothing I did generated a payload in mcsMQTT

                  I checked the log in HomeSeer and I get:
                  MQTTClient is Connected to broker 1 at 127.0.0.1

                  Which I assumed meant the client connected successfully to mcsMQTT broker.
                  I also checked the mcsMQTT log file and saw no errors.

                  Any ideas or suggestions would be most grateful. Thanks!

                  Comment


                    #39
                    First thing I notice is that the Plex Client ID look much like the mcsMQTT client ID. Each client needs to have a unique ID so the MQTT broker knows where to route messages. It does not matter what is is other than it needs to be unique.

                    For diagnostics you should be looking at the Association Tab of mcsMQTT. This is the "firewall" through with all messages on the network (e.g. from plex) are shown. If you do not see it there then either the issue is with network routing. If it is present then you have the choice of events via MQTT messages or HS Devices.

                    Showing some screenshots of the Association Tab with Plex for the T1 filter and DenTV for the T2 filter will make it easier to address the HS integration aspects. If you do not have anything showning with these filters the the issue is on the network routing side.

                    Comment


                      #40


                      Okay. Here are all the screen grabs of my Tautulli configs as well as the mcsMQTT pages. Let me know if you need anything else that I missed. Thanks!
                      Attached Files

                      Comment


                        #41
                        You mentioned something about the Client ID in Tautulli shouldn't have the mcsMQTT id in it. What should I be putting in there? I thought I needed to put the client ID of the MQTT broker, which is what I thought I did.

                        Comment


                          #42


                          Son of a B*** looks like the Client ID was the issue! I re-read your comment about the Tautulli Client ID being unique, so I changed it to something unique (ex. Tautulli) and after sending a test MQTT message, sure enough I now see a payload! See attached.
                          Attached Files

                          Comment


                            #43


                            Okay. One additional question/issue. I noticed that I'm getting back slashes (seems like escaped characters). I saw some mention of that earlier in this thread, and a modified .dll was shared, but I thought maybe that change was already incorporated into the latest version of the plugin. See attached screen grab.
                            Attached Files

                            Comment


                              #44
                              I'm not certain what your question or issue is. I see the payload with the backslash. If anything was done with the .dll previously then it has been incorporated into the current version unless the .dll was for debug investigation. What are you expecting for the topic that has been associated with HS Device 1194? It just looks to me as if the Plex MQTT author is using Windows convention of the backlash as a level separator.

                              I recognize it is part to the JSON payload on the body key. It you want it to show differently in HS then you can use the Expression text box or Regular Expression features on the Edit tab to transform it.

                              It actually looks to be an ill-formed JSON payload. I suspect you can make use of what exists as-is by using the Edit Tab Control/Status UI of Button or List so HS will show an enumeration of the states. For example of the VSP entry "\status\.\Playback Stopped\=1;Playback Stopped;" would show as "Playback Stopped" rather than "\status\.\Playback Stopped" and it would be associated with a DeviceValue of 1 so that Event triggers would be easily supported.

                              Comment


                                #45
                                I guess my goal is to be able to read the playback state: "Playback Started", "Playback Stopped" etc. I removed the quotes and for the hell of it I removed "status:". Since I'm only passing one value for the state at a time, only posting the playback state in the body by itself seems to give me what I want in the device even though it's not proper JSON. Or am I going about this completely wrong?
                                Attached Files

                                Comment

                                Working...
                                X