February 23, 20206 yr 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') }}"
February 23, 20206 yr 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?
February 23, 20206 yr 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
February 23, 20206 yr 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?
February 23, 20206 yr 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') }}"
February 23, 20206 yr 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.
February 23, 20206 yr 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!
February 23, 20206 yr 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 ?
February 23, 20206 yr 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 Hopefully this will all be fixed once you have a HA addon :p Edited February 23, 20206 yr by skank
February 23, 20206 yr 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 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
February 23, 20206 yr mmm how do you have it then? Can you show me? I think the card-mod thing is causing all stuff
February 26, 20206 yr 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
February 27, 20206 yr 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
February 27, 20206 yr 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?
February 27, 20206 yr 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!
March 16, 20206 yr 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?
March 16, 20206 yr 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 March 16, 20206 yr by ElectricBrainUK
March 16, 20206 yr 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
March 26, 20206 yr 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
March 27, 20206 yr 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.