Skip to main content

Minecraft Server smart home integration, free and open source

Minecraft Server integration for Gladys Assistant

Minecraft Java or Bedrock server: who is playing, arrivals and departures, chat via RCON.

Follow your Minecraft server from Gladys: whether it is online, how many players are on it and who, its version and its message of the day. Gladys can react when a player joins or leaves, or when the server stops, and send a message in the game chat ("Dinner is ready!") through RCON. Java Edition and Bedrock Edition, at home (a NAS, a Raspberry Pi, a PC) or on the Internet.

The integration reads the server like the multiplayer screen of the game does (the "Server List Ping"): no Minecraft account, no plugin, nothing to install on the server. This integration is not affiliated with Mojang or Microsoft.

Developed without the hardware: feedback welcome. The Java Edition part was tested against a real vanilla 1.21.11 server; the Bedrock Edition part only against answers documented by others, and nothing was tested inside a real Gladys yet. If something does not work as described, please say so on the Gladys forum or in the issues.

What you need​

  • Gladys Assistant 5.1.0 or later.
  • A Minecraft server reachable from Gladys: Java Edition 1.7 or later (vanilla, Paper, Spigot, Fabric, Forge, a BungeeCord or Velocity proxy…) or Bedrock Edition (Bedrock Dedicated Server, or a server with a Bedrock port). A server on the Internet works too: Gladys reads it directly.
  • In the server.properties of the server, enable-status=true (the default).
  • Optional, Java Edition only: RCON, for the complete list of players and the chat messages. In server.properties: enable-rcon=true, rcon.password= a password of its own, rcon.port=25575 (the default). Restart the server after the change.

Set up​

  1. Install the integration from the Gladys catalog.
  2. In Configuration, enter the Address of the server, as you type it in the game: 192.168.1.20, mc.example.com, or 192.168.1.20:25570 when the port is not the default one (Java 25565, Bedrock 19132). For a Java name without port, the SRV record _minecraft._tcp is used, like in the game. Pick the Edition and optionally a Name.
  3. RCON (optional, Java): tick Use RCON, enter the RCON port and the RCON password.
  4. Save, then click Test the connection: the message under the button says, for each server, whether it answers, its version, the players and whether RCON works.
  5. Open the Discover tab: one device per server. Click Add, pick a room, save.

Up to three servers: fill in the Second server and Third server sections. Other options:

  • Refresh interval: how often the servers are read, from 15 seconds to 5 minutes (30 seconds by default). An arrival is seen at most that late. A status request is a few hundred bytes: even every 15 seconds, the server does not notice it.
  • Language of the feature names: English, French, German or Spanish (French by default). The names are given when a device is added; the players text and the scene events use it too.

The device of each server​

FeatureWhat it is
Online1 when the server answers, 0 once it failed to answer twice in a row
Players onlineHow many players are on the server
Player slotsThe max-players of the server
PlayersWho is playing (Java Edition only), "Nobody", or a note when the list is partial or hidden
VersionThe version the server announces (1.21.11, Paper 1.21.4, Velocity 3.4.0…)
Message of the dayThe MOTD, without its colors, its two lines joined by "·"
LatencyThe time the status request took, in milliseconds

A Bedrock Edition server never tells who is playing: its device has no Players feature, and the join and leave triggers do not fire for it. When the server is offline, Online and Players online go to 0, Players says so, and the version and the MOTD keep their last value.

Who is playing, Java Edition: without RCON, the names come from the "sample" of the status answer. The vanilla server puts 12 players at most in it, picked at random; hide-online-players=true removes it; a player who turned off Allow Server Listings shows as "Anonymous Player"; some plugins and proxies replace it with text. The Players text says when the list is partial ("and 3 more") or hidden. With RCON, the integration asks the server for its complete list (the list command).

Dashboard​

Add the Minecraft widget to a dashboard: for each server (all of them, or the one chosen in the widget settings), a tile with the players online and the slots, green when the server answers, red when it is offline; and a list with the state of each server, its version and who is playing. With one server, a second tile shows the latency.

Scenes​

The integration adds its own cards to the scene editor (Gladys 5.1 or later).

Triggers​

  • A player joined the Minecraft server — filters: the server (empty: any) and the player name (empty: anyone; exactly as in the game, case included). Variables: player, server, device, players_online.
  • A player left the Minecraft server — same filters. Variables: player, server, device, players_online, minutes_played (how long the player stayed, empty when the player was already there when the integration started).
  • Minecraft server offline — the server no longer answers, twice in a row (a single lost answer is ignored). Filter: the server. Variables: server, device, error (the reason, in the configured language).

The join and leave triggers need the complete list of players: with RCON always; without RCON, only while the server shows 12 players or fewer and no hidden name. When the list is partial, no join or leave is invented: they are not reported. When the whole server stops, only Minecraft server offline fires, not one departure per player; when it comes back, the players already there are not reported as arrivals.

Actions​

  • Send a message in the Minecraft chat — to one server, or to every server with RCON when the server field is empty. One line, 256 characters at most; the message may use the variables of the scene (Welcome {{triggerEvent.data.player}}!). The players see it as [Rcon] Dinner is ready!: it is the say command of the server, and the only command the integration sends besides list. Needs RCON (Java Edition). Output: servers, how many servers took the message.

