iharosi / homebridge-plex-webhooks

Plex Webhooks Server plugin for Homebridge
GNU Affero General Public License v3.0
48 stars 6 forks source link

trigger never turns on #10

Closed garfieldhy closed 3 years ago

garfieldhy commented 3 years ago

Before you raise an issue ticket, please turn on verbose logging in the plugin's config or run homebridge with -D (or --debug) option.

Node.js version Can be found on the Status page of Homebridge UI.

Homebridge version Can be found on the Status page of Homebridge UI.

Plex Webhooks Server plugin version Can be found on the Plugin page of Homebridge UI.

Configuration Can be found on the Config page of Homebridge UI. Only the plugin's related part is needed.

{
    "name": "Plex Webhooks Platform",
    "sensors": [
        {
            "name": "PlexPlaying"
        }
    ],
    "server": {
        "port": 2222,
        "address": "192.168.1.10"
    },
    "verbose": true,
    "platform": "PlexWebhooks"
}

Error message Error message in homebridge log if any. No error message in red

Payload Please note, the payload can carry sensitive information (e.g.: your uuid, your ip address). Before you share, make sure you removed sensitive data from the payload.

[1/15/2021, 9:28:43 AM] [Plex Webhooks Platform] {"event":"media.play","user":true,"owner":true,"Account":{"id":1,"thumb":"https://plex.tv/users/f5bc041d844a668e/avatar?c=1591333116","title":"garfieldhanyi"},"Server":{"title":"Mac mini","uuid":"xxx"},"Player":{"local":true,"publicAddress":"xxx","title":"Safari","uuid":"xxx"},"Metadata":{"librarySectionType":"movie","ratingKey":"28376","key":"/library/metadata/28376","guid":"plex://movie/5d776836eb5d26001f1e0e27","studio":"Wonderland Sound and Vision","type":"movie","title":"后继有人","librarySectionTitle":"电影","librarySectionID":7,"librarySectionKey":"/library/sections/7","originalTitle":"We Are Marshall","contentRating":"PG","summary":"  故事发生在美国西弗吉利亚的亨廷顿小镇上,那里有一支令全镇人民骄傲不已,同时也在全美国大学校队中位处顶尖的马歇尔大学橄榄球队。长久以来,马歇尔大学橄榄球队早已成为了当地历史的一部分,一代又一代队员们坚韧不拔的运动精神在时间和汗水中不断的被传承着。    1970年,是大家不愿意记起却又无法忘记的一年,参赛归来的马歇尔大学橄榄球队乘坐飞机返回亨廷顿。途中,可怕的空难发生了,包括队员、教练、后勤在内的75名乘客全部丧生。人们被这一噩耗惊呆了,悲伤和压抑的气氛迅速席卷了整个小镇。这时,一个名叫杰克(马修·麦康纳 Matthew McConaughey 饰)的橄榄球教练站了出来,善良的他不忍看到居民们就此消沉,他决定要用自己的力量,延续马歇尔大学橄榄球队的辉煌。","audienceRating":7.1,"viewOffset":96737,"lastViewedAt":1610606296,"year":2006,"tagline":"From the ashes we rose.","thumb":"/library/metadata/28376/thumb/1610123583","art":"/library/metadata/28376/art/1610123583","duration":7860000,"originallyAvailableAt":"2006-12-22","addedAt":1610123581,"updatedAt":1610123583,"audienceRatingImage":"imdb://image.rating","primaryExtraKey":"/library/metadata/28378","Genre":[{"id":78816,"filter":"genre=78816","tag":"剧情","count":503}],"Director":[{"id":102044,"filter":"director=102044","tag":"McG","count":2}],"Writer":[{"id":119447,"filter":"writer=119447","tag":"Cory Helms"}],"Producer":[{"id":83266,"filter":"producer=83266","tag":"Basil Iwanyk","count":8}],"Country":[{"id":78817,"filter":"country=78817","tag":"United States of America","count":701}],"Guid":[{"id":"imdb://tt0758794"},{"id":"tmdb://11170"},{"id":"tvdb://3951"}],"Role":[{"id":82740,"filter":"actor=82740","tag":"Matthew McConaughey","count":7,"role":"Jack Lengyel","thumb":"https://metadata-static.plex.tv/2/people/2514e174df22fe791a5ad2ce4e69c03a.jpg"},{"id":114094,"filter":"actor=114094","tag":"Matthew Fox","count":2,"role":"Red Dawson","thumb":"https://metadata-static.plex.tv/f/people/f2730ca703b021b304bf311314171200.jpg"},{"id":86872,"filter":"actor=86872","tag":"Anthony Mackie","count":4,"role":"Nate Ruffin","thumb":"https://metadata-static.plex.tv/c/people/c696b3f0b5e869d8ae52f2c5dee02002.jpg"},{"id":93511,"filter":"actor=93511","tag":"David Strathairn","count":8,"role":"President Dedmon","thumb":"https://metadata-static.plex.tv/a/people/a0eaf85bfd1f47ffb0ef4b3e48479578.jpg"},{"id":83228,"filter":"actor=83228","tag":"Ian McShane","count":8,"role":"Paul Griffen","thumb":"https://metadata-static.plex.tv/people/5d776826151a60001f24aa47.jpg"},{"id":94077,"filter":"actor=94077","tag":"Kate Mara","count":4,"role":"Annie Cantrell","thumb":"https://metadata-static.plex.tv/c/people/ce945701ce9d6ff59f27e155fe98bbcf.jpg"},{"id":95974,"filter":"actor=95974","tag":"January Jones","count":3,"role":"Carole Dawson","thumb":"https://metadata-static.plex.tv/people/5d776826961905001eb9111f.jpg"},{"id":103527,"filter":"actor=103527","tag":"Kate Kneeland","count":2,"role":"Ticket Taker","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0efb.jpg"},{"id":95830,"filter":"actor=95830","tag":"Wes Brown","count":2,"role":"Chris Griffen","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0efc.jpg"},{"id":119442,"filter":"actor=119442","tag":"L. Warren Young","role":"Mickey Jackson","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0efd.jpg"},{"id":119443,"filter":"actor=119443","tag":"Andrew Wilson Williams","role":"David Lengyel"},{"id":119444,"filter":"actor=119444","tag":"Huntley Ritter","role":"Randy Linden","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0eff.jpg"},{"id":119445,"filter":"actor=119445","tag":"Nina Jones","role":"Mrs. Morehouse"},{"id":119446,"filter":"actor=119446","tag":"Tommy Cresswell","role":"Gene Morehouse","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0f01.jpg"},{"id":96099,"filter":"actor=96099","tag":"Brian Geraghty","count":2,"role":"Tom Bogdan","thumb":"https://metadata-static.plex.tv/people/5d7768262ec6b5001f6ba298.jpg"},{"id":101163,"filter":"actor=101163","tag":"Arlen Escarpeta","count":2,"role":"Reggie Oliver","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0f02.jpg"},{"id":115182,"filter":"actor=115182","tag":"Kimberly Williams-Paisley","count":2,"role":"Sandy Lengyel","thumb":"https://metadata-static.plex.tv/people/5d776836eb5d26001f1e0f03.jpg"},{"id":100114,"filter":"actor=100114","tag":"Bobby Jordan","count":2,"role":""}]}}
[1/15/2021, 9:28:43 AM] [Plex Webhooks Platform] Checking filter rulesets of [PlexPlaying] sensor:

Additional info Any information what you think can help the investigation. I can see the payload, playing pause stop information in homebridge log, it means Plex can talk to homebride via webhook, right? But the trigger in homebridge and home app never shows change, no light on, no triggered. My homebridge server is on my Synology Nas (192.168.1.10), My plex server is on one windows pc and one MacMini in the same local network. I want the sensor work so that I can control the theatre led lights on and off using home app automation. Thanks a lot!

iharosi commented 3 years ago

Hi @garfieldhy,

Thank you for the details. Looks like this is an issue with the plugin when you're not setting any filter ruleset. You can solve this if you set at least one filter for the sensor (you can filter by Plex account/server name or player name). However, I'm working on a patch what will fix this issue and I'll release it in an hour so, after the update everything should work smoothly.

garfieldhy commented 3 years ago

Great!I tried, now it works perfectly!Thanks a lot!

iharosi commented 3 years ago

Glad to hear it! Thanks for reporting the issue! :)