Skip to content

Feature Request - Add a Sleep condition/setting #1519

@mmstano

Description

@mmstano

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Is your feature request related to a problem? Please describe

This feature request is for fine tuning devices that go into deep sleep. Currently, netalertx behavior allows setting a down condition with a time setting before the device is reported down in a notification. While this works good, it's not visually pleasing to see devices appear as down before the next scan or two happen to report the device as online. This is especially prevalent for battery powered devices, even more especially when the battery starts getting lower in charge. Some devices can deep sleep upwards to 20 minutes.

Describe the solution you'd like

I would like to propose another condition that will work similar to "down", but called "sleeping". It should have it's own time setting, but can work hand-in-hand with the down condition/setting. When the sleep condition is checked (selected) for a device, instead of appearing as "offline" or "down", it will appear as "sleeping". Should the device retain this sleeping condition past it's time setting, only then should it be reported as "offline" or "down" if the down condition is selected. If the down condition is selected in conjunction with the sleep condition, once the sleep time has past, the device becomes subject to the down time setting before it's reported as down in a notification.

Describe alternatives you've considered

I'm using OpenWrt with LUCIRCP and ARP for reporting. I've tried unselecting the "only reachable" option for LUCIRCP, but unfortunately, OpenWrt's neighbor tables can be janky and have devices appear as online on the network, even though the device is no longer connected. The only way to have the device be correctly reported in these situations is to restart the network interface in OpenWrt or, in some cases, restart the router. Having "only reachable" selected appears to be the better option, as devices are reported on the up-and-up, but deep sleep devices can be annoying. I've tried setting cron jobs in OpenWrt to refresh the neighbor tables, but I haven't been able to get it to work.

Anything else?

I use NetAlertX App in Home Assistant and I have minimal experience with Docker. I'm willing to run a docker container on my PC to test the feature.

Am I willing to test this? 🧪

  • I will do my best to test this feature on the netlertx-dev image when requested within 48h and report bugs to help deliver a great user experience for everyone and not to break existing installations.

Can I help implement this? 👩‍💻👨‍💻

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature request ➕New feature or requestWaiting for reply⏳Waiting for the original poster to respond, or discussion in progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions