Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Electric Brain Unraid API

Featured Replies

and my server.yaml

 


#### CUSTOMIZE #################################################################

homeassistant:
  customize_glob:
    sensor.unraid_server:
      templates:
        hs_color: "if (state === 'up') return [115,100];
          else return [360,100];"

glances:
  - host: !secret unraid_server

sensor:
  - platform: template 
    sensors:
      unraid_server:
        entity_id: device_tracker.unraid_server
        friendly_name: Unraid
        icon_template: mdi:nas
        value_template: >
          {% if is_state('device_tracker.unraid_server', 'home') %}
            up
          {% else %}
            down
          {% endif %} 
      server_motherboard:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'motherboard') }}"
      server_cpu:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'cpu') }}"
      server_memory:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'memory') }}"
      server_diskspace:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'diskSpace') }}"      
      server_arraystatus:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayStatus') }}"
      server_arrayprotection:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayProtection') }}"

  • Replies 402
  • Views 108.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • ElectricBrainUK
    ElectricBrainUK

    Hi everyone, sorry for my absence here. I appreciate that it has not been working since 6.11, I will produce a final update to fix the issue at some point but I don't have much time at the moment with

  • I finally found a fix for all people with the 503 error! Unraid is blocking an IP after to many wrong attempts and if u have entered the wrong credentials more then 3 times u will get blocked fro

  • Yay, finally! If anyone else runs HomeAssistant and unRAID, this is basically a one-way MQTT bridge from unRAID to HA. You can control containers, VMs, USB hotplugging, etc. Please help with testing a

Posted Images

or should i use as entities card?

  • Author
3 minutes ago, skank said:

no this is my config yaml

 

 


default_config:

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages


frontend:
  themes: !include_dir_merge_named themes
  
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

lovelace:
  mode: yaml

customizer:
  custom_ui: local
  
hacs:
  token: !secret hacs_token
  appdaemon: true
  
# Text to speech

tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor:
  - platform: unifigateway
    host: !secret unifi_host
    site_id: !secret unifi_site
    username: !secret unifi_username  
    password: !secret unifi_password
    monitored_conditions:
      - www
      - lan
      - wan
      - wlan
      - vpn
      - alerts
      - firmware
  - platform: template 
    sensors:
      server_motherboard:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'motherboard') }}"
      server_cpu:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'cpu') }}"
      server_memory:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'memory') }}"
      server_diskspace:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'diskSpace') }}"      
      server_arraystatus:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayStatus') }}"
      server_arrayprotection:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayProtection') }}"
        
remote:
  - platform: harmony
    name: Harmony Hub
    host: !secret harmony


  

 

Ah okay, so when you add the API sensors it should be as above?

 

That wouldn't explain the issue with glances anyway.. Does the unraid stuff show up or is both the Glances and unraid stuff missing? 

 

both are missing, the glances and the attributes

 

Why do you put the sensors back into the config file?

i split them up so it easier to find everything back

 

if i get rid of the attributes, the glances come back up

  • Author

I also have them split but for your sensors you had them inline already so I just used that as an example. Where is your glances configured in the integrations section? 

its under packages > server.yaml

 


#### CUSTOMIZE #################################################################

homeassistant:
  customize_glob:
    sensor.unraid_server:
      templates:
        hs_color: "if (state === 'up') return [115,100];
          else return [360,100];"

glances:
  - host: !secret unraid_server

sensor:
  - platform: template 
    sensors:
      unraid_server:
        entity_id: device_tracker.unraid_server
        friendly_name: Unraid
        icon_template: mdi:nas
        value_template: >
          {% if is_state('device_tracker.unraid_server', 'home') %}
            up
          {% else %}
            down
          {% endif %} 
      server_motherboard:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'motherboard') }}"
      server_cpu:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'cpu') }}"
      server_memory:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'memory') }}"
      server_diskspace:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'diskSpace') }}"      
      server_arraystatus:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayStatus') }}"
      server_arrayprotection:
        value_template: "{{state_attr('binary_sensor.unraid_server', 'arrayProtection') }}"

  • Author

Oh cool I didnt know you could add packages like that, thanks! I had been using !include for each thing but my sensors and other files were getting a bit large so this would be a good way to break them up.

 

But Im afraid I really don't know what the problem is sorry! The only thing I can thing of is that the template is creating a sensor with the same name as a glances one, though I thought that would just append a _2 to the id. 

  • Author

You can try our discord though, the link is in the first post of this topic, there are a few others there that might be able to help! 

2 hours ago, ElectricBrainUK said:

Oh cool I didnt know you could add packages like that, thanks! I had been using !include for each thing but my sensors and other files were getting a bit large so this would be a good way to break them up.

 

