Unraid API - Connect and control Unraid servers through Home Assistant via MQTT

@ElectricBrain I’m getting these in my logs as well. Not sure exactly when it started but I get this error by the thousand daily. I posted in your Discord where a few other seem to have this issue as well but no one seems to have any suggestions. Please assist if possible. Below are my notes from the discord post:

  1. I’ve been getting the same errors as well. I’ve used mqtt explorer to view the incoming data on my broker and there are times when it’s missing partial json info that then lead to the errors in the HA logs. See example: (edited)

  2. [6:50 PM]

Image

  1. [6:52 PM]

I got these same errors on 6.9.x before moving to Unraid 6.10.x btw

  1. [6:53 PM]

Oh… and the json above is from the “/homeassistant/tower” topic…where tower is the name of the server (edited)

June 5, 2022

Cpt Trip Today at 10:51 AM

Really hoping someone has suggestions on this as it has been flooding my logs with thousands of errors daily for some time now. It’s not breaking anything but still far from ideal. (edited)

  1. [10:54 AM]

I dont know the details about how the container creates and publishes the messages to mqtt but I see there is a servers.json file being stored in the docker volume and this seems to contain all the data. There is a “serverdetails” portion that also seems to contain the info that is published to the homeassistant/servername topic and I’ve checked this file with every refresh. It seems to always have the complete data but for some reason, it sometimes send the partial data outlined above. Hopefully this info can help track down this issue.

1 Like

So, I have developed a problem with data gathering in Home Assistant. Bear in mind that this had been working fine, not sure if the latest HA updates or Unraid API updates broke it.
I get all of the switches for my dockers and the capacity of my array, but I have lost the data for [sensor.unraid_array_protection] and [sensor.unraid_array_status] both have become unknown in HA. Both of these sensors do populate for a split second from time to time, and then revert almost instantly to unknown in developer tools in HA. I should add that I am on 6.11.5 Unraid Plus and 2023.1.7 of HA.

The part that leads me to believe that this may be an Unraid side issues is that the API connection to my server, after login, only shows my server dockers it now does not list VMs, Utils and server status. I am still seeing the MQTT traffic from Unraid that includes the cpu type, mobo model, memory size, disk space , unraid version

It appears that from time to time the MQTT data from Uraid is correct.

And that sometimes it is truncated.

I have rebooted both systems, refreshed the login on the API in Unraid, but have not reinstalled the Unraid API container on Unraid yet.