tomaae / homeassistant-truenas Goto Github PK
View Code? Open in Web Editor NEWTrueNAS integration for Home Assistant
License: Apache License 2.0
TrueNAS integration for Home Assistant
License: Apache License 2.0
Em0 RX and Em0 TX appears at 0, and does not change when the EM0 values are changing on the TrueNAS interface.
This is an old(er) system, installed during the FreeNAS days.
The boot pool is called freenas-boot what is most likely causing this issue.
This does work very well on a new(er) TrueNAS Scale system.
# zfs list | grep boot
freenas-boot 29.1G 28.5G 64K none
freenas-boot/.system 762M 28.5G 3.06M legacy
freenas-boot/.system/configs-bd646a760d754b2abf350a01716f52a4 128M 28.5G 128M legacy
freenas-boot/.system/cores 25K 1024M 25K legacy
freenas-boot/.system/rrd-bd646a760d754b2abf350a01716f52a4 618M 28.5G 618M legacy
freenas-boot/.system/samba4 1.50M 28.5G 120K legacy
freenas-boot/.system/services 28K 28.5G 28K legacy
freenas-boot/.system/syslog-bd646a760d754b2abf350a01716f52a4 11.1M 28.5G 11.1M legacy
freenas-boot/.system/webui 27K 28.5G 27K legacy
freenas-boot/ROOT 28.2G 28.5G 29K none
freenas-boot/ROOT/11.3-RELEASE 242K 28.5G 1.00G /
freenas-boot/ROOT/11.3-U1 250K 28.5G 1.00G /
freenas-boot/ROOT/11.3-U2 248K 28.5G 1.01G /
freenas-boot/ROOT/11.3-U3.1 272K 28.5G 1.01G /
freenas-boot/ROOT/11.3-U3.2 281K 28.5G 1.01G /
freenas-boot/ROOT/11.3-U4 287K 28.5G 1.01G /
freenas-boot/ROOT/11.3-U4.1 270K 28.5G 1.01G /
freenas-boot/ROOT/11.3-U5 286K 28.5G 1.02G /
freenas-boot/ROOT/12.0-U1 186K 28.5G 1.16G /
freenas-boot/ROOT/12.0-U1.1 216K 28.5G 1.16G /
freenas-boot/ROOT/12.0-U2 194K 28.5G 1.16G /
freenas-boot/ROOT/12.0-U2.1 193K 28.5G 1.16G /
freenas-boot/ROOT/12.0-U3.1 174K 28.5G 1.16G /
freenas-boot/ROOT/12.0-U4 170K 28.5G 1.18G /
freenas-boot/ROOT/12.0-U4.1 176K 28.5G 1.18G /
freenas-boot/ROOT/12.0-U5.1 174K 28.5G 1.18G /
freenas-boot/ROOT/12.0-U6 204K 28.5G 1.18G /
freenas-boot/ROOT/12.0-U6.1 206K 28.5G 1.18G /
freenas-boot/ROOT/12.0-U7 208K 28.5G 1.20G /
freenas-boot/ROOT/12.0-U8 234K 28.5G 1.20G /
freenas-boot/ROOT/12.0-U8.1 209K 28.5G 1.20G /
freenas-boot/ROOT/13.0-RELEASE 198K 28.5G 1.29G /
freenas-boot/ROOT/13.0-U1 202K 28.5G 1.29G /
freenas-boot/ROOT/13.0-U1.1 28.2G 28.5G 1.29G /
freenas-boot/ROOT/FreeNAS-12.0-RELEASE 180K 28.5G 1.07G /
freenas-boot/grub 6.85M 28.5G 6.85M legacy
When I add my two TrueNAS Scale instances to the homeassistant integration. The first integration of "AlphaNAS" creates AlphaNAS Disks, AlphaNAS Services, etc as Devices. When adding the second "BetaNAS" as another integration , it creates AlphaNAS Disks, AlphaNAS Services, AlphaNAS Disks, AlphaNAS Datasets, and BetaNAS System under the BetaNAS integration. When it should be BetaNAS Disks, etc. All but the System Devices seem to merge together between the two integrations and this is really annoying behaviour.
The two Devices should be seperate and not weirdly "merged" devices.
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2022.12. Please report issue to the custom integration author for truenas using this method at custom_components/truenas/init.py, line 34: hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)
I've been maintaining sdwilsh/hass-truenas, and maybe we should try to share efforts instead of doing two of the same things independently.
showing that a pool has 90,717.56 GB is harder to read than if it said it had 90.7TB
No
It would be great to have notifications (errors, task completion, etc). They could be informative and also be the basis for automations.
I've used a rest sensor for alerts but it often gives errors as the api returns empty json if there are none. I know that the api exposes notification dismissal too, but not sure how that would be implemented.
Hi folks, can be possible to have the total volume space sensor (or attribute), and and attribute on a disk sensor related to the pool that is member??
Add some new sensor or attribute of the total pool space and attribute on the disk sensor related to the pool
Hi,
I can see that integration does not deleting old datasets which are no more available in TrueNAS Below is a photo. Because it is not deleting it I have more than 1000 sensors
Juset go into TrueNAS Datasets section
It will be good that unavailable datasets will be deleted from the list
config_entry-truenas-bfa43443e83bcd003ff195e0d480d8c7.json.txt
Some disk drive temperature information is missing or 0.
Steps to reproduce the behavior:
I removed some drive from the pool and set it online again (not the temperature read fail one), but same pool. The Ada0 is not upgrading temperature.
I run my shell awk script to get de hdd temperature, and works well.
_#! /bin/sh
for i in $(sysctl -n kern.disks)
do
DevTemp=smartctl -a /dev/$i | awk '/Temperature_Celsius/{print $0}' | awk '{print $10 "C"}'
DevSerNum=smartctl -a /dev/$i | awk '/Serial Number:/{print $0}' | awk '{print $3}'
DevName=smartctl -a /dev/$i | awk '/Device Model:/{print $0}' | awk '{print $3}'
echo $i $DevTemp $DevSerNum $DevName
done_
With this result (right one):
root@Temido[~]# ./disktemps.sh
ada5 48C K42249R001653 Lexar
ada4 25C Z52B666K ST2000VN004-2E4164
ada3 33C ZFL37NA3 ST2000DM008-2FR102
ada2 27C WD-WCC4M3LGH3 WDC
ada1 27C Z52BBEF6 ST2000VN004-2E4164
ada0 25C 5YD1DRGT ST2000DL003-9VT166
A Truenas Integration Screenshoot appears as 0 (also in developer tools).
My home-built TrueNAS reports as a "To Be Filled by O.E.M". That's kind of annoying.
I'd like to be able to overwrite such silly strings with ... I dunno, some combination of the motherboard type, CPU type, enclosure, ... arbitrary text, really.
N/A
dmidecode
reports thusly:
System Information
Manufacturer: To Be Filled By O.E.M.
Product Name: To Be Filled By O.E.M.
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
UUID: f4c28570-b58b-0000-0000-000000000000
Wake-up Type: Power Switch
SKU Number: To Be Filled By O.E.M.
Family: To Be Filled By O.E.M.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: ASRock
Product Name: J4105-ITX
Version:
Serial Number: XXXXXXXXXXXXXXX
Asset Tag:
Features:
Board is a hosting board
Board is replaceable
Location In Chassis:
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
Manufacturer: To Be Filled By O.E.M.
Type: Desktop
Lock: Not Present
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
SKU Number: To Be Filled By O.E.M.
Failed to set up intergration
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/truenas/truenas_controller.py:231
Integration: TrueNAS (documentation, issues)
First occurred: 8:55:59 PM (2 occurrences)
Last logged: 8:56:20 PM
Error setting up entry TrueNAS for truenas
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
await controller.async_update()
File "/config/custom_components/truenas/truenas_controller.py", line 115, in async_update
await self.hass.async_add_executor_job(self.get_systemstats)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/truenas/truenas_controller.py", line 231, in get_systemstats
max(tmp_graph[i]["aggregations"]["mean"]), 1
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'
I have had it working but moved my truenas to a vm and the intergration failed, so i tried to do the intergration again
此错误来自自定义集成。
Logger: custom_components.truenas.config_flow
Source: custom_components/truenas/config_flow.py:76
Integration: truenas (documentation, issues)
First occurred: 22:18:38 (1 occurrences)
Last logged: 22:18:38
TrueNAS connection error (no_response)
It is not possible to ping truenas in Home Assistant
Seems that the intergration isn't able to get data from Truenas. Have made multiple attempts with multiple API keys and doesn't seem to fetch the data from the application
Version
core-2022.3.7
supervisor-2022.03.5
TrueNAS v1.0.1
TrueNAS (IP) unable to fetch data (500)
TrueNAS (IP) unable to fetch data (401)
TrueNAS (IP) unable to fetch data (no_respose)
TrueNAS (IP) unable to fetch data (no_respose)
TrueNAS (IP) unable to fetch data (no_respose)
Describe the issue
Plugin fails to start with message: Failed to set up
How to reproduce the issue
Install like normal. Additional context may provide more insights.
Software versions
Home Assistant: 2022.12.3
TrueNAS integration version: v1.2.3
TrueNAS version: TrueNAS-SCALE-22.02.4
Diagnostics data
N/A
Traceback/Error logs
Logger: homeassistant.config_entries
Source: custom_components/truenas/truenas_controller.py:388
Integration: TrueNAS (documentation, issues)
First occurred: 10:49:57 AM (1 occurrences)
Last logged: 10:49:57 AM
Error setting up entry NAS for truenas
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
await controller.async_update()
File "/config/custom_components/truenas/truenas_controller.py", line 124, in async_update
await self.hass.async_add_executor_job(self.get_systemstats)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/truenas/truenas_controller.py", line 388, in get_systemstats
max(list(filter(None, tmp_graph[i]["aggregations"]["mean"]))), 1
ValueError: max() arg is an empty sequence
Additional context
I am running an AMD Ryzen 5 5600G with Radeon Graphics on my system. The Linux Kernel that Scale is using doesn't have support for temperature https://bit.ly/3PnmYzA I am wondering if the "get_systemstats" in the log is corresponding with this missing temperature? Is there a way to ignore this missing stat if it is indeed the issue?
boot-pool is unavailable on TrueNAS Scale
boot-pool entities should be available similar to other ZFS pools
This problem existed before the upgrade to 2022.12.0 aka Bluefin. The boot-pool entities were working when using TrueNAS Core, but I have also removed and re-added the integration since migrating from core to scale.
Add a sensor for memory usage %, cached memory usage, and ZFS cache
Single memory usage sensory with cached and ZFS cache as attributes
In the Home Assistant integration, the devices are duplicate.
One with Firmware: TrueNAS-13.0-RELEASE
Another with Firmware: TrueNAS-13.0-U1.1
Go to Prameters > Devices > TrueNAS
Only get one device per category. The one from the current version on the TrueNAS installation.
Hello! Sorry if this isn't best way to do this. I have a poweredge server that I run SCALE on directly, and I manually set fan speeds based on situations to control noise thresholds. This is done via an ipmitool shell command. Is it possible to use this integration to send a command for the machine run in its shell? The webui for SCALE doesn't seem to like mobile devices in the CLI. If not, no big. Just thought I'd ask!
I am using a HASS button to call the truenas shutdown entity. But when the server is turned back on the integration does not reconnect to the API and the button no longer works unless I reload the integration.
Steps to reproduce the behavior:
I expect the truenas API to reconnect with HASS
Hey, just setup TrueNAS and saw your Integration via HACS in HomeAssistant.
But my HA cannot read the datasheet usage.
for my current test setup i have "pool1" with datasheets (pics, vids,music,...) HomeAssistant Sensor for the Pool is correct and showing in Homeassistant. when i delete oder copy files it shows up, but not for the Subfolders. (sensor.truenas_datasets_home_nas_backups)
Any Idea?
sry for my bad english, it is not my native language
Enable use of another port then ssl 443 when connecting to truenas
I have 3 pools at my TrueNAS. All of those appears OK at TrueNAS gui.
The healthy sensor of one of these pools appears as OFF.
Any known issue?
The TrueNAS integration should add switches to the home asisstant to stop / reboot the system and maybe also to start stop VMs, Serives and the like.
Alternatively it would be possible to use IMPI tools (for server hardware) to stop (even start) the server.
Also it could be possible to use the TrueNAS restful API to trigger these actions - the API documentation is a bit fuzzy though.
This all is in remote management of all server from a central plattform, using HA as prosumer management tool.
Starting the server would also be cool, maybe using something trivial like WakeOnLan (even if I would prefer IPMI, but there is also not HA integration for IPMI :/ ---but I made a request).
First of all I'm really happy that someone finally created a TrueNAS integration to Home Assistant. I'm using FreeNAS and then Truenas for almost 4 years already and I always missed an integration for it and then, it finally had..
So the issue is that I realized that, regular as clockwork every 60 seconds the CPU usage spikes (see picture below) quite a lot, additionally to it's normal usage.
Of course I googled, and tried everything to make it stop, deleted snapshots etc. I tried to systematically stop every plugin, jail but nothing stopped it. I later noticed that during HA restart it behaves differently and after restarting HA the 60 sec intervals shift.
So I tried to disable the integrations which have any relation to my NAS and I noticed that when I disable the TrueNAS integration these spikes stop appearing again.
Later of course I tried again, enabling it and then disabling it and when its enabled, the minutely spikes are appearing and when it's diasbled, there are no more spikes.
I'm not really sure why this is happening but I'm sure that I don't want an information gathering integration to spike my NAS to a 16% CPU usage every minute when it's idling CPU usage is around 5%, which also affects power consumtion. Since I disabled the integration the power consumption decreased by about 2-3W which is a very low consumption but it's significant enough compared to it's idling consumption.
If this is an adverse effect to the integration then I must learn how to live without it but if it's a bug and can be fixed I would be more happy to use it again. Maybe it's only affects me like this, I don't know.
Would like to see the times represented as HH:MM, something like output of zpool status
scan: scrub in progress since Wed Apr 20 01:11:03 2022
22.7T scanned at 640M/s, 21.9T issued at 617M/s, 28.1T total
0B repaired, 77.75% done, 02:57:25 to go
n/a
n/a
Need a way to get list of disks in a pool
a new attribute for pool status listing the disks
I have multiple pools with different disk types and I am trying to monitor disk temperature per pool
Using debug logging I get this error when attempting to connect the integration for the first time:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/truenas/truenas_controller.py:231
Integration: TrueNAS (documentation, issues)
First occurred: 9:44:57 AM (2 occurrences)
Last logged: 10:13:00 AM
Error setting up entry TrueNAS for truenas
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
await controller.async_update()
File "/config/custom_components/truenas/truenas_controller.py", line 115, in async_update
await self.hass.async_add_executor_job(self.get_systemstats)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/truenas/truenas_controller.py", line 231, in get_systemstats
max(tmp_graph[i]["aggregations"]["mean"]), 1
TypeError: '>' not supported between instances of 'NoneType' and 'float'
Plugin fails to start with message: Failed to set up
- Home Assistant version:
Home Assistant: 2022.11.2
Supervisor: 2022.10.2
Operating System: 9.3
Frontend: 20221108.0 - latest
N/A
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/truenas/truenas_controller.py:388
Integration: TrueNAS (documentation, issues)
First occurred: 11:45:49 AM (1 occurrences)
Last logged: 11:45:49 AM
Error setting up entry TrueNAS for truenas
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
await controller.async_update()
File "/config/custom_components/truenas/truenas_controller.py", line 124, in async_update
await self.hass.async_add_executor_job(self.get_systemstats)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/truenas/truenas_controller.py", line 388, in get_systemstats
max(list(filter(None, tmp_graph[i]["aggregations"]["mean"]))), 1
ValueError: max() arg is an empty sequence
Looks like this is another case of not sanitizing input values before performing operations on them.
Thanks for this integration! I'm running my TrueNAS on a HP server, so have been using the messier iLO integration. This looks very promising!
I followed the steps to install the integration through HACS. Include the name, ip address and API. After successfully taking the information, the TrueNAS integration says "Failed to set up. Check the logs." When I check the logs, I get:
2022-08-10 08:20:01.467 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration truenas which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-10 08:20:18.554 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry TrueNAS for truenas
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
File "/config/custom_components/truenas/truenas_controller.py", line 116, in async_update
File "/config/custom_components/truenas/truenas_controller.py", line 273, in get_systemstats
-Home Assistant 2022.8.3
Shout if you have any other questions.
Tx,
Jean
ok, I will only use another branch based on author's advice.
strange I have 2 TrueNAS Scale servers on different Proxmox servers. 1 is reporting correctly in HA and one I'm still getting a 500.
2022-04-11 11:24:07 DEBUG (SyncWorker_5) [custom_components.truenas.truenas_api] TrueNAS 192.168.1.101 query: system/info, get, {}
2022-04-11 11:24:07 DEBUG (SyncWorker_5) [custom_components.truenas.truenas_api] TrueNAS 192.168.1.101 query response: {'version': 'TrueNAS-SCALE-22.02.0.1', 'buildtime': {'$date': 1647930354000}, 'hostname': 'PCC-NAS2.localhost', 'physmem': 12552777728, 'model': 'AMD Phenom(tm) 9550 Quad-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [0.04, 0.1, 0.04], 'uptime': '2:44:00.515940', 'uptime_seconds': 9840.515940204, 'system_serial': 'Not Specified', 'system_product': 'Standard PC (i440FX + PIIX, 1996)', 'system_product_version': 'pc-i440fx-6.1', 'license': None, 'boottime': {'$date': 1649680807088}, 'datetime': {'$date': 1649690647604}, 'birthday': None, 'timezone': 'America/Toronto', 'system_manufacturer': 'QEMU', 'ecc_memory': True}
2022-04-11 11:24:07 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing source [{'version': 'TrueNAS-SCALE-22.02.0.1', 'buildtime': {'$date': 1647930354000}, 'hostname': 'PCC-NAS2.localhost', 'physmem': 12552777728, 'model': 'AMD Phenom(tm) 9550 Quad-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [0.04, 0.1, 0.04], 'uptime': '2:44:00.515940', 'uptime_seconds': 9840.515940204, 'system_serial': '**REDACTED**', 'system_product': 'Standard PC (i440FX + PIIX, 1996)', 'system_product_version': 'pc-i440fx-6.1', 'license': None, 'boottime': {'$date': 1649680807088}, 'datetime': {'$date': 1649690647604}, 'birthday': None, 'timezone': 'America/Toronto', 'system_manufacturer': 'QEMU', 'ecc_memory': True}]
2022-04-11 11:24:07 DEBUG (SyncWorker_5) [custom_components.truenas.apiparser] Processing entry {'version': 'TrueNAS-SCALE-22.02.0.1', 'buildtime': {'$date': 1647930354000}, 'hostname': 'PCC-NAS2.localhost', 'physmem': 12552777728, 'model': 'AMD Phenom(tm) 9550 Quad-Core Processor', 'cores': 4, 'physical_cores': 4, 'loadavg': [0.04, 0.1, 0.04], 'uptime': '2:44:00.515940', 'uptime_seconds': 9840.515940204, 'system_serial': '**REDACTED**', 'system_product': 'Standard PC (i440FX + PIIX, 1996)', 'system_product_version': 'pc-i440fx-6.1', 'license': None, 'boottime': {'$date': 1649680807088}, 'datetime': {'$date': 1649690647604}, 'birthday': None, 'timezone': 'America/Toronto', 'system_manufacturer': 'QEMU', 'ecc_memory': True}
2022-04-11 11:24:08 DEBUG (SyncWorker_6) [custom_components.truenas.truenas_api] TrueNAS 192.168.1.101 query: reporting/get_data, post, {'graphs': [{'name': 'load'}, {'name': 'cpu'}, {'name': 'arcsize'}, {'name': 'arcratio'}], 'reporting_query': {'start': 'now-90s', 'end': 'now-30s', 'aggregate': True}}
2022-04-11 11:24:08 WARNING (SyncWorker_6) [custom_components.truenas.truenas_api] TrueNAS 192.168.1.101 unable to fetch data (500)
Originally posted by @pcampan in #9 (comment)
I noticed that the polling for TrueNas entity data doesn't occur very frequent.
If I manually reload the integration or restart HA, the TrueNas value updates.
Question.
Please add the spanish translation to the project
Please create the Brazilian Portuguese translation project!
I run OpenVPN from within my Jail running transmission. Is there anyway I can get external ip address that the jail is reporting
example result for the command wget http://ipinfo.io/IP -q0 -
Thanks
Thanks for great work! I have more then 50 entities from truenas datasets. Is it possible to get just main datasets (pools)?
Ability to start or stop an application in trueNAS scale via homeassistant automations
the list of apps to be shown as entities. and ability to start or stop it
looks like there is a abilaity to start and top Jails (in truenas core) but I would like to be able to do this with truenas scale. THANKYOU!
When I (re)Install the TrueNAS integration then I see the datasets and the Pools. Not even 1 minute later the datsets and pools don't show anymore
Steps to reproduce the behavior:
I expected that the datasets should remain, same for the Pools.
Uploaded
All fields in this sections are required.
Nothing in errorlogs
Reinstalled HACS, jail, HA, Integration. Same problem again and again
I have installed this extension and many entities and stats are made available to home-assistant. Nice work, many thanks for this. I'm keen to use the shutdown service, as part of a UPS style of automation, and when I create a button in HA to call a service, it wants an entity-id, however I'm not quite sure which of the many this should be directed at. I would appreciate a pointer. Many thanks
When adding the integration, the only device found is System.
Also, around once per minute, all the entities in System are going unavailable and then they come back with a value of 0. They never get a valid value.
Install the integration version 1.2.1 or 1.2.3
Go and check the device and the entities in the integration page.
Get all the devices (Disks, Datasets, ...).
The entities would not become unavailable and they would update their values.
config_entry-truenas-aa21eccbe3d0182fdcbc5938b51657d8.json.txt
Cette erreur provient d'une intégration personnalisée
Logger: custom_components.truenas.truenas_api
Source: custom_components/truenas/truenas_api.py:99
Integration: TrueNAS (documentation, issues)
First occurred: 15:54:59 (60 occurrences)
Last logged: 16:26:05
TrueNAS 192.168.1.5 unable to fetch data "update/check_available" (504)
Tested also with 1.1.1 and 1.2 and everything is fine.
Plugin returns error message in logs, all entities in HA report as Unavailable.
However, when viewing the entity, the plugin does correctly get the motherboard and TrueNAS version
Entities should have some information populated.
This error originated from a custom integration.
Logger: custom_components.truenas.truenas_api
Source: custom_components/truenas/truenas_api.py:98
Integration: TrueNAS (documentation, issues)
First occurred: 10:02:20 AM (5 occurrences)
Last logged: 10:06:20 AMTrueNAS 192.168.0.10 unable to fetch data (500)
Nothing corresponding in the TrueNAS messages log file
I'm running HAOS in a virtual machine, on the TrueNAS box I'm trying to collect stats from.
After update HA 2022.4.4 to 2022.4.5,error logged and component can't load.
log as:
Error setting up entry TrueNAS for truenas
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
await controller.async_update()
File "/config/custom_components/truenas/truenas_controller.py", line 115, in async_update
await self.hass.async_add_executor_job(self.get_systemstats)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/truenas/truenas_controller.py", line 231, in get_systemstats
max(tmp_graph[i]["aggregations"]["mean"]), 1
TypeError: '>' not supported between instances of 'NoneType' and 'float'
Hi friends!
I use trueNas since it was named freenas. I build my own interface based on SNMP to keep it clear at my HA. Yours is Great!!
Mine just report some basic information, but please check it out cause its different and gives additional information, and can be useful for more friends like us.
Thank you all for your job! I add today your integration at my HA, and will keep both methods working for some time.
My interface gives me some valid information, than yours still does not do. I list it here to give you some Ideas!
platform: snmp
name: 'Temido Eth In'
host: !secret temido_ip
baseoid: 1.3.6.1.2.1.31.1.1.1.6.1
#baseoid: 1.3.6.1.2.1.2.2.1.10.1
community: !secret snmpcom
version: '2c'
platform: snmp
name: 'Temido Eth Out'
host: !secret temido_ip
baseoid: 1.3.6.1.2.1.31.1.1.1.10.1
community: !secret snmpcom
version: '2c'
platform: derivative
name: 'Temido Eth In Stats'
source: sensor.temido_eth_in
unit_time: s
unit: B
platform: derivative
name: 'Temido Eth Out Stats'
source: sensor.temido_eth_out
unit_time: s
unit: B
platform: template
sensors:
temido_eth_in_mbps:
value_template: "{{ [((states('sensor.temido_eth_in_stats')|float(none))/1000000)|round(2, default=none),0]|max }}"
unit_of_measurement: 'MBps'
temido_eth_out_mbps:
value_template: "{{ [((states('sensor.temido_eth_out_stats')|float(none))/1000000)|round(2, default=none),0]|max }}"
unit_of_measurement: 'MBps'_
I let you here some screenshoots!
Best regards, and thank you all!
I am using TrueNAS 12.0.U1.1 and Home Assistant 2022.4.7
I could intall the integration via HACS, but when I try to connect to the TrueNas host I just get "No response from host". Is this a bug or maybe something missing in the installation description?
Go to setup integration - Put in all relevent details and then it says no response from host
All details are triple checked to be correct
Unable to get the integration to my TrueNAS Scale to work.
Added the integration but error:
2022-05-22 10:45:13 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry truenas for truenas
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
File "/config/custom_components/truenas/truenas_controller.py", line 115, in async_update
File "/config/custom_components/truenas/truenas_controller.py", line 231, in get_systemstats
Add Integrations
Fill in details:
Name = truenas
Host = 192.168.10.15 and also tried with name
API key = generated from my truenas system
Tried all combinations of 'Use SSL' and 'Verify SSL Certificates'
Integration installs without error
N/A
2022-05-22 10:45:11 INFO (MainThread) [homeassistant.setup] Setting up truenas
2022-05-22 10:45:11 INFO (MainThread) [homeassistant.setup] Setup of domain truenas took 0.0 seconds
This seems to indicate that the initial connection and reading is fine.
But then getting the systemstats seems to fail:
2022-05-22 10:45:13 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry truenas for truenas
File "/config/custom_components/truenas/init.py", line 29, in async_setup_entry
File "/config/custom_components/truenas/truenas_controller.py", line 115, in async_update
File "/config/custom_components/truenas/truenas_controller.py", line 231, in get_systemstats
All temperatures showing the Celsius value but with Fahrenheit unit of measure. Ie. If a disk is 40 C, it shows as 40 F. If I manually edit the sensor to show in Celsius, it converts 40 as if it were fahrenheit.
The value of the sensor is correct but the unit of measure is wrong (should be Celsius, not fahrenheit)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.