Skip to content

dglaude/minecraftstatus-blinkt

 
 

Repository files navigation

Number of user on a Minecraft server Indicator with Pimoroni's Blinkt

This use markfickett/minecraftstatus library to check the the status of a Minecraft server, including list of online players. A prestine copy of mcstatus.py is included here.

This is a merge from two independants project found on github:

Hardware

  • Raspberry Pi (any version with 40 pins to accomodate the Blinkt!
  • Pimoroni Blinkt!
  • USB cable and power
  • MicroSD card
  • network connectivity to a minecraft server
  • (Optional) FADO lamp from IKEA

Software

Variant

mc_blinkt_count.py

This indicate a blue count of user connected to the Minecraft server (from 1 to 8) and blink red when in error. It use the Men in Space logic

mc_blinkt_fado.py

This is an ambiant display where all LEDs from the Blinkt! show the same color. You are supposed to put the PiZero and Blinkt! into a FADO lamp from IKEA.

Here is the display logic:

  • Constant Green mean server OK but no-one connected
  • Blinking Blue mean server OK and number of blink is the number of user connected
  • Blinking constantly Red mean problem to connect to the server

mc_blinkt_fade.py

Even better than mc_blinkt_fade.py, this version use fade-in fade-out rather than blinking. It make it even more ambiant indicator and you will notice if the program stop for some reason. Still minded for inclusion into a FADO lamp from IKEA.

Here is the display logic:

  • Slow Fade in and out of Green mean server OK but no-one connected
  • Each fast Fade in and out of Blue between Green indicate the number of user connected
  • Slow Fade in and out of Red mean problem to connect to the server

main.py

This is a copy of the core part of mcstatus.py. It can be used to build other version that use Blinkt! or else.

Usage

Run mc_blinkt_count.py server_name_or_ip on a Pi with connectivity to the minecraft server

Run mc_blinkt_fado.py server_name_or_ip on a Pi with connectivity to the minecraft server

Run mc_blinkt_fade.py server_name_or_ip on a Pi with connectivity to the minecraft server

Features

In a loop, it connect to a Minecraft server, query the number of connected user and it lights up an LED per user connected, in sequence.

If the Minecraft server is unavailable, the end LED blinks red.

Notes

Very special setup (totally out of the scope of this project) for this Raspberry PiZero. The PiZero get both network and power from the host (MAC mini) from a single USB cable. The setup was made based on this: Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed) Additionnaly, the MAC mini is sharing it's internet connectivity for update and communication with remote Minecraft server.

Learning resource

This project is based on a Raspberry Pi learning resource wrote by Ben Nuttall that just uses simple LEDs using GPIO Zero. See People in Space Indicator.

About

Check the status of a Minecraft server, including list of online players.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%