iharosi / homebridge-plex-webhooks

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

Webhooks fails to work after adding a second sensor #8

Closed tech4life2015 closed 3 years ago

tech4life2015 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

{
            "name": "Plex Webhooks Platform",
            "sensors": [
                {
                    "name": "Master Bedroom Plex",
                    "filters": [
                        [
                            {
                                "path": "Player.title",
                                "value": "Master Bedroom"
                            }
                        ]
                    ]
                },
                {
                    "name": "Media Room Plex",
                    "filters": [
                        [
                            {
                                "path": "Player.title",
                                "value": "Media Room"
                            }
                        ]
                    ]
                }
            ],
            "verbose": true,
            "platform": "PlexWebhooks"
        }

Error message

Error: context.setState is missing
    at /usr/local/lib/node_modules/homebridge-plex-webhooks/lib/platform.js:113:24
    at Array.forEach (<anonymous>)
    at PlexWebhooksPlatform._processPayload (/usr/local/lib/node_modules/homebridge-plex-webhooks/lib/platform.js:106:8)
    at /usr/local/lib/node_modules/homebridge-plex-webhooks/lib/server.js:38:7
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-plex-webhooks/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/local/lib/node_modules/homebridge-plex-webhooks/node_modules/express/lib/router/route.js:137:13)
    at Immediate._onImmediate (/usr/local/lib/node_modules/homebridge-plex-webhooks/node_modules/multer/lib/make-middleware.js:53:37)
    at processImmediate (internal/timers.js:463:21)
[29/12/2020, 16:08:33] [Plex Webhooks Platform] One of your sensor did not register properly, please restart your homebridge server!
[29/12/2020, 16:08:33] [Plex Webhooks Platform] In case you're still having this error, please raise a ticket: https://github.com/iharosi/homebridge-plex-webhooks/issues

Payload

