TrueNAS integration

It’ll be the web port your TrueNAS is listening on, so 80 or 443 if it’s using SSL.

Unfortunately, I’ll add to the long list of people reporting unsuccessful configuration.
My 2024.8 HA fails to add an integration to this integration (latest beta 1.3b2?).
The logged error is
' * TrueNAS <ipddr>:443 unable to fetch data "reporting/get_data" (500)'
However, when I try to reproduce the call to this API from the command line I get the 405: Method Not Allowed. Calling other endpoints i.e. /smart/test/results/ seem to work ok from the command line.

I updated TrueNAS today from Dragonfish to ElectricEel so that DLNA finally works.
Unfortunately, the integration no longer works.
I deleted the old one and tried to set up the integration again.
The setup (IP + ApiKey) also worked, but then there is an error when loading.
Will there be an update for this?
That would be wonderful.

I have the same issue. Updated TrueNAS to ElectricEel, and the HA integration stops working. Removed and tried to add, it’s added but getting error as Failed setup, will retry: TrueNAS Disconnected.

Also deleted existing API key in TrueNAS and added a new one. But no luck.

This is always the case on a new (major) release of TrueNAS. I believe the developer needs to make changes for it to work.
This has been raised on the Dev’s github and there is also a temporary work-around in the comments: https://github.com/tomaae/homeassistant-truenas/issues/170

Anyone here has created dashboard cards that they would consider sharing/showing?

2 Likes

Hello.
I am working on HA version
1
Unfortunately, in the add-ons I don’t see an option to select TrueNas. Do I need to add which repository?

The TrueNAS intergration can be installed using the HACS intergration.
The HACS install guide is found here: https://www.hacs.xyz/

The TrueNAS installation instrutions can be found here: GitHub - tomaae/homeassistant-truenas: TrueNAS integration for Home Assistant

Can someone let me know if there is an attribute or some thing that triggers if a disk has say a read write error? I’m switching over from OMV to truenas and the OMV integration has this feature just wondering if can send some SMART errors to home assistant which then sends a notification to my phone.

You can use “healthy” pool sensors for any such issues.

1 Like

Thank you for the hard work with this integration and for the extra help making moving over to Truenas that much easier.

Does anyone have any issues when having multiple TrueNAS instances that the network sensors only report on 1 of the instances?

I have 4 TrueNAS systems which report plenty of stats (system, pools, and more) but only 1 has any data reported for network traffic. The other 3 stay at 0.00MiB/s (have tried other UoM).

I have checked the TrueNAS interfaces as well as TrueCommand and they report expected network activity.

Anyone create a Dashboard for Truenas and or integrate the Disk Smart info ?

That is awesome, can you drop your YAML ?

This is the entire view/page card (have 4 instances of TrueNAS)… Also, there are some extra fields as I use LCARS for my theme.

icon: mdi:nas
path: nas
title: NAS
type: custom:grid-layout
layout_type: grid
layout:
  grid-template-columns: 50% 50%
