ParadoxAlarmInterface / pai

Paradox Magellan, Spectra and EVO, with MQTT, Signal, Pushbullet, Pushover and others
https://gitter.im/paradox-alarm-interface
Eclipse Public License 2.0
358 stars 94 forks source link

Pushover notifications for "restore" events #504

Open lpaolini opened 2 months ago

lpaolini commented 2 months ago

Alarm system

EVO192 v.7.70.1

Environment

RPi/docker

Git branch

master

Questions

1) Why do I receive Pushover notifications for "trouble restore" events, with the following configuration? 2) Is there a way for lowering the priority (e.g. 0 instead of 2) for "restore" notifications?

PUSHOVER_EVENT_FILTERS = [
    'live,alarm,-restore',
    'trouble,-clock,-restore',
    'live,tamper,-restore',
    'live,arm',
    'live,disarm'
]
yozik04 commented 2 months ago
  1. Strange, should be filtered out.
  2. Not possible with the current implementation.
yozik04 commented 2 months ago

Give me an example of an event that comes through.

yozik04 commented 2 months ago

Or check yourself. If you have EVO then this is correct file: https://github.com/ParadoxAlarmInterface/pai/blob/dedc352b9babcac198821003bcbc6c79a99f57e0/paradox/hardware/evo/event.py#L509

Maybe tags are missing for your event.

yozik04 commented 2 months ago

Also if you want to study the subject in depth here are tests that describe possibilities pretty well: https://github.com/ParadoxAlarmInterface/pai/blob/dev/tests/lib/test_event_filter.py

lpaolini commented 2 months ago

Give me an example of an event that comes through.

There you go.

Screenshot_20240927-122334

yozik04 commented 2 months ago

Add "-zone_tamper_trouble=False". Should fix. And "-trouble=False", to discard "No trouble for ..."

'trouble,-clock,-restore,-zone_tamper_trouble=False,-trouble=False',

lpaolini commented 2 months ago

Thanks! I wish I could understand this syntax fully :-) I'll try digging into the code...

In any case, I think treating restore events as emergency notifications with mandatory acknowledgment is a bit too much. Perhaps priority 0 or even -1 would be more appropriate for this kind of events. Wouldn't it?

yozik04 commented 2 months ago

Not that simple. We have two things that emit events that end up sending notifications.

For Live events it is easy to filter out what you want as most of them have 'restore' tags set. Property changes are mostly booleans and there are no restore tags assigned to the property changes.

BTW: you probably can use: 'live,trouble,-clock'

This will send events only for Live events sent by the panel.

But I recommend you to fix the root cause of the trouble =) It is not a normal situation.

lpaolini commented 2 months ago

Thanks for the explanation!

Sure, I'll try to fix the root cause of the trouble. Not trivial though, as it seems to be caused by sun rays hitting one of the outdoor IR sensors at some time in the morning, and that seems to be interpreted as a masking attempt.