{"event":"media.play","user":true,"owner":true,"Account":{"id":1,"thumb":"h","title":""},"Server":{"title":"","uuid":""},"Player":{"local":true,"publicAddress":"","title":"Master Bedroom","uuid":"4"},"Metadata":{"librarySectionType":"movie","ratingKey":"59420","key":"/library/metadata/59420","guid":"com.plexapp.agents.imdb://tt0121766?lang=en","studio":"Lucasfilm","type":"movie","title":"Star Wars: Episode III - Revenge of the Sith","librarySectionTitle":"Movies","librarySectionID":1,"librarySectionKey":"/library/sections/1","contentRating":"PG-13","summary":"Years after the onset of the Clone Wars, the noble Jedi Knights lead a massive clone army into a galaxy-wide battle against the Separatists. When the sinister Sith unveil a thousand-year-old plot to rule the galaxy, the Republic crumbles and from its ashes rises the evil Galactic Empire. Jedi hero Anakin Skywalker is seduced by the dark side of the Force to become the Emperor's new apprentice – Darth Vader. The Jedi are decimated, as Obi-Wan Kenobi and Jedi Master Yoda are forced into hiding. The only hope for the galaxy are Anakin's own offspring – the twin children born in secrecy who will grow up to become heroes.","rating":7.9,"audienceRating":6.5,"viewOffset":1160179,"viewCount":14,"lastViewedAt":1609279705,"year":2005,"tagline":"The saga is complete.","thumb":"/library/metadata/59420/thumb/1607646779","art":"/library/metadata/59420/art/1607646779","duration":8400000,"originallyAvailableAt":"2005-05-17","addedAt":1487306461,"updatedAt":1607646779,"audienceRatingImage":"rottentomatoes://image.rating.upright","chapterSource":"media","primaryExtraKey":"/library/metadata/59634","ratingImage":"rottentomatoes://image.rating.certified","Genre":[{"id":12770,"filter":"genre=12770","tag":"Sci-Fi","count":56},{"id":34,"filter":"genre=34","tag":"Adventure","count":141},{"id":33,"filter":"genre=33","tag":"Action","count":114},{"id":63,"filter":"genre=63","tag":"Fantasy","count":88}],"Director":[{"id":498,"filter":"director=498","tag":"George Lucas","count":4}],"Writer":[{"id":499,"filter":"writer=499","tag":"George Lucas","count":5}],"Producer":[{"id":519,"filter":"producer=519","tag":"Rick McCallum","count":3}],"Country":[{"id":51638,"filter":"country=51638","tag":"US","count":152}],"Collection":[{"id":18936,"filter":"collection=18936","tag":"Star Wars","count":10}],"Role":[{"id":501,"filter":"actor=501","tag":"Ewan McGregor","count":6,"role":"Obi-Wan Kenobi","thumb":"http://image.tmdb.org/t/p/original/lVjs6E3vriUXhHrAx0mSzyOVts2.jpg"},{"id":500,"filter":"actor=500","tag":"Natalie Portman","count":4,"role":"Padmé Amidala","thumb":"http://image.tmdb.org/t/p/original/jJcRWku3e9OHrmRqytn6WcBjhvh.jpg"},{"id":521,"filter":"actor=521","tag":"Hayden Christensen","count":3,"role":"Anakin Skywalker / Darth Vader","thumb":"http://image.tmdb.org/t/p/original/lz6mI2hhVrGu640fxm9GQkv4V7l.jpg"},{"id":503,"filter":"actor=503","tag":"Ian McDiarmid","count":6,"role":"Chancellor Palpatine / Darth Sidious","thumb":"http://image.tmdb.org/t/p/original/yQYNxIjSVYp2Hli7IHOq182NoIJ.jpg"},{"id":140,"filter":"actor=140","tag":"Samuel L. Jackson","count":11,"role":"Mace Windu","thumb":"http://image.tmdb.org/t/p/original/dlW6prW9HwYDsIRXNoFYtyHpSny.jpg"},{"id":522,"filter":"actor=522","tag":"Christopher Lee","count":11,"role":"Count Dooku","thumb":"http://image.tmdb.org/t/p/original/aVzp6zflzedmdKPLxaPqcZ05PDK.jpg"},{"id":504,"filter":"actor=504","tag":"Anthony Daniels","count":13,"role":"C-3PO","thumb":"http://image.tmdb.org/t/p/original/cljvryjb3VwTsNR7fjQKjNPMaBB.jpg"},{"id":505,"filter":"actor=505","tag":"Kenny Baker","count":10,"role":"R2-D2","thumb":"http://image.tmdb.org/t/p/original/sdd9rgifNF9C51RejG7sUGU8Bka.jpg"},{"id":508,"filter":"actor=508","tag":"Frank Oz","count":12,"role":"Yoda (Voice)","thumb":"http://image.tmdb.org/t/p/original/9KqCa2wS4EO2yymrVIgMiFHh6M4.jpg"},{"id":529,"filter":"actor=529","tag":"Jimmy Smits","count":3,"role":"Senator Bail Organa","thumb":"http://image.tmdb.org/t/p/original/yIcr7NKpvkQPi2Js5SyISvOKys1.jpg"},{"id":1620,"filter":"actor=1620","tag":"Peter Mayhew","count":7,"role":"Chewbacca","thumb":"http://image.tmdb.org/t/p/original/din1s5H4C4CfcnkHfEeRcdFlsVj.jpg"},{"id":509,"filter":"actor=509","tag":"Oliver Ford Davies","count":3,"role":"Sio Bibble","thumb":"http://image.tmdb.org/t/p/original/7fpNxQYZ85oRdnKWxPzQfURFkFT.jpg"},{"id":512,"filter":"actor=512","tag":"Ahmed Best","count":3,"role":"Jar Jar Binks","thumb":"http://image.tmdb.org/t/p/original/7yBAaveSHtYkzutJOKv18pq7pDI.jpg"},{"id":30505,"filter":"actor=30505","tag":"Silas Carson","count":3,"role":"Ki-Adi-Mundi / Nute Gunray","thumb":"http://image.tmdb.org/t/p/original/cT7Qyu8Zl8IDsgYzduzuCm1zxpt.jpg"},{"id":533,"filter":"actor=533","tag":"Joel Edgerton","count":3,"role":"Owen Lars","thumb":"http://image.tmdb.org/t/p/original/lkOkaMKSRRGLMgkLaCzR9sYgTgx.jpg"},{"id":30511,"filter":"actor=30511","tag":"Bonnie Piesse","count":2,"role":"Beru Lars","thumb":"http://image.tmdb.org/t/p/original/xM4s2HYCmSunDpExLnllYCp8rjZ.jpg"},{"id":38900,"filter":"actor=38900","tag":"Matthew Wood","count":4,"role":"General Grievous (voice)","thumb":"http://image.tmdb.org/t/p/original/oB9wVbEIg8fjY3ulDKjKsGn2A55.jpg"},{"id":531,"filter":"actor=531","tag":"Temuera Morrison","count":3,"role":"Commander Cody","thumb":"http://image.tmdb.org/t/p/original/1ckHDFgKXJ8pazmvLCW7DeOKqA0.jpg"},{"id":38882,"filter":"actor=38882","tag":"Bruce Spence","count":2,"role":"Tion Medon","thumb":"http://image.tmdb.org/t/p/original/pwJJBmO9MG3OxVX9efGrB6BTFyw.jpg"},{"id":38880,"filter":"actor=38880","tag":"Jeremy Bulloch","count":3,"role":"Captain Colton","thumb":"http://image.tmdb.org/t/p/original/yRnHoDmmWKdoLdiscCFfRpzzqMa.jpg"},{"id":38881,"filter":"actor=38881","tag":"Wayne Pygram","role":"Governor Tarkin","thumb":"http://image.tmdb.org/t/p/original/mBy1Zs6PBwuVWoiHxc8ChhC0YD1.jpg"},{"id":42145,"filter":"actor=42145","tag":"Nick Gillard","count":3,"role":"Cin Drallig","thumb":"http://image.tmdb.org/t/p/original/aJcxihOCfNBvr0FOiHEOyyVV7la.jpg"},{"id":38911,"filter":"actor=38911","tag":"Aidan Barton","role":"Luke Skywalker & Leia Organa"},{"id":1212,"filter":"actor=1212","tag":"James Earl Jones","count":8,"role":"Darth Vader (voice)","thumb":"http://image.tmdb.org/t/p/original/2ZuBf3ip2RXhkiQqGUjbUzAf4Nx.jpg"},{"id":18656,"filter":"actor=18656","tag":"George Lucas","count":5,"role":"Baron Papanoida","thumb":"http://image.tmdb.org/t/p/original/8qxin8urtFE0NqaZNFWOuV537bH.jpg"},{"id":38885,"filter":"actor=38885","tag":"Jett Lucas","role":"Zett Jukassa","thumb":"http://image.tmdb.org/t/p/original/vHM9Ta1ddrT22ejnnjqDev5ZKwa.jpg"},{"id":38883,"filter":"actor=38883","tag":"Amanda Lucas","count":2,"role":"Terr Taneel","thumb":"http://image.tmdb.org/t/p/original/orl2zrSpf4WQUd268DsP7EspUCo.jpg"},{"id":38895,"filter":"actor=38895","tag":"Katie Lucas","count":2,"role":"Chi Eekway","thumb":"http://image.tmdb.org/t/p/original/bsnHZ1iGkc3i8RT0r3PkuGLR4u4.jpg"},{"id":30507,"filter":"actor=30507","tag":"Jay Laga'aia","count":2,"role":"Captain Typho","thumb":"http://image.tmdb.org/t/p/original/7Q9iN9tmJveiUnJZZataTWNfL7i.jpg"},{"id":38879,"filter":"actor=38879","tag":"Rohan Nichol","role":"Captain Antilles","thumb":"http://image.tmdb.org/t/p/original/nzvL3MRpADYWlH4ppyYgmCnM1kZ.jpg"},{"id":30519,"filter":"actor=30519","tag":"David Bowers","count":2,"role":"Mas Amedda","thumb":"http://image.tmdb.org/t/p/original/fu7caj9zHUMhYP2XbZdpCrPJepx.jpg"},{"id":2417,"filter":"actor=2417","tag":"Keisha Castle-Hughes","role":"Queen of Naboo","thumb":"http://image.tmdb.org/t/p/original/qTHVwnRUSRBR0c4kyuMHq52rghi.jpg"},{"id":30518,"filter":"actor=30518","tag":"Matt Sloan","count":2,"role":"Plo Koon"},{"id":38884,"filter":"actor=38884","tag":"Rebecca Jackson Mendoza","role":"Queen of Alderaan","thumb":"http://image.tmdb.org/t/p/original/7lR45zyqlWArPo5aGOkzDYhMRao.jpg"},{"id":38886,"filter":"actor=38886","tag":"Tux Akindoyeni","role":"Agen Kolar","thumb":"http://image.tmdb.org/t/p/original/ta8Gd1qxN56gsqzKTJ0aMz1enuS.jpg"},{"id":30522,"filter":"actor=30522","tag":"Matt Rowan","count":2,"role":"Senator Orn Free Taa"},{"id":38887,"filter":"actor=38887","tag":"Kenji Oates","role":"Saesee Tiin"},{"id":38888,"filter":"actor=38888","tag":"Amy Allen","role":"Aayla Secura","thumb":"http://image.tmdb.org/t/p/original/tdo5t436U3brCu1UiXUIJVL1D8v.jpg"},{"id":30521,"filter":"actor=30521","tag":"Bodie Taylor","count":2,"role":"Clone Trooper","thumb":"http://image.tmdb.org/t/p/original/4zcLynlqnNG9pqBGeb6T8owPYj7.jpg"},{"id":38889,"filter":"actor=38889","tag":"Graeme Blundell","role":"Ruwee Naberrie","thumb":"http://image.tmdb.org/t/p/original/gVV7qhA0bXBUa0XmVHUnOJH3u2k.jpg"},{"id":38890,"filter":"actor=38890","tag":"Trisha Noble","role":"Jobal Naberrie","thumb":"http://image.tmdb.org/t/p/original/zDlrzpJUyVqynhH5hzZK9v4urS8.jpg"},{"id":38891,"filter":"actor=38891","tag":"Claudia Karvan","role":"Sola Naberrie","thumb":"http://image.tmdb.org/t/p/original/8o2xMWxL9SkkxXrJOGI8THZhS8Q.jpg"},{"id":38892,"filter":"actor=38892","tag":"Keira Wingate","role":"Ryoo Naberrie","thumb":"http://image.tmdb.org/t/p/original/mUUO263qCZReUVNIdHXtU6KwF15.jpg"},{"id":38893,"filter":"actor=38893","tag":"Hayley Mooy","role":"Pooja Naberrie","thumb":"http://image.tmdb.org/t/p/original/8D6LQUyIY7XDEBin3vzUBv0JaTf.jpg"},{"id":38894,"filter":"actor=38894","tag":"Sandi Finlay","role":"Sly Moore","thumb":"http://image.tmdb.org/t/p/original/2kE92N7oNZ33XHlObZ1uY9npk7X.jpg"},{"id":38896,"filter":"actor=38896","tag":"Genevieve O'Reilly","count":3,"role":"Mon Mothma","thumb":"http://image.tmdb.org/t/p/original/8NrrFxrGng88GU7lxwOyK3PZv05.jpg"},{"id":38897,"filter":"actor=38897","tag":"Warren Owens","role":"Fang Zar"},{"id":38898,"filter":"actor=38898","tag":"Kee Chan","role":"Malé-Dee","thumb":"http://image.tmdb.org/t/p/original/daRXLJaABxXgHK65IKlsqvyrG12.jpg"},{"id":30515,"filter":"actor=30515","tag":"Rena Owen","count":2,"role":"Nee Alavar","thumb":"http://image.tmdb.org/t/p/original/gH41kolbpQswwqYomRiicZMOOXj.jpg"},{"id":38899,"filter":"actor=38899","tag":"Christopher Kirby","count":2,"role":"Giddean Danu","thumb":"http://image.tmdb.org/t/p/original/so9OxqBJDfCUp84Ja4PEMnWECAP.jpg"},{"id":38901,"filter":"actor=38901","tag":"Kristy Wright","role":"Moteé","thumb":"http://image.tmdb.org/t/p/original/auobXN4q0r07biMy9PS88vcdoks.jpg"},{"id":38902,"filter":"actor=38902","tag":"Coinneach Alexander","role":"Whie","thumb":"http://image.tmdb.org/t/p/original/wi6bJG4NhBnSLuYgUMzfZL0hh26.jpg"},{"id":38903,"filter":"actor=38903","tag":"Mousy McCallum","role":"Bene","thumb":"http://image.tmdb.org/t/p/original/fTz4FzUewJ7XfueJCSYCYM26STf.jpg"},{"id":38904,"filter":"actor=38904","tag":"Michael Kingma","role":"Wookiee","thumb":"http://image.tmdb.org/t/p/original/5CyOFwOokhvoBmLLL9ftlbCtbpt.jpg"},{"id":97825,"filter":"actor=97825","tag":"Axel Dench","role":"Wookiee","thumb":"http://image.tmdb.org/t/p/original/mTMElGQitW4llfRehJxFgOZHPPx.jpg"},{"id":97830,"filter":"actor=97830","tag":"Steven Foy","role":"Wookiee"},{"id":97828,"filter":"actor=97828","tag":"Julian Khazzouh","role":"Wookiee","thumb":"http://image.tmdb.org/t/p/original/m4qAAtvEvR6QMo18Fp3cit0gCIl.jpg"},{"id":97827,"filter":"actor=97827","tag":"James Rowland","role":"Wookiee"},{"id":97826,"filter":"actor=97826","tag":"David Stiff","role":"Wookiee"},{"id":97829,"filter":"actor=97829","tag":"Robert Cope","role":"Wookiee"}]}}

Additional info starts happening after a second sensor is added from what i can see. i have tried deleting the plugin and the config and re-installing. Tried deleting the second sensor and get the same error message. First install it works with a single sensor but after that it stops working. Reboots do not resolve the issue. Thoughts on a resolution?

iharosi commented 3 years ago

I've started to look into this issue today. It's a problem with the plugin. I'll try my best to fix this as soon as I can.

tech4life2015 commented 3 years ago

Thank you!

iharosi commented 3 years ago

Duplicate of https://github.com/iharosi/homebridge-plex-webhooks/issues/7