playnite-web-app • Docs
playnite-web-app / api/mqtt
Playnite Web interacts with Playnite via MQTT messages. As such, any other application connected to the same MQTT broker can also subscribe and publish these messages.
- There are some differences between Playnite and Playnite Web's data modeling. Please see Playnite Web's data model for more details.
- Message payloads are utf8 strings of JSON.
- JSON payloads properties are camel cased; e.g.
id
,platformId
, etc.
Value Name | Description/Purpose |
---|---|
deviceId |
Setting in Playnite Web's extension's settings. Should uniquely identify a Playnite instance. |
Published when Playnite Web connects or disconnects from the MQTT
type Payload = {
version: string // Version of Playnite Web extension
state: 'online' | 'offline'
}
Published entity for each entity of type, DataEntityType
. See data entities for more details.
type Payload =
| Game
| Release
| Platform
| Playlist
| Source
| Tag
| Feature
| CompletionStatus
| Genre
Published when a release's run state has changed. Supports installing
, installed
, launching
, running
, stopping
, uninstalling
, uninstalled
, restarting
.
Note run states of
installing
,stopping
,uninstalling
andrestarting
are published exclusively by Playnite Web application and not the extension.
type Payload = {
state: RunState
release: Release
}
Published by the web app when starting a game via the graph API.
type Payload = {
game: {
id: string // Release.id
gameId: string // Release.gameId; the game ID is the unique identifier assigned by the source in Playnite.
name: string // Release.name
platform: {
id: string // Platform.id
name: string // Platform.name
}
}
}
Topic | Description/Purpose |
---|---|
playnite/request/library |
Triggers a Playnite Web sync. |
playnite/request/game/start |
Triggers Playnite to start the release. |
playnite/request/game/install |
Triggers Playnite to install a release; only valid if release is on the PC platform. |
playnite/request/game/uninstall |
Triggers Playnite to uninstall a release; only if installed. |
playnite/request/game/stop |
Triggers Playnite to stop a release, if running. |
Triggers a Playnite Web sync. There is no payload.
Triggers Playnite to start the release.
type Payload = {
game: {
id: string // Release.id
platform: {
id: string // Platform.id
}
}
}
Triggers Playnite to install a release; only valid if release is on the PC platform.
type Payload = {
game: {
id: string // Release.id
platform: {
id: string // Platform.id
}
}
}
Triggers Playnite to uninstall a release; only if installed.
type Payload = {
game: {
id: string // Release.id
platform: {
id: string // Platform.id
}
}
}
Triggers Playnite to stop a game process; if one is running.
type Payload = {
game: {
id: string // Release.id
processId: int // Process ID provided in MQTT game state message.
platform: {
id: string // Platform.id
}
}
}