@sebbo2002/pyatv-mqtt-bridge 4.0.3-develop.1 → 4.0.3-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -109,6 +109,30 @@ To execute a command send any message to the topic `$device/$command`. `$device`
|
|
|
109
109
|
and `$command` is a command from [this list](https://github.com/sebbo2002/node-pyatv/blob/develop/src/lib/types.ts#L49).
|
|
110
110
|
Example: `/home/living/appletv/menu`.
|
|
111
111
|
|
|
112
|
+
#### How to check the current Apple TV power state and other status information ?
|
|
113
|
+
|
|
114
|
+
You can listen to several subtopics from the root MQTT topic you've set on your `config.json` file
|
|
115
|
+
(i.e. : `/home/living/appletv`), such as `/powerState` (on, off) and `/deviceState` (iddle, playing, etc...).
|
|
116
|
+
|
|
117
|
+
#### When the Apple TV is off, the turnOff command turns it on instead, how to fix this ?
|
|
118
|
+
|
|
119
|
+
Say you send an MQTT message to turn off your Apple TV each time you're leaving home,
|
|
120
|
+
with the following MQTT topic : `/home/living/appletv/turnOff`.
|
|
121
|
+
... but when you are back home, sometimes your Apple TV is on ! 🤔
|
|
122
|
+
|
|
123
|
+
Actually, if you press the power button in the right upper corner of your Apple TV remote iOS app, while your Apple TV
|
|
124
|
+
is already off, it will switch it on as well, and this project only provides bridging between MQTT
|
|
125
|
+
and PyATV / Apple TV APIs, with no additional data persistence.
|
|
126
|
+
|
|
127
|
+
> (You could use the `/suspend` command instead of `/turnOff` to avoid this, but the `suspend` and `wakeup`
|
|
128
|
+
> commands are deprecated and may lead to unexpected behaviors).
|
|
129
|
+
|
|
130
|
+
So you just need to implement a listener for the powerState MQTT topic (i.e. : `/home/living/appletv/powerState`)
|
|
131
|
+
in your own app, and store the payload value somewhere (DB, local file, Redis...).
|
|
132
|
+
|
|
133
|
+
Then your app logic with some "standby apple TV" feature should trigger an MQTT `/turnOff` command ONLY when your
|
|
134
|
+
powerState stored value is 'on'.
|
|
135
|
+
|
|
112
136
|
## Copyright and license
|
|
113
137
|
|
|
114
138
|
Copyright (c) Sebastian Pekarek under the [MIT license](LICENSE).
|
package/package.json
CHANGED
|
@@ -16,24 +16,24 @@
|
|
|
16
16
|
"@amanda-mitchell/semantic-release-npm-multiple": "^3.5.0",
|
|
17
17
|
"@qiwi/semantic-release-gh-pages-plugin": "^5.2.3",
|
|
18
18
|
"@sebbo2002/semantic-release-docker": "^2.1.0-develop.1",
|
|
19
|
-
"@semantic-release/changelog": "^6.0.
|
|
19
|
+
"@semantic-release/changelog": "^6.0.2",
|
|
20
20
|
"@semantic-release/exec": "^6.0.3",
|
|
21
21
|
"@semantic-release/git": "^10.0.1",
|
|
22
|
-
"@semantic-release/github": "^8.0.
|
|
23
|
-
"@types/mocha": "^10.0.
|
|
24
|
-
"@types/node": "^18.11.
|
|
22
|
+
"@semantic-release/github": "^8.0.7",
|
|
23
|
+
"@types/mocha": "^10.0.1",
|
|
24
|
+
"@types/node": "^18.11.10",
|
|
25
25
|
"@types/ws": "^8.5.3",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
27
|
-
"@typescript-eslint/parser": "^5.
|
|
28
|
-
"eslint": "^8.
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
27
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
28
|
+
"eslint": "^8.29.0",
|
|
29
29
|
"eslint-plugin-jsonc": "^2.5.0",
|
|
30
30
|
"esm": "^3.2.25",
|
|
31
31
|
"license-checker": "^25.0.1",
|
|
32
32
|
"semantic-release": "^19.0.5",
|
|
33
33
|
"semantic-release-license": "^1.0.3",
|
|
34
34
|
"ts-node": "^10.8.1",
|
|
35
|
-
"typedoc": "^0.23.
|
|
36
|
-
"typescript": "^4.
|
|
35
|
+
"typedoc": "^0.23.21",
|
|
36
|
+
"typescript": "^4.9.3"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": "^12.20.0 || >=14.13.1"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"start": "node ./dist/bin/cli.js"
|
|
60
60
|
},
|
|
61
61
|
"type": "module",
|
|
62
|
-
"version": "4.0.3-develop.
|
|
62
|
+
"version": "4.0.3-develop.3"
|
|
63
63
|
}
|