badges: []
cards:
  - type: vertical-stack
    cards:
      - type: custom:html-card
        title: TrueNAS1
        content: " "
        card_mod:
          class: header-right
      - square: false
        type: grid
        cards:
          - type: entities
            title: ""
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entities:
              - entity: update.truenas1_system_update
              - entity: sensor.truenas1_system_uptime
              - entity: binary_sensor.truenas1_system_freenas_boot_healthy
              - entity: sensor.truenas1_system_freenas_boot_free
          - type: entities
            title: ""
            card_mod:
              class: middle-right
            entities:
              - entity: binary_sensor.truenas1_system_raid_healthy
              - entity: sensor.truenas1_system_raid_free
              - entity: sensor.truenas1_datasets_raid
        columns: 2
      - square: true
        type: horizontal-stack
        cards:
          - type: custom:mini-graph-card
            entities:
              - entity: sensor.truenas1_system_cpu_usage
            name: CPU Usage
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: custom:mini-graph-card
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            entities:
              - entity: sensor.truenas1_system_memory_usage
            name: Memory Usage
            card_mod:
              class: middle-blank
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
            lower_bound: 0
            name: Upload
            icon: mdi:upload-network
            entities:
              - entity: sensor.truenas1_system_eno1_tx
          - type: custom:mini-graph-card
            card_mod:
              class: middle-right
            lower_bound: 0
            name: Download
            icon: mdi:download-network
            entities:
              - entity: sensor.truenas1_system_eno1_rx
      - square: false
        type: grid
        cards:
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas1_system_temperature
            needle: true
            name: CPU
            min: 20
            max: 120
            severity:
              green: 0
              yellow: 50
              red: 75
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas1_disks_sda
            needle: true
            name: sda
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-right
            entity: sensor.truenas1_disks_sdb
            needle: true
            name: sdb
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas1_disks_sdc
            needle: true
            name: sdc
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-right
            entity: sensor.truenas1_disks_sdd
            needle: true
            name: sdd
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
        columns: 4
      - type: custom:html-card
        title: " "
        content: " "
        card_mod:
          class: footer-right
  - type: vertical-stack
    cards:
      - type: custom:html-card
        title: TrueNAS2
        content: " "
        card_mod:
          class: header-left
      - square: false
        type: grid
        cards:
          - type: entities
            title: ""
            card_mod:
              class: middle-left
            entities:
              - entity: update.truenas2_system_update
              - entity: sensor.truenas2_system_uptime
              - entity: binary_sensor.truenas2_system_freenas_boot_healthy
              - entity: sensor.truenas2_system_freenas_boot_free
          - type: entities
            title: ""
            card_mod:
              class: middle-blank
            entities:
              - entity: binary_sensor.truenas2_system_raid_healthy
              - entity: sensor.truenas2_system_raid_free
              - entity: sensor.truenas2_datasets_raid
        columns: 2
      - square: true
        type: horizontal-stack
        cards:
          - type: custom:mini-graph-card
            entities:
              - entity: sensor.truenas2_system_cpu_usage
            name: CPU Usage
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            card_mod:
              class: middle-left
          - type: custom:mini-graph-card
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            entities:
              - entity: sensor.truenas2_system_memory_usage
            name: Memory Usage
            card_mod:
              class: middle-blank
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
            lower_bound: 0
            name: Upload
            icon: mdi:upload-network
            entities:
              - entity: sensor.truenas2_system_lagg0_tx
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            lower_bound: 0
            name: Download
            icon: mdi:download-network
            entities:
              - entity: sensor.truenas2_system_lagg0_rx
      - square: false
        type: grid
        cards:
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas2_system_temperature
            needle: true
            name: CPU
            min: 20
            max: 120
            severity:
              green: 0
              yellow: 50
              red: 75
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_ada0
            needle: true
            name: ada0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_ada1
            needle: true
            name: ada1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas2_disks_ada2
            needle: true
            name: ada2
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_ada3
            needle: true
            name: ada3
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_ada4
            needle: true
            name: ada4
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_ada5
            needle: true
            name: ada5
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas2_disks_da0
            needle: true
            name: da0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas2_disks_da1
            needle: true
            name: da1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas2_disks_da2
            needle: true
            name: da2
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas3_disks_da3
            needle: true
            name: da3
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
        columns: 4
      - type: custom:html-card
        title: " "
        content: " "
        card_mod:
          class: footer-left
  - type: vertical-stack
    cards:
      - type: custom:html-card
        title: TrueNAS3
        content: " "
        card_mod:
          class: header-right
      - square: false
        type: grid
        cards:
          - type: entities
            title: ""
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entities:
              - entity: update.truenas3_system_update
              - entity: sensor.truenas3_system_uptime
              - entity: binary_sensor.truenas3_system_boot_pool_healthy
              - entity: sensor.truenas3_system_boot_pool_free
          - type: entities
            title: ""
            card_mod:
              class: middle-right
            entities:
              - entity: binary_sensor.truenas3_system_raid3_1_healthy
              - entity: sensor.truenas3_system_raid3_1_free
              - entity: sensor.truenas3_datasets_raid3_1
        columns: 2
      - square: true
        type: horizontal-stack
        cards:
          - type: custom:mini-graph-card
            entities:
              - entity: sensor.truenas3_system_cpu_usage
            name: CPU Usage
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: custom:mini-graph-card
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            entities:
              - entity: sensor.truenas3_system_memory_usage
            name: Memory Usage
            card_mod:
              class: middle-blank
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
            lower_bound: 0
            name: Upload
            icon: mdi:upload-network
            entities:
              - entity: sensor.truenas3_system_lagg0_tx
          - type: custom:mini-graph-card
            card_mod:
              class: middle-right
            lower_bound: 0
            name: Download
            icon: mdi:download-network
            entities:
              - entity: sensor.truenas3_system_lagg0_rx
      - square: false
        type: grid
        cards:
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_system_temperature
            needle: true
            name: CPU
            min: 20
            max: 120
            severity:
              green: 0
              yellow: 50
              red: 75
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_ada0
            needle: true
            name: ada0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-right
            entity: sensor.truenas3_disks_ada1
            needle: true
            name: ada1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_ada2
            needle: true
            name: ada2
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_da0
            needle: true
            name: da0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_da1
            needle: true
            name: da1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-right
            entity: sensor.truenas3_disks_da2
            needle: true
            name: da2
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_da3
            needle: true
            name: da3
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas3_disks_da4
            needle: true
            name: da4
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas3_disks_da5
            needle: true
            name: da5
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas3_disks_da6
            needle: true
            name: da6
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-right
        columns: 4
      - type: custom:html-card
        title: " "
        content: " "
        card_mod:
          class: footer-right
  - type: vertical-stack
    cards:
      - type: custom:html-card
        title: TrueNAS4
        content: " "
        card_mod:
          class: header-left
      - square: false
        type: grid
        cards:
          - type: entities
            title: ""
            card_mod:
              class: middle-left
            entities:
              - entity: update.truenas4_system_update
              - entity: sensor.truenas4_system_uptime
              - entity: binary_sensor.truenas4_system_boot_pool_healthy
              - entity: sensor.truenas4_system_boot_pool_free
          - type: entities
            title: ""
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entities:
              - entity: binary_sensor.truenas4_system_raid4_1_healthy
              - entity: sensor.truenas4_system_raid4_1_free
              - entity: sensor.truenas4_datasets_raid4_1
        columns: 2
      - square: true
        type: horizontal-stack
        cards:
          - type: custom:mini-graph-card
            entities:
              - entity: sensor.truenas4_system_cpu_usage
            name: CPU Usage
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            card_mod:
              class: middle-left
          - type: custom:mini-graph-card
            decimals: 1
            upper_bound: 100
            lower_bound: 0
            entities:
              - entity: sensor.truenas4_system_memory_usage
            name: Memory Usage
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            lower_bound: 0
            name: Upload
            icon: mdi:upload-network
            entities:
              - entity: sensor.truenas4_system_lagg0_tx
          - type: custom:mini-graph-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            lower_bound: 0
            name: Download
            icon: mdi:download-network
            entities:
              - entity: sensor.truenas4_system_lagg0_rx
      - square: false
        type: grid
        cards:
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas4_system_temperature
            needle: true
            name: CPU
            min: 20
            max: 120
            severity:
              green: 0
              yellow: 50
              red: 75
          - type: custom:gap-card
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_ada0
            needle: true
            name: ada0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_ada1
            needle: true
            name: ada1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas4_disks_da0
            needle: true
            name: da0
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_da1
            needle: true
            name: da1
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_da2
            needle: true
            name: da2
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_da3
            needle: true
            name: da3
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            card_mod:
              class: middle-left
            entity: sensor.truenas4_disks_da4
            needle: true
            name: da4
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas4_disks_da5
            needle: true
            name: da5
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
          - type: gauge
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
            entity: sensor.truenas4_disks_da6
            needle: true
            name: da6
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
          - type: gauge
            entity: sensor.truenas4_disks_da2
            needle: true
            name: da7
            min: 20
            max: 80
            severity:
              green: 20
              yellow: 45
              red: 60
            card_mod:
              class: middle-blank
              style: |
                ha-card {
                  padding: 0px 21px 0px 21px !important;
                }
        columns: 4
      - type: custom:html-card
        title: " "
        content: " "
        card_mod:
          class: footer-left
1 Like

Did you have to create RAID free sensor?

No, it was one of the default sensors from the integration. I renamed it though.


Hi,

Same here with No response from host. Home Assistant is install on a TrueNAS VM.

I just installed the integration, which worked out swimmingly. All sensors appear to report correctly immediatly.

However, I would mainly want to utilize this to turn specific TrueNas Apps on or off. Using the development mode, trying to call the action truenas start app or stop app, and then targeting a entity of one of the running apps, it gives me an unknown error.

When looking into HA logs, I see these kind of errors. All the same, but obviously the name of the app is different. Would anyknow know what I am doing wrong or what might be causing this?

  • TrueNAS [IPadress] unable to fetch data “/chart/release/id/sons-of-the-forest-dedicated-server” (404)
  • TrueNAS [IPadress] unable to fetch data “/chart/release/id/bazarr” (404)
  • TrueNAS [IPadress] unable to fetch data “/chart/release/id/enshrouded-server” (404)