Node-RED nodes to ping a Minecraft server to see if my daughter is still logged-in.
These simple nodes use the Minecraft ping protocol to get a list of sample players logged-in to a server, and the number of players. As I understand it, this is not guaranteed to contain all (if any) players, but I think this simple "ping" API can be achieved without a full server login, and for a small private server will probably deliver the required information... it certainly does what I need it to do.
These nodes is simple, but could be forked and extended to provide a much larger interface to Minecraft. See node-minecraft-protocol for the more-extensive JavaScript API.
As ever, improvements welcome. I do suggest, however, that if you want to
increase the functionality significantly, you fork this project as
node-red-contrib-minecraft-query
or another name, and keep this node
simple to use.
I've deviated from the recommended white/transparent icon for the node; I'm usually a stickler for standards, but the iconic Creeper face is just too irresistable to ignore. There are a few alternative icons that can be overridden in the "Appearance" panel for the node; just search for minecraft.