Breina / idrac_power_monitor

HomeAssistant integration to monitor the power of a server through its iDrac's Redfish API
17 stars 17 forks source link

Please add some extra features/info. #9

Closed pbvdven closed 5 months ago

pbvdven commented 5 months ago

Hi, @Breina

Thanks for this nice integration im using it a couple of months now and im really happy with it but i aso saw that someone made a fork of your project and added some extra options i tried that but had some issues refreshing the data and the development stopt its this one https://github.com/xmow49/idrac_server_monitor.

could you merge the extra options/info into your project that would be nice.

There is an issue with the one from xmow49 the integration stops refreshing the data after some time and after HA restart entities became unavailable ive u reconfigure the integration it started working again until it stops again.

Ive its not possible or to much work no problem thanks for looking at it. Ive i could do something to help just let me know.

image

Breina commented 5 months ago

Added in v1.2.0.

Not yet sure what makes the integration stop refreshing. Code seems correct. Will investigate long-term.

pbvdven commented 5 months ago

Thanks that is quick. but i have the same issue with V1.2.0 that i had with his version its not renewing values your version does.

image

Breina commented 5 months ago

This version added an 'interval' option, defining how often it ought to update. Its default is every 300 seconds. When upgrading version, this default is applied to your config. If you want to alter it, please remove the config entry and re-add it, then you will see the 'interval' option so you can set it to whatever you want. :)

pbvdven commented 5 months ago

okay yes i know but that also isn't working as good with his version but i didn't try it yet in your V1.2.0. i don't know how often your version refreshes the data if its push or pull? but yours worked better then how his version works for me your power measurements where more correct but all other things in his version are very nice.

Breina commented 5 months ago

My previous version had a default HA refresh rate of 60 seconds. If you enter that as your interval, you should get exactly the same behaviour with the current version.

xmow49 commented 5 months ago

Thanks for this update. I hadn't even noticed the problem with the update to HA 2024.2

I have a problem with the Power usage: there isn't any unit (W).

image

2024-02-12 21:33:11.034 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.poweredge_r730_power_usage (<class 'custom_components.idrac_power.sensor.IdracCurrentPowerSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('power') it is using; expected one of ['W', 'kW']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/Breina/idrac_power_monitor/issues

and like @pbvdven says; yes I don't have any refresh after the init.

Breina commented 5 months ago

@xmow49 Pretty sure I fixed it. Now it works with callbacks.

One thing to note is that I don't bother updating the entities when the value stays the same. So you may be seeing larger intervals occasionally, but every interval at least, a new value is retrieved.

xmow49 commented 5 months ago

@Breina Many Thanks; its working.