Page 1 of 1

Python error when Alarming

PostPosted: Sat Mar 23, 2019 12:16 pm
by dstrickler
I've been using DSC for a long time, and it's been working great. Around the fall of 2018 (I may be wrong), I started having trouble having the plugin connect to my Envisalink 2DS. I found after a lot of fiddling around that it didn't like that I was pinging the interface to check if it was alive. But even when I stopped doing that, the plugin still had issues.

I'm running
OSX 10.7.5
The alarm is on a private 10.0.1.x subnet
Indigo 7.2
DSC Plugin v2.2

Now the plugin loads and connects, and all the sensors work (motion, doors), but I can't arm/disarm the alarm. The error it gives is:
Code: Select all
   DSC Alarm Error                 Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 346, in methodArmStay
AttributeError: 'NoneType' object has no attribute 'pluginProps'


Clearly an error from Python, but I don't know what's happening without doing a deep-dive on the code.

Does anyone have a clue for me?

Thanks,

Dave

Re: Python error when Alarming

PostPosted: Sat Mar 23, 2019 1:12 pm
by Monstergerm
This line of code requests the partition name of the partition you want to arm. It sounds like something got wonky there. Can you check that you are arming a partition that does exist and that the partition has a name (under DSC Alarm Keypad device).

Re: Python error when Alarming

PostPosted: Tue Mar 26, 2019 3:34 pm
by dstrickler
Thanks for the help!

The partition number is "1" and the name is "default". I'm pretty sure that's what it was set up to be, but it was set up years ago, and I can't be sure. Would it be possible that partition "1" doesn't exist anymore? That sounds impossible, but I don't know DSC alarm well enough to know if it's possible.

Re: Python error when Alarming

PostPosted: Tue Mar 26, 2019 5:59 pm
by Monstergerm
DSC alarm always has at least one partition, if nothing else is specified it should be "1".
"Default" indicates that you never named your partition. Why don't you try to name it something different. And then if it still not works restart plugin.

Re: Python error when Alarming

PostPosted: Tue Mar 26, 2019 6:16 pm
by dstrickler
That worked! Amazing! Thank you!

Re: Python error when Alarming

PostPosted: Sun Feb 16, 2020 12:12 am
by jltnol
So I have a very limited experience with Python, but have a case where I'd like to arm the EnvisaLink 4 in Away Mode via Python.

Is this easy to do ?

Re: Python error when Alarming

PostPosted: Sun Feb 16, 2020 9:33 am
by dstrickler
I'd highly recommend taking a look at this plugin. It really works well with Indigo.

Re: Python error when Alarming

PostPosted: Sun Feb 16, 2020 9:40 pm
by jltnol
Hey Dave

I've actually been using the plugin for almost 3 years now, and it works great. I couldn't be happier.
I'm faced with an issue where it would be more convenient to arm the system with a Python Script... and I'm not even sure that is possible, but that's what I'm looking for help with.

Re: Python error when Alarming

PostPosted: Sun Feb 16, 2020 11:31 pm
by howartp
I’m trying to think if you can execute an action from python yet

If so, create an action to set alarm, then call it in python.

Otherwise you could do it by having a variable and trigger - use python to dirty the variable which will in turn fire the trigger.


Sent from my iPhone using Tapatalk Pro

Re: Python error when Alarming

PostPosted: Mon Feb 17, 2020 10:36 am
by jay (support)
You can execute an action group from a Python script, so assuming that you don't need dynamic information to pass to the action that's the easiest way. The other alternative is to look in the DSC UI fields (in Actions.xml in the plugin code) for that action to determine what information you need to pass to the action at runtime then execute the action directly (I don't believe the DSC plugin docs document that information). Here's a general discussion of how to do it and a few examples using the built-in plugins.

Re: Python error when Alarming

PostPosted: Mon Feb 17, 2020 11:12 am
by jltnol
Now why didn't I think of that!

This is the absolute perfect solution. I've already got Action groups for the Alarm, and implementing them in Python as an Action Group is so easy, and will do exactly what I need it to do.

Thanks for the suggestion and advice.