You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,32 +65,44 @@ This application is primarily focused on Plex and HomeAssistant but I plan on ad
65
65
> ℹ It is assumed you have the following tools working. Refer to their respective guides for installation help.
66
66
* MQTT Broker (Optional)
67
67
* Home Assistant (Optional)
68
-
* Plex or Jellyfin
68
+
* Plex or Jellyfin (still experimental)
69
69
* ezBEQ
70
70
* Minidsp (other DSPs may work but I have not tested them. If ezBEQ supports it, it should be work)
71
71
72
72
You can configure this to only load BEQ profiles, or do everything else besides BEQ. It is up to you.
73
73
74
+
### Docker Setup
75
+
> ℹ If you need help deploying with Docker, refer to the [Docker documentation](https://docs.docker.com/get-docker/).
76
+
> ℹ If you are using Jellyfin, read the Jellyfin specific instructions below
77
+
78
+
1) Deploy the latest version `ghcr.io/iloveicedgreentea/plex-webhook-automation:latest`. I recommend running this in an orchestrator like Unraid, Docker-Compose, etc
79
+
2) You must mount a volume to `/data`
80
+
3) Configure the application via web ui -> `http://(you-server-ip):9999`
81
+
4) Set up your player with the instructions below
82
+
83
+
### Plex Specifics
84
+
1) get your player UUID(s) from `https://plex.tv/devices.xml` while logged in
85
+
2) Set up Plex to send webhooks to your server IP, `listenPort`, and the handler endpoint of `/plexwebhook`
86
+
* e.g `(your-server-ip):9999/plexwebhook`
87
+
3) Whitelist your server IP in Plex so it can call the API without authentication. [Docs](https://support.plex.tv/articles/200890058-authentication-for-local-network-access/)
88
+
4) Add UUID(s) and user filters to the application config
89
+
5) Play a movie and check server logs. It should say what it loaded and you should see whatever options you enabled work
90
+
74
91
### Jellyfin Specifics
75
92
76
93
You must use [Jellyfin Webhooks plugin](https://github.com/shemanaev/jellyfin-plugin-webhooks) to send webhooks to this application. It is not built in like Plex.
77
94
78
95
You must configure it to send Plex-style webhooks.
79
96
80
-
Configure this application via the Plex section and it "should work" but no promises until support is official.
97
+
#### Generate API Key
81
98
82
-
### Docker Setup
83
-
> ℹ If you need help deploying with Docker, refer to the [Docker documentation](https://docs.docker.com/get-docker/).
99
+
1) Navigate to the dashboard
100
+
2) Click on“API Keys” under “Advanced”
101
+
3) Click “Create”
102
+
4) Store the API securely
103
+
104
+
#### Configure
84
105
85
-
1) Deploy the latest version `ghcr.io/iloveicedgreentea/plex-webhook-automation:latest`. I recommend running this in an orchestrator like Unraid, Docker-Compose, etc
86
-
2) You must mount a volume to `/data`
87
-
3) Configure the application via web ui -> `http://(you-server-ip):9999`
88
-
* can get your player UUID from `https://plex.tv/devices.xml` while logged in
89
-
4) Set up Plex to send webhooks to your server IP, `listenPort`, and the handler endpoint of `/plexwebhook`
90
-
* e.g `(your-server-ip):9999/plexwebhook`
91
-
5) Whitelist your server IP in Plex so it can call the API without authentication. [Docs](https://support.plex.tv/articles/200890058-authentication-for-local-network-access/)
92
-
6) Play a movie and check server logs. It should say what it loaded and you should see whatever options you enabled work
93
-
6) The Application will restart within 5 seconds when config is saved in the UI
94
106
95
107
### Non-Docker Setup
96
108
I don't recommend this as it is more work and you will need to set up systemd or something to keep it running. I don't provide support for this method but if you know what you are doing, it is very easy to build the binary and run it.
@@ -103,12 +115,12 @@ TLDR: `make build`
103
115
### Web UI
104
116
The web UI is the primary way to configure this application. It is available at `http://(your-server-ip):9999`
105
117
106
-
It will automatically restart the application when you save config.
118
+
It will automatically restart the application when you save.
107
119
108
120
Each section has an enable/disable toggle. If you disable a section, it will not be used. For example, if you disable BEQ, it will not load BEQ profiles. If you disable MQTT, it will not send MQTT messages.
109
121
110
122
### General Usage
111
-
This application will load BEQ profiles automatically when you play something in Plex. It will also set volume, lights, and mute/unmute minidsp if you enable those options. The application itself is not controlling things like lights but relies on Home Assistant to perform the action via MQTT.
123
+
This application will load BEQ profiles automatically when you play something in Plex. It will also set volume, lights, and mute/unmute minidsp if you enable those options. The application itself is not controlling things like lights but relies on Home Assistant to perform the action via MQTT. In theory, you could use any home automation system but Home Assistant is the only one officially supported but anything that can receive MQTT messages should work.
112
124
113
125
## Home Assistant Quickstart
114
126
@@ -120,14 +132,20 @@ MQTT is used so this application could theoretically be used with any home autom
120
132
3) Set up your topics in HA and the application's config
121
133
4) Set up Automations in HA based on the payloads of MQTT
122
134
123
-
Features that will write to Topics
124
-
Current BEQ Profile
125
-
Lights
126
-
Minidsp mute status
127
-
Volume
128
-
Playing status
135
+
Features that will write to Topics of your choosing:
136
+
* Current BEQ Profile
137
+
* Lights
138
+
* Minidsp mute status
139
+
* Item type (Movie, Show, etc)
140
+
* Playing status
141
+
142
+
These Topics allow you to trigger automations in HA based on sensor values such as:
129
143
130
-
These Topics allow you to trigger automations in HA based on sensor values such as triggering HVAC when playing status is true.
144
+
* Triggering HVAC when playing status is true for X minutes (e.g circulate stale air)
145
+
* Toggling lights when playing status changes
146
+
* Displaying current BEQ profile on a dashboard
147
+
* Modulating volume based on item type (e.g a lower volume for shows, higher for movies)
148
+
* Muting/unmuting minidsp(s) and showing the status
131
149
132
150
Here are some sensor examples
133
151
@@ -151,8 +169,6 @@ mqtt:
151
169
value_template: "{{ value_json.type }}"
152
170
- name: "beq_current_profile"
153
171
state_topic: "theater/beq/currentprofile"
154
-
155
-
156
172
```
157
173
158
174
### Automation Example
@@ -204,6 +220,9 @@ max: 10
204
220
`/plexwebhook`
205
221
This endpoint is where you should tell Plex to send webhooks to. It automatically processes them. No further action is needed. This handler does most of the work - Loading BEQ, lights, volume, etc
206
222
223
+
`/jellyfin`
224
+
Coming soon
225
+
207
226
`/minidspwebhook`
208
227
This endpoint accepts commands used by minidsp-rs which are performed by EZbeq. Here is how to trigger it with Home Assistant
209
228
@@ -226,33 +245,20 @@ And then inside an automation, you make an action
226
245
```
227
246
228
247
Using the above you can automate the mute and unmute of your minidsp with any automation source.
229
-
230
-
You can then do cool stuff like create a binary sensor to show the state of the subs based on the MQTT topic
231
248
232
-
### Config
233
-
The only supported way to configure this is via the web UI. You can also edit the config.json file directly but this is not supported and will probably break things.
249
+
One use case is to mute the subs at night. You can use the time integration to trigger this at a certain time or with a button press.
234
250
235
-
Refer to the web UI for the latest config options.
251
+
### Config
252
+
The only supported way to configure this is via the web UI. You can dump the current config via the `/config` endpoint.
236
253
237
254
### Authentication
238
255
You must whitelist your server IP in "List of IP addresses and networks that are allowed without auth"
239
256
240
257
Why? Plex refuses to implement client to server authentication and you must go through their auth servers. I may eventually implement their auth flow but it is not a priority.
241
258
242
-
### Endpoints
243
-
`/config`
244
-
It will return the current config as JSON
245
-
259
+
### Logs
246
260
`/logs`
247
-
It will return the current logs
248
-
249
-
`/minidspwebhook`
250
-
This is the minidsp webhook endpoint. It accepts POST requests with a JSON body of `{"command": "on"}` or `{"command": "off"}`. It will mute or unmute the minidsp depending on the command.
251
-
252
-
`/plexwebhook`
253
-
This is the main endpoint Plex will write to
254
-
255
-
261
+
It will return the current logs as of the last request. It will not stream logs. You can use this to get logs for debugging. Refresh the page to get the latest logs.
256
262
257
263
### Debugging
258
264
These are environment variables you can set to get more info
@@ -279,11 +285,12 @@ This application will do its best to match editions. It will look for one of the
279
285
1) Plex edition metadata. Set this from your server in the Plex UI
280
286
2) Looking at the file name if it contains `Unrated, Ultimate, Theatrical, Extended, Director, Criterion`
281
287
282
-
There is no other reliable way to get the edition. If an edition is not matched, BEQ will fail to load for safety reasons (different editions have different mastering, etc). If a BEQCatalog entry has a blank edition, then edition will not matter and it will match based on the usual criteria.
288
+
There is no other reliable way to get the edition. If an edition is not matched, BEQ will fail to load for safety reasons (different editions have different masterings, etc). If a BEQCatalog entry has a blank edition, then edition will not matter and it will match based on the usual criteria.
283
289
284
290
If you find repeated match failures because of editions, open a github issue with debug logs of you triggering `media.play`
285
291
286
292
### HDMI Sync Automation
293
+
*Coming soon*
287
294
This application supports automatically waiting until HDMI sync is complete.
288
295
289
296
Have you ever started something in Plex only to hear audio but see a black screen for 10 seconds? Then everyone in your theater makes fun of you and you cry yourself to sleep? This application will prevent that.
@@ -304,7 +311,7 @@ You also must set `plex.playerMachineIdentifier` and `plex.playerIP`. To get thi
304
311
4) Add this to that config field exactly as presented
305
312
306
313
### Audio stuff
307
-
Here are some examples of what kind of codec tags Plex will spit out based on file metadata
314
+
Here are some examples of what kind of codec tags Plex will have based on file metadata
0 commit comments