On the Configuration screen, Test the connection reads every server now.

Scene ideas​

  • Dinner time: at 7:30 pm, Send a message in the Minecraft chat "Dinner is ready! Save and come down 🍽️".
  • Who is on? When A player joined the Minecraft server, send a Gladys message to the parents: "{{triggerEvent.data.player}} joined {{triggerEvent.data.server}}".
  • Bedtime: on school days at 9 pm, if Players online is above 0, send "Last 5 minutes!" in the chat, then turn off the gaming PC's smart plug at 9:05 pm.
  • The server crashed: when Minecraft server offline, send a notification with {{triggerEvent.data.error}} to the person who runs the server.

Troubleshooting​

  • "does not answer": check the address and the port from the computer running Gladys, that enable-status=true, and that a firewall lets the port through (TCP 25565 for Java, UDP 19132 for Bedrock). Gladys runs the integration in a Docker container: localhost there is not your server, use its IP address on your network.
  • "not a Minecraft server of this edition": something answers on that port but not like a Minecraft server of the chosen edition: check the Edition (a Bedrock server does not answer the Java request) and the port.
  • "name not found": the name does not resolve from Gladys; use the IP address.
  • "RCON password refused": the password is not the rcon.password of the server. "RCON does not answer": enable-rcon=true missing, wrong RCON port, or the port blocked by a firewall. RCON problems never make the server "offline": the status keeps working.
  • No names in Players: the server hides them (see above): enable RCON.
  • To see more: set LOG_LEVEL=debug on the container; the integration then logs each reading, each join and each leave. It never logs the RCON password.

Limits​

  • Java Edition 1.7 or later: the servers older than 1.7 (2013, the old "legacy" ping) are not supported.
  • Who is playing: Java Edition only, 12 names at most without RCON (see above). Bedrock Edition only tells how many players are online.
  • A join or a leave is seen at the next reading (30 seconds by default): a player who comes and goes between two readings is not seen.
  • One RCON connection is kept open per server: the vanilla server writes two lines in its log for each new RCON connection, and reconnecting every 30 seconds would flood it.
  • Chat messages go through say: the game shows them with the [Rcon] prefix. No other command is possible from Gladys, on purpose.
  • No automatic discovery of the servers on the network: Gladys runs the integration in an isolated container that does not see the LAN broadcasts of the game. Type the address.
  • Developed without a real Gladys and without a real Bedrock server: what was not checked on them is listed in the README of the repository.

Configuration settings​

These are the settings Minecraft Server asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Your Minecraft serversectionNoRead like the multiplayer screen of the game, without any account. At home or online. Up to three servers. Not affiliated with Mojang or Microsoft.
AddressstringYesAs typed in the game: IP address or name, :port if not the default (Java 25565, Bedrock 19132).
EditionselectNoJava Edition (PC, Mac, Linux) or Bedrock Edition (consoles, tablets, Windows).
NamestringNoName of the device in Gladys. Empty: "Minecraft" followed by the address.
Use RCON (Java only)booleanNoFull list of players and chat messages from scenes. Needs enable-rcon=true and rcon.password in server.properties.
RCON portnumberNorcon.port of server.properties, 25575 by default.
RCON passwordsecretNorcon.password of server.properties. Use a password of its own: RCON can run any command.
Second server (optional)sectionNoSame fields, for another Minecraft server.
AddressstringNoAs typed in the game: IP address or name, :port if not the default (Java 25565, Bedrock 19132).
EditionselectNoJava Edition (PC, Mac, Linux) or Bedrock Edition (consoles, tablets, Windows).
NamestringNoName of the device in Gladys. Empty: "Minecraft" followed by the address.
Use RCON (Java only)booleanNoFull list of players and chat messages from scenes. Needs enable-rcon=true and rcon.password in server.properties.
RCON portnumberNorcon.port of server.properties, 25575 by default.
RCON passwordsecretNorcon.password of server.properties. Use a password of its own: RCON can run any command.
Third server (optional)sectionNoSame fields, for another Minecraft server.
AddressstringNoAs typed in the game: IP address or name, :port if not the default (Java 25565, Bedrock 19132).
EditionselectNoJava Edition (PC, Mac, Linux) or Bedrock Edition (consoles, tablets, Windows).
NamestringNoName of the device in Gladys. Empty: "Minecraft" followed by the address.
Use RCON (Java only)booleanNoFull list of players and chat messages from scenes. Needs enable-rcon=true and rcon.password in server.properties.
RCON portnumberNorcon.port of server.properties, 25575 by default.
RCON passwordsecretNorcon.password of server.properties. Use a password of its own: RCON can run any command.
GeneralsectionNoFor every server.
Refresh intervalselectNoHow often the servers are read: an arrival is seen at most this late.
Language of the feature namesselectNoNames given to the features when a device is added, and texts of the players list and of the scene events.

How to install Minecraft Server in Gladys​

  1. In Gladys, open Integrations: Minecraft Server appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-minecraft:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-minecraft.

Minecraft Server requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Minecraft Server is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