Also, because you’re on a LAN between the Home Assistant and the Minecraft server, it’s not your firewall/router, so were not gonna look further into that bit.
You can try using putty or a similar telnet client to connect to the server 192.168.X.X port 25566 and see if there’s response.
Update for sensor.finleys_modded_creative_server fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 441, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/minecraft/sensor.py", line 55, in update
status = self._mcserver.lookup(self._server).status()
File "/usr/local/lib/python3.7/site-packages/mcstatus/server.py", line 49, in status
connection = TCPSocketConnection((self.host, self.port))
File "/usr/local/lib/python3.7/site-packages/mcstatus/protocol/connection.py", line 129, in __init__
self.socket = socket.create_connection(addr, timeout=timeout)
File "/usr/local/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
socket.timeout: timed out
From the socket timeout error, there is some sort of issue communicating with your server.
Some basic troubleshooting stuff but might help
Is the Minecraft Server on the same network? Make sure that the port is open.
If you aren’t sure try using telnet to connect to the Minecraft port from your HA box, it should give you a “Connected” message, if it can’t reach it then there’s a networking issue that needs to be resolved.
When I enable this in configuration.yaml and restart my Hass.io on Pi (0.103.4), it hangs and never finishes booting. I can’t tell what’s wrong, but I’m also fairly new to HA. Is there a startup log that I can look at to see what it doesn’t like and see if I can fix it?
edit - I can still ssh and samba to it, it just won’t load the HA interface. But I don’t know what log to look at.
edit - SSH’d in, saw the command “hassio homeassistant logs” and saw that the fork I was using was really messed up. Changed back to the one right above this post, and am now getting the socket timeout errors from a previous post. Status checkers like https://mcsrvstat.us/ show that it’s up and shows me all of its stats… Troubleshooting that, will update…
Hi - did you get anywhere with this? The HA interface doesn’t load in 0.105, and if I try the suggested https://github.com/olenoerby/MinecraftServer-HA it doesn’t even load, complains about the config/port not responding. Did you figure out the query config - I think that would have just been a typo?
This - https://github.com/sondregronas/MinecraftServer-HA - worked great previously, though seemed to crash the UI after a few hours too, not sure if it was when the server was unavailable as I have it shutting down at night.
I wonder if its possible to add minecraft time of day to the entities for this? I’ve looked over the python code and sadly its beyond my understanding… but if we knew the time of day in minecraft we could do cool things with lights in the real world
I’m trying to use the integration with an external IP address. So it looks something like:
Host: 213.99.22.105:25565 (This is a random IP address ofcourse)
In this case the integration gives an error: IP address is invalid (MAC address could not be determined).
I’ve tried it with my internal IP address and i can connect to the server. But externally with an IP address doesn’t seem to work for the integration. My Minecraft client can connect to the host.
There is an (unnecessary?) check on the mac address. If your server isn’t running in the same LAN segment it will fail.
When using a hostname, it won’t do the mac check and works.
I don’t know enough of github/programming to do a pr, but maybe someone else could try? Github comment
Hi!
The MAC address check is still there but you can fix this with a workaround in Linux.
Associate the address of your server to an IP in the /etc/hosts file of your server (or if you also have a pihole in your net, add a DNS entry for your server IP) and it should work correctly!
Hi all. FYI: The MAC check for the Minecraft Server integration was removed in HA core 2023.10. And in 2023.11 support for Bedrock Edition servers was added.
I’m curious if anyone has any bedrock and/or java sensors that display what the latest version is? Not the version my server is running, but the latest one available. Seems to me this should be doable with a Rest or command_line sensor, but I’m having a hard time determining what resource I could query for the current latest version.
I wrote a shell_command service that runs upgrades on my Turnkey servers, would love it if I could get a notification that an update is available.
From there it’s just a simple matter of writing an automation that triggers when this sensor is different from the current values provided by the installation to flag when an update is available.