Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

lzilioli/plex-bridge-homebridge-http-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

plex-bridge-homebridge-http-webhooks

ARCHIVED

This repo's intended purpose has been met by homebridge-plex-sensors. I recommend it in place of this package. The code here is still a decent starting point if you want to map a plex webhook to some other form of web request, but it is not super useful in its current state.

Getting Started

In order to run this app:

Configs

In ~/.homebridge/config.json:

"platforms": [
    {
      "platform": "HttpWebHooks",
      "webhook_port": "51828",
      "sensors": [
        {
          "id": "plexContact",
          "name": "Plex Webhook Contact Sensor",
          "type": "contact"
        }
      ]
    }
  ]

First run

This script filters for a specific player before hitting the homebridge webhook. To determine the player:

  1. Run the app
DEBUG=plex*\
ACCESSORY=plexContact\
PLEX_WEBHOOK_PORT=12000\
HB_WEBHOOK_URL=http://localhost:51828/\
node index.js
  1. Play a video on the device you want to trigger the webhook
  2. You will see the event logged to the console when the webhook is hit. Copy the uuid for the player
  3. Replace <PLAYER_UUID> with the copied player uuid in the command in the Run section.p

Run

Now run the script with the PLAYER argument:

DEBUG=plex*\
ACCESSORY=plexContact\
PLEX_WEBHOOK_PORT=12000\
HB_WEBHOOK_URL=http://localhost:51828/\
PLAYER=<PLAYER_UUID>\
node index.js

From now on, when you toggle the plex play state from the PLAYER, you should see the contact sensor state update in the iOS 10 Home app. Using the Home app, you can create Automation rules based on these changes.

Thanks to plexinc/webhooks-home-automation.

About

Nodejs bridge for Plex webhooks into homebridge.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published