DSC Binding sending unwanted events

Hi,

I have a DSC PC1864 alarm with Envisalink and rules like below to signal ArmMode changes

rule "Alarm modes"
	when
		Item DSCPartitionArmMode received update
	then
	
	if (DSCPartitionArmMode.state == 0) {
        sendPushoverMessage(pushoverBuilder("Alarm OFF"))
	}
	else if (DSCPartitionArmMode.state == 1) {
        sendPushoverMessage(pushoverBuilder("Alarm Armed AWAY"))
	}
	else if (DSCPartitionArmMode.state == 2) {
         sendPushoverMessage(pushoverBuilder("Alarm Armed STAY"))
	}
end 

It is normally working fine but I have noticed two scenarios when the ArmMode is triggering every 4 min:

  1. If a wireless sensor has low battery and the panel shows a warning
  2. If an alarm didn’t get confirmed (trying 3 times) it also trigger a warning in the panel

I think I could keep the pevious state and compare if it is a real ArmMode change or not.

Getting logs like:

2019-10-23 23:01:42.223 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:01:42.246 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:05:52.256 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:05:52.282 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:10:02.278 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:10:02.301 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:14:12.307 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:14:12.331 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:18:22.332 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:18:22.360 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:22:32.366 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1
2019-10-23 23:22:32.392 [INFO ] [e.smarthome.model.script.alarm.rules] - Partition Armed AWAY 
2019-10-23 23:26:42.396 [INFO ] [e.smarthome.model.script.alarm.rules] - DSCPartitionArmMode.state = 1

Is it a bug or am I doing things wrong?

It’s not unreasonable for any device/binding to issue updates to the same state.

Have you considered using a ‘changed’ trigger for you rule?

1 Like

Thanks, will check it out