#NUT Add-on/Integration

1 messages · Page 1 of 1 (latest)

green adder
#

Is there a way to make the NUT Add-on & Integration poll faster than once every 10 seconds?

There used to be polling frequency options you could change which have since been removed, but it always defaulted back to 10s regardless of what it was set to. In the event of a very brief power glitch, 10s is an insufficient polling frequency and catches absolutely nothing if the power glitch lasts for 5 seconds.

Any decent UPS software polling a locally connected UPS will notify you immediately of a power issue, and I never quite understood the logic behind the NUT Add-on/Integration being restricted so much.

I have messages in the log of the Add-on about my UPS coming off bypass before going back onto it (Riello Online UPS with Line-interactive & Smart modes, but Online mode is noisy as the fans run all the time to keep the inverter cool), but I have absolutely no idea when this was because it did not make it into the integration, as it is likely it all happened within 10 seconds.

outer tapir
green adder
#

I was using the one from the standard Add-on store as I don't believe HACS provides Add-ons.

But I will look into using that notification setup, as it seems like it will be triggered by the netserver itself based on the Data the UPS is sending it.

#

Right now my Notification alert is:

alias: Home UPS Notifications
description: Home UPS Notifications
triggers:
  - trigger: state
    entity_id:
      - sensor.myups_status
    to: Online Battery Charging
    id: online_battery_charging
  - entity_id:
      - sensor.myups_status
    to: On Battery Battery Discharging
    id: on_battery_discharging
    trigger: state
  - trigger: state
    entity_id:
      - sensor.myups_status
    to: Online Battery Discharging
    id: online_battery_discharging
  - trigger: state
    entity_id:
      - sensor.myups_status
    to: Online
    id: online```
#

But this was only for my Cyberpower UPS as it seems I hadn't gotten around to setting up alerts for my new UPS 🤦

green adder
#

Actually I just realised it was because of the <> 🤦

outer tapir
#

There are examples in the documentation I linked for the Events, not the sensor which will be impacted by the polling rate

green adder
#

Yes I was following the automation example there, but it needs some tweaking because automations: doesn't appear in a new automation

#

I removed it and needed to then manually fix the indentation because I'm on mobile.

#

I am wondering whether you can just use the standard "notify" that the GUI would normally create and keep the same message

outer tapir
#

It's an example, I wouldn't follow it to the letter as it may be outdated anyway, it's just highlighting you can perform actions based on the Events fired

green adder
#

For example I have something like this for an important notification that works outside of DND:

actions:
  - device_id: 
    domain: mobile_app
    type: notify
    message:
    title: 
    data:
      channel: Alarm
      importance: high```
green adder
#

I manually changed the ups from Smart mode to Online Mode, eventually the Status Data on the Integration changed but the Automation from nut.ups_event didn't fire.

outer tapir
#

So look at the Events in Home Assistant to see what was recieved

#

Developer Tools/Events

#

Also validate that the Addon log showed a change

green adder
#

I manually triggered a power failure cut and that works, likewise it goes back to line power. I manually changed it from Smart mode to On-line mode and nothing was triggered, probably because it stayed online.

outer tapir
#

Yeah, yank the power cable 🙂

#

It's likely that only certain level of events are fired, glad you got it working

green adder
#

I just wish you could customise the UPS Name for the notification

outer tapir
#

What do you mean by name? which part?

#

The 'Riello" piece there is likely the name you gave it in the NUT Addon Config, the localhost piece will be because the UPS is local to the addon. But you could customise your message however you wanted.