leiweibau / Pi.Alert

Scan the devices connected to your WIFI / LAN and alert you the connection of unknown devices. It also warns if a "always connected" device disconnects. In addition, it is possible to check web services for availability. For this purpose HTTP status codes and the response time of the service are evaluated.
https://leiweibau.net
GNU General Public License v3.0
334 stars 25 forks source link

[Feature Request] Send new device mails continuously #302

Open javifly opened 2 months ago

javifly commented 2 months ago

I have installed and configured pi.aler to notify me by email when there is a new computer in my network. It does it well but it only sends me a warning email. Could you make it send a warning email continuously (for example every 30 minutes) until that device is marked as not an unknown device?

javifly commented 2 months ago

I have tried to check all the options in the web view but I have not found anything similar to what I need. it is not possible to do it, is it?

leiweibau commented 2 months ago

No, it is not possible at the moment. I will think about this

javifly commented 2 months ago

ok, thank you. It is that in my case I need the mail to be insistent. Since the sending of mail is not a system of assured communications, that is to say that I can send an email to you but that it never arrives to you. There is no verification that the email arrives. That is why I need to be insistent, sending an email every hour, until someone corrects the situation.

hspindel commented 2 months ago

While I appreciate the OP's need, if this feature is added I'd suggest it be configurable (and probably default to OFF). I don't want a flood of emails per device fault, and since my email delivery is all local it is 100% robust.

leiweibau commented 2 months ago

I see 2 approaches here.

1) A certain interval after the detection of each new device. If there are several devices, the new warning comes at a different time for each device

2) All new devices are notified at a certain interval.

javifly commented 2 months ago

While I appreciate the OP's need, if this feature is added I'd suggest it be configurable (and probably default to OFF). I don't want a flood of emails per device fault, and since my email delivery is all local it is 100% robust.

There is nothing 100% robust, but I agree with you that it should be a configurable option for those who do not need to flood with email.

javifly commented 2 months ago

I see 2 approaches here.

  1. A certain interval after the detection of each new device. If there are several devices, the new warning comes at a different time for each device
  2. All new devices are notified at a certain interval.

I would do it with a global configuration of repeat warnings. For example it can be set to OFF by default, but set by hand by the user to 60 minutes or 90 minutes.

Let's imagine that it has been set to 60 minutes. In the next polling, if the equipment is still connected, the time condition set to 60 minutes will be checked. If 60 minutes have not yet passed since the previous warning, I do not warn, if 60 minutes have already passed since the previous warning, I warn again.

In such a way that each equipment has its own warnings separately without grouping the rest.