homeassistant-truenas: [Bug] Integration fails with Electric Eel - chart error
Describe the issue
Using the beta version of TrueNAS-SCALE, the API for ‘chart/release’ fails with:
TrueNAS 192.168.10.11 unable to fetch data "chart/release" (404)
This persists through reboots of both systems - it appears to be related to an API change in Electric Eel, likely relating to the changes to how containers are handled.
Generating a new API key also has the same error, which suggests it’s not credential validation causing it, but likely an endpoint has changed. Looking further into the repo and the API itself, it is to do with the app releases section specifically. Bypassing that gets the normal data loading properly, just minus the container/app information. (changing line 1123 in coordinator.py to remove the ‘not’ part allows for regular data to resume flow).
How to reproduce the issue
Steps to reproduce the behavior:
- Upgrade to ‘Electric Eel’ (beta)
- Restart HAss
- See error (unavailable entities)
Alternately: Attempt to re-add to HAss, and get the specific error.
Expected behavior
TrueNAS information shows up in HA.
Screenshots
Software versions
- Home Assistant version:
- TrueNAS integration version:
- TrueNAS version:
Diagnostics data
Traceback/Error logs
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 26 (5 by maintainers)
if you already update to 24.10, you can make it works by editing few lines like i did. in
custom_components/truenas/coordinator.py, if you already edit line 1123 before, revert it back toand edit line 1128 and so on to:
and for fixing the attibutes: in
custom_components/truenas/binary_sensor_types.pyline 78-79don’t forget to restart homeassistant
i think there is 2 ways this can go about, either:
The integration keep supporting both the new and old versions of truenas (pre and post electric eel)
The integration is migrated/updated to only support post electric eel, and we bump the major version and leave the old version to go. They seem to be moving away from the REST API, and fully migrating their TrueNAS API Client
Personally i feel its best to go with the latter option, as its going to hinder development/improvements, but then again, it comes down to how @tomaae wants to approach it
You need to alter the ‘coordinator.py’ file in the custom components folder. If you installed using HACS, the file is located in
custom_components/truenas/coordinator.py.Line 1123 normally reads:
if not self._is_scale:If you remove the “not” part, it should read:
if self._is_scale:Then restart HA to load the modified version. It’s not a fix, but it gets most stats back online until a proper fix is available (which I expect will require more changes from TrueNAS to finish the apps API on the new version).
released in 1.3
PR submitted with some improvement to retain compatibility with previous TrueNAS version #180
Can you suggest this for a pull request?
Electric Eel now final, if you can @tomaae please make it compatible 👍 .
issue still exists in RC2
I think i have found solution for this problems. I was trying to make a pull request but it was a mess so i delete it (i’m still newbie 😅). You can check all changes i made to make it works in my forked repo itsniawan/homeassistant-truenas
No surprise there, since they are moving from k3s to docker. API documentation is not available right now, so probably after release we can get it updated to work with EE. You will probably make it work by hashing out apps related updates in main coordinator thread.