Sign inSign up

bokker/unraidapi-re

By bokker

Updated almost 2 years ago

Image
1

100K+

bokker/unraidapi-re repository overview

UnraidAPI-RE

Icon made by Freepik

A new UI and API for controlling multiple unraid instances and connecting them to the Home Assistant Fork of the original project which is abandoned ElectricBrainUK/UnraidAPI

Open an issue

The tags follow the unraid major releases and should work for minor also:

docker pull bokker/unraidapi-re:6.12 for unraid 6.12

Install

Community Applications unraid

Home Assistant AddOn

Env variables
NameTypeDefaultDescription
MQTTBrokerstringRequired if enabledYour broker ip-address or domain e.g. hassio
MQTTPortnumberRequired if enabled1883 (Plain) / 8883 (SSL on hassio)
MQTTUserstringnoneMQTT username
MQTTPassstringnoneMQTT password
MQTTBaseTopicstringhomeassistantThe base topic for all MQTT publishes
MQTTSecurebooleanfalseFor MQTT Over SSL set to true
MQTTSelfSignedbooleanfalseIf you are using a self signed certificate set to true
MQTTRefreshRatenumber60Time in seconds to poll for updates
MQTTCacheTimenumber60Time in minutes after which all entities will be updated in MQTT
LOG_LEVELstringinfoinfo, debug, error, warn
KeyStoragestringconfigWhere to store the secure keys. If left blank the keys are kept in memory and will be destroyed each time the container is updated. Set to config to have the data persist
WRITE_HTML_OUTPUTbooleanfalseWrites the html files it scrapes to config/html_output
Docker host portnumber3005Default web-UI port. Container 80:3005 host

Home Assistant Integration

Automatic

Check out the HA docs on how to set up discovery for MQTT here: https://www.home-assistant.io/docs/mqtt/discovery/

Use the env variable section to set up the MQTT client and connect to your MQTT broker. If auto discovery is enabled in home assistant the following will be created:

  • An entity for each of your servers
    • (sensor) Monitor server status
    • (switch) On/Off switch allows you to start stop array
  • An entity for each of your VMs
    • (switch) On/Off toggle VM state
    • (switch) A seperate entity with a switch to attach / detach any usbs to that vm
    • (sensor) Whether or not a particular usb device is connected to the machine (can be used to automate hotplugging e.g. when connected toggle the usb switch off and on again)
  • An entity for each of your dockers
    • (switch) On/Off toggle Docker state

You will end up having entities like these:

  • binary_sensor.unraid_server (Server info in attributes)
  • binary_sensor.unraid_vm_VMNAME_usb_USBDEVICE
  • sensor.unraid_vm_VMNAME_status (VM stats in attributes)
  • switch.unraid_array
  • switch.unraid_docker_DOCKERNAME (Docker info in attributes)
  • switch.unraid_vm_VMNAME (VM info in attributes)

Manual

Manual Config Example: The server and VM names are as they are in MQTT (spaces are underscores and all lower case) The payload options are started, stopped, paused, restart, kill, hibernate

- platform: mqtt

  command_topic: "homeassistant/servername/vmname/state"
  
  payload_on: "started"
 
  payload_off: "stopped"

When connecting the unraid api to an mqtt broker config details for all the various api functions are posted under the various homeassistant entity types. For example under homeassistant/switch/server/vm/config.

Star History Chart

Tag summary

Content type

Image

Digest

sha256:c2080da42

Size

416.8 MB

Last updated

almost 2 years ago

docker pull bokker/unraidapi-re