From e3e2c3f4b98c43b64e4d4cb71e7fed9612a80499 Mon Sep 17 00:00:00 2001 From: Stephen Farnsworth Date: Tue, 14 Apr 2020 02:52:06 -0600 Subject: [PATCH] Update README.md (#7363) Added additional information specifically for defining 'things' via configuration files Minor formatting changes Signed-off-by: Stephen Farnsworth --- .../org.openhab.binding.minecraft/README.md | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.minecraft/README.md b/bundles/org.openhab.binding.minecraft/README.md index 55e38e8496095..a6c858a8af6f2 100644 --- a/bundles/org.openhab.binding.minecraft/README.md +++ b/bundles/org.openhab.binding.minecraft/README.md @@ -16,6 +16,10 @@ It furthermore keeps track of redstone power going below signs and links them to The Minecraft binding automatically finds all Minecraft servers running [this plugin](https://github.com/ibaton/bukkit-openhab-plugin/releases/download/1.9/OHMinecraft.jar) on the local network. Servers can be added manually if they are not found automatically. +::: tip Note +Discovery uses zeroconf, which may not work if you host a Minecraft server in a virtual machine or container. +::: + ## Channels Depending on the thing type, different channels are provided: @@ -54,8 +58,22 @@ Depending on the thing type, different channels are provided: | signActive | Switch | Does the sign have powered redstone below it | -Active switch (Controllable from openHAB) +#### Active switch (Controllable from openHAB) + -Passive sensor +#### Passive sensor + + +### Example Thing Definition + +The easiest method to add Minecraft servers, players, and signs is use the automatic discovery through Paper UI. However, you can manualy define the objects using thing configuration files. Players and signs are connected through Minecraft server [bridges](https://www.openhab.org/docs/configuration/things.html#defining-bridges-using-files). + +```xtend +Bridge minecraft:server:myminecraftserver "Minecraft server for Friends" @ "Minecraft" [ hostname="192.168.1.100", port=10692 ] { + Thing player my_name "My Minecraft User" @ "Minecraft" [ playerName="minecraft_username" ] + Thing player friends_name "My Friend's Minecraft User" @ "Minecraft" [ playerName="friends_username" ] + Thing sign sign_name "Example Sign" @ "Minecraft" [ signName="sensor" ] +} +```