But Im afraid I really don't know what the problem is sorry! The only thing I can thing of is that the template is creating a sensor with the same name as a glances one, though I thought that would just append a _2 to the id. 

ur welcome :p

damn so im on my own ? :(

 

or should i delete the template sensors i created from the binary sensor

and enter the entity "binary sensor" in the card and then point to the attributes?

 

How did you do this here?

https://github.com/ElectricBrainUK/UnraidAPI/wiki/Lovelace-Config

 

See also

https://github.com/custom-cards/entity-attributes-card

 

It also keeps saying the binary sensor is unavailble

 

the first time under development options i could look at the binary sensor and see the attributes, now i cannot anymore

 

1.JPG.ffbd7bfa32328396f4a269b9ec74d1e4.JPG

 

Hopefully this will all be fixed once you have a HA addon :p

Edited by skank

i delete the attributes and tada, there are the glances again

 

2.JPG.573daff1749d46f26d437e88449ae024.JPG

  • Author
14 minutes ago, skank said:

or should i delete the template sensors i created from the binary sensor

and enter the entity "binary sensor" in the card and then point to the attributes?

 

How did you do this here?

https://github.com/ElectricBrainUK/UnraidAPI/wiki/Lovelace-Config

 

See also

https://github.com/custom-cards/entity-attributes-card

 

It also keeps saying the binary sensor is unavailble

 

the first time under development options i could look at the binary sensor and see the attributes, now i cannot anymore

 

1.JPG.ffbd7bfa32328396f4a269b9ec74d1e4.JPG

 

Hopefully this will all be fixed once you have a HA addon 😛

The person that added that is Ezra a member of our community but as I said best to reach out to him on the discord server as he is not active here, here is the invite link: https://discord.gg/Qa3Bjr9

mmm how do you have it then? Can you show me?

I think the card-mod thing is causing all stuff

Hit me up on discord to troubleshoot.

What other type info can be displayed/pulled with API?

 

Some stats that interest me are  - Can this info be pulled?

uptime of system

Unraid Version running

Apps running/installed

 

 

 

  • Author
2 hours ago, chip said:

What other type info can be displayed/pulled with API?

 

Some stats that interest me are  - Can this info be pulled?

uptime of system

Unraid Version running

Apps running/installed

 

 

 

Most major things are listed here: https://github.com/ElectricBrainUK/UnraidAPI/wiki/Home-Assistant-Integration

 

Uptime isn't explicitly but it will report when it turns on so if you're using home assistant that would know uptime. I'll add it to the list though

 

Unraid version isn't there yet but I'll also add that to the list.

 

If by apps you means dockers/ VMS that is there, nothing for plugins though

ElectricBrainUK,

 

any chance to add to the list:

- Power up the unraid machine

- power down the unraid machine

- possible to see the download status of sabnzb on unraid?

- possible to add nzb to sabnzb on unraid

 

this all through Home assistant?

 

19 hours ago, ElectricBrainUK said:

Most major things are listed here: https://github.com/ElectricBrainUK/UnraidAPI/wiki/Home-Assistant-Integration

 

Uptime isn't explicitly but it will report when it turns on so if you're using home assistant that would know uptime. I'll add it to the list though

 

Unraid version isn't there yet but I'll also add that to the list.

 

If by apps you means dockers/ VMS that is there, nothing for plugins though

Apps I meant plugins.

 

Would be great on those other items. Thanks!

  • 3 weeks later...

I use your plugin at my unraid server and have connect it with my Home Assistant. But when i check the state of a container in Home Assistant, is shows always off but the container is running for sure at my unraid server. In your webinterface it shows also running but in HA it's shows off. Can you help me?

  • Author

Sounds like there is a problem with the mqtt connection, can you confirm if you see the mqtt messages being sent when container states change? Also is there anything unusual in the logs? 

Edited by ElectricBrainUK

1 hour ago, ElectricBrainUK said:

Sounds like there is a problem with the mqtt connection, can you confirm if you see the mqtt messages being sent when container states change? Also is there anything unusual in the logs? 

Forget my post ;-) It was a setting which i found at your site. after a restart works now perfect since i add MQTTRefreshRate and MQTTCacheTime to the unraid api docker. Thx for your reply

  • Author

Ah that's great news no worries

Absolutely fantastic! Thank you very much!

Hi All,

I haven't installed the Unraid API yet but was just wondering if I can use it to send a sleep command to the Unraid server from HA?

 

Cheers

  • Author

Hey,

No not sleep, does unraid support sleep? It can start/stop the array and will be able to restart/ shutdown the host at some point.

Cheers

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.