travisghansen / hass-opnsense

OPNsense integration with Home Assistant
194 stars 25 forks source link

bytes per sec data unavailable #86

Closed KillSwitchSIG closed 1 day ago

KillSwitchSIG commented 1 year ago

As per screenshot. Nothing much in the doc, is there something else I need to enable to get this data?

image

alexdelprete commented 1 year ago

The only thing I can think of is the API user permissions, double-check that, eventually give the user the admin role:

image

travisghansen commented 1 year ago

Anything per second comes entirely from the integration using in memory comparisons from the previous/current values and based on the interval. Usually those show up as unavailable when the integration first loads up but after the 2nd poll they should have data ever after.

KillSwitchSIG commented 1 year ago

I double-checked my "hass" user account on my OPNSense. The user is an admin, and also to be sure I gave it access to XMLPRC Library and System:Firmware I also tried to reload the integration in Home Assistant, but the entities still are "unavailable". I had this integration running for a few days already, and I see other information such as the LAN inbytes increasing....

Not sure what else could be the issue.

image

alexdelprete commented 1 year ago

Anything in HA logs that could help troubleshoot this?

KillSwitchSIG commented 1 year ago

Actually saw this in the logs:

2023-05-08 12:49:11.261 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners update_callback() File "/config/custom_components/opnsense/init.py", line 471, in process_entities entities = self.process_entities_callback(self.hass, self.config_entry) File "/config/custom_components/opnsense/switch.py", line 172, in process_entities_callback key="service.{}.{}".format(service["name"], property), KeyError: 'name'

alexdelprete commented 1 year ago

nothing related to opnsense integration?

did you already try removing and re-adding the integration?

Snuffy2 commented 1 day ago

Please give v0.2.0 a try and open a new issue if this is still happening.