-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings-example.js
More file actions
75 lines (73 loc) · 2.18 KB
/
Copy pathsettings-example.js
File metadata and controls
75 lines (73 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
'use strict';
module.exports = {
// optional, is shortcutName is specified, the full payload
// will be passed to your automation server
shortcutName: 'Plex Webhook Receiver',
shortcutEventFilter: ['playback.started', 'library.new'],
skipPayloadIfNotOwner: true,
notificationActionSets: [
// living room AND (play OR resume) AND (TV Show OR movie)
{
eventTypes: ['media.play', 'media.resume'],
mediaTypes: ['episode', 'movie'],
players: ['TV - Living Room'],
notificationName: 'MyPushcutNotification',
throttleKey: 'living-room-play-start',
throttleTimeout: 1000 * 60 * 15, /* 15 minutes */
notificationPayload: {
// anything as documented in https://www.pushcut.io/support.html#web_api
defaultAction: {
name: 'Dim the Lights',
homekit: 'Dim the Lights',
},
actions: [{
name: 'Dim the Lights',
homekit: 'Dim the Lights',
}, {
name: 'Movie Time',
homekit: 'Movie Time',
}]
}
},
// MORE EXAMPLES
// living room AND (pause OR stop) AND (TV Show OR movie)
{
eventTypes: ['media.pause', 'media.stop'],
mediaTypes: ['episode', 'movie'],
players: ['TV - Living Room'],
notificationName: 'MyPushcutNotification',
throttleKey: 'living-room-play-paused',
throttleTimeout: 1000 * 60 * 15, /* 15 minutes */
notificationPayload: {
defaultAction: {
name: 'Bighten the Lights',
homekit: 'Bighten the Lights',
},
actions: [{
name: 'Living',
homekit: 'Living',
}]
}
},
// bedroomAND (play OR resume) AND (TV Show OR movie)
{
eventTypes: ['media.play', 'media.resume'],
mediaTypes: ['episode', 'movie'],
players: ['TV - Bedroom'],
notificationName: 'MyPushcutNotification',
throttleKey: 'bedroom-play-start',
throttleTimeout: 1000 * 60 * 15, /* 15 minutes */
notificationPayload: {
defaultAction: {
homekit: 'In Bed',
},
actions: [
{
name: 'In Bed',
homekit: 'In Bed',
}
]
}
}
]
};