Python error when Alarming

Posted on
Sat Mar 23, 2019 12:16 pm
dstrickler offline
User avatar
Posts: 315
Joined: Oct 08, 2010
Location: Boston, MA

Python error when Alarming

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

Dave

Posted on
Sat Mar 23, 2019 1:12 pm
Monstergerm offline
Posts: 163
Joined: Sep 01, 2009

Re: Python error when Alarming

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).

Posted on
Tue Mar 26, 2019 3:34 pm
dstrickler offline
User avatar
Posts: 315
Joined: Oct 08, 2010
Location: Boston, MA

Re: Python error when Alarming

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.

Dave

Posted on
Tue Mar 26, 2019 5:59 pm
Monstergerm offline
Posts: 163
Joined: Sep 01, 2009

Re: Python error when Alarming

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.

Posted on
Tue Mar 26, 2019 6:16 pm
dstrickler offline
User avatar
Posts: 315
Joined: Oct 08, 2010
Location: Boston, MA

Re: Python error when Alarming

That worked! Amazing! Thank you!

Dave

Posted on
Sun Feb 16, 2020 12:12 am
jltnol offline
Posts: 484
Joined: Oct 15, 2013

Re: Python error when Alarming

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 ?

Posted on
Sun Feb 16, 2020 9:33 am
dstrickler offline
User avatar
Posts: 315
Joined: Oct 08, 2010
Location: Boston, MA

Re: Python error when Alarming

I'd highly recommend taking a look at this plugin. It really works well with Indigo.

Dave

Posted on
Sun Feb 16, 2020 9:40 pm
jltnol offline
Posts: 484
Joined: Oct 15, 2013

Re: Python error when Alarming

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.

Posted on
Sun Feb 16, 2020 11:31 pm
howartp offline
Posts: 4092
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Python error when Alarming

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

Posted on
Mon Feb 17, 2020 10:36 am
jay (support) offline
Site Admin
User avatar
Posts: 16269
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python error when Alarming

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Feb 17, 2020 11:12 am
jltnol offline
Posts: 484
Joined: Oct 15, 2013

Re: Python error when Alarming

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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest