homeassistant-truenas
homeassistant-truenas copied to clipboard
More information in the System section and also update the api call
Proposed change
Type of change
- [*] Bugfix
- [*] New feature
- [ ] Code quality improvements to existing code or addition of tests
- [ ] Documentation
Additional information
Checklist
- [ ] The code change is tested and works locally.
- [ ] The code has been formatted using Black.
- [ ] Tests have been added to verify that the new code works.
- [ ] Documentation added/updated if required.
Testing this pull, very nice work. Not sure if this is due to testing other changes to this integration but this update has created a new device, which is called "System" instead of "TrueNAS System". Otherwise it fixes a couple of the sensors.
Also the polling interval might be too high. I turned it on at the red arrow in this pic.
On my weak system its taking up quite a few cpu cycles, getting all the data across.
EDIT: I reduced the update interval and its made a significant reduction on the cpu impact. Every 60s seems good enough for home assistant data needs. update_interval=timedelta(seconds=60),
Found another issue, its not parsing the disk identifiers correctly. Should be showing 2318BV401352
, but instead its using this in the entity_id field {serial_lunid}2318BV401352
or instead of 0xb2ba8014
it shows {serial}0xb2ba8014
Think its to do with this pull https://github.com/tomaae/homeassistant-truenas/pull/131
Adding sensors for each memory value like that just needlessly adds load to HA database. It should be all under Memory attributes like they were before. Swap can be there too. Changes you made made to API values, would actually break the integration. Which truenas version are you using?
Which truenas version are you using?
Thanks @tomaae for your reply. I am very new to the github and i only written code for my personal purpose.
I am happy that you reviewed it and appreciate your changes.
I am currently using the Beta version 24.04 and yesterday updated to RC1.
I am happy to see your updated repo.
Great work.
Which truenas version are you using?
Thanks @tomaae for your reply. I am very new to the github and i only written code for my personal purpose.
I am happy that you reviewed it and appreciate your changes.
I am currently using the Beta version 24.04 and yesterday updated to RC1.
I am happy to see your updated repo.
Great work.
Just one feature request if its possible.
- Button to Start/Stop the VM's
ah, I see. they are changing something again in new scale. will have to install it somewhere to see whats going on there.
you can start and stop VMs already, there is a service for it. You can create button from service if you need, just careful of missclick :)
Most of these is now implemented, except swap. I will leave this PR in draft for now, may want to add swap too.
Most of these is now implemented, except swap. I will leave this PR in draft for now, may want to add swap too. There are few things I wanted to highlight: I am running TrueNAS Version: Dragonfish-24.04-RC.1 We need to remove extra comma from the params to make it work:
if self._is_scale and self._version_major >= 23: tmp_params = { "graphs": [ {"name": "load"}, {"name": "cputemp"}, {"name": "cpu"}, {"name": "arcsize"}, {"name": "arcactualrate"}, {"name": "memory"} ], "reporting_query": { "start": "-90", "end": "-30", "aggregate": True } }
Rest everything seems to work perfectly
Can you please add a toggle for the VM to Start/Stop? This will help everyone to automate the VM from Home Assistant enhancing the functionality of your integration to multi-fold.
Most of these is now implemented, except swap. I will leave this PR in draft for now, may want to add swap too. There are few things I wanted to highlight: I am running TrueNAS Version: Dragonfish-24.04-RC.1 We need to remove extra comma from the params to make it work:
if self._is_scale and self._version_major >= 23: tmp_params = { "graphs": [ {"name": "load"}, {"name": "cputemp"}, {"name": "cpu"}, {"name": "arcsize"}, {"name": "arcactualrate"}, {"name": "memory"} ], "reporting_query": { "start": "-90", "end": "-30", "aggregate": True } }
Rest everything seems to work perfectly
what do you mean?
Can you please add a toggle for the VM to Start/Stop? This will help everyone to automate the VM from Home Assistant enhancing the functionality of your integration to multi-fold.
Like I said, that is already possible.
Glad to see you're back at it @tomaae