Script to work with unsupported devices, thoughts ?

Posted on
Wed Jun 24, 2015 4:41 am
PeteVis offline
Posts: 180
Joined: Jun 19, 2015

Script to work with unsupported devices, thoughts ?

I have a few door/window sensors that are currently not supported in Indigo, but I wanted to use them anyway.

I have come up with the following python script that looks at the last 25 event log messages and matches a string that I know is the message being sent when my door sensor opens.
This script is run from a schedule every 10 seconds when my alarm is armed.
When the string is located in the event log it sets a variable that in turn works with a trigger I have set to send me push notifications and set of my Sirene.

I am looking for any thoughts and opinions, if this is a good way to do what I wanted, or are there better ways to achieve the result I'm after.
It seems to be working fine, but I'm generally looking for advice, do's and dont's of python inside Indigo...

Here is the code :

Code: Select all
alarmArmedVar = indigo.variables[1705593234]
if alarmArmedVar.value == "true":
   indigo.server.log("The alarm is armed, check for door sensor tripped")

   eventEntries = indigo.server.getEventLogList(lineCount=25)
   eventToLookFor = "requestAlarmSensorStatus: node 008, endpoint None, cmdClass 71, type 6, value 255"
   doorTrippedVar = indigo.variables[543692705]

   if eventToLookFor in eventEntries:
      indigo.server.log("Event found in eventLog: Door is tripped\n")
      indigo.variable.updateValue(doorTrippedVar, "true")

Posted on
Wed Jun 24, 2015 8:55 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script to work with unsupported devices, thoughts ?

Definitely a huge hack :) , but if it works for you then go for it. Biggest downside is that the Event Log files are going to be very large with that debug logging turned on.

Image

Posted on
Wed Jun 24, 2015 10:52 am
PeteVis offline
Posts: 180
Joined: Jun 19, 2015

Re: Script to work with unsupported devices, thoughts ?

Thanks for you approval :lol:

It's only temporary I hope until the door sensors are properly supported, but I was kind of proud to come up with this... and also very happy Indigo is flexible to enable stuff like this.

Posted on
Thu Sep 08, 2016 5:12 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Anyone have any newer information on how to get a sensor to work ? Thanks


Here , I have pasted a known good, and an apparent bad configuration in indigo, but I am not able to really determine what can possibly be done to use this device.
I can only see a battery level under action groups, update device variable, so dont think I can go that route:

indigo.variables[543692705]




Good:

Z-Wave Indigo Device "Upper Gate Sensor" Z-Wave Properties:
Indigo Z-Wave Version: 1.0.368
Node ID: 91
Model: Recessed Door Sensor (ZW089)
Model ID: 01020059
Manufacturer: Aeon Labs
Manufacturer ID: 0086
Protocol Version: 3.92
Application Version: 1.13
Model Definition Version: 1
Library Type: 3
Class Name: Routing Slave
Class Hierarchy: 04 : 07 : 01
Command Class Base: 00
Command Versions: 80v1 30v1 84v2 85v1 86v1 70v1 71v1 72v1 73v1 98v1 59v1 7Av1 5Ev1
Multi-Endpoint Types: - none -
Multi-Endpoint Classes: - none -
Multi-Instance Counts: - none -
Features: routing, battery, beaming, waking
Neighbors: 2, 3, 6, 7, 10, 17, 22, 23, 25, 26, 27, 28, 32, 34, 58, 66, 76
Associations: 1:[1] 2:[]
Config Values: - none -



Bad:

Z-Wave received "DoorBell" status update is off
Z-Wave Indigo Device "ShedDoor" Z-Wave Properties:
Indigo Z-Wave Version: 1.0.368
Node ID: 106
Model: Routing Slave
Model ID: 20222201
Manufacturer: Vision / Yale
Manufacturer ID: 0109
Protocol Version: 4.05
Application Version: 5.01
Model Definition Version: 0
Library Type: 3
Class Name: Routing Slave
Class Hierarchy: 04 : 07 : 01
Command Class Base: 00
Command Versions: 80v1 84v2 85v1 86v1 71v1 72v1 73v1 59v1 5Av1 7Av1 5Ev1
Multi-Endpoint Types: - none -
Multi-Endpoint Classes: - none -
Multi-Instance Counts: - none -
Features: routing, battery, beaming, waking
Neighbors: 2, 3, 10, 18, 22, 23, 25, 26, 32, 34, 35, 66, 76, 101
Associations: 1:[1]
Config Values: - none -

Thanks
-Brian

Posted on
Fri Sep 09, 2016 4:41 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script to work with unsupported devices, thoughts ?

What particular model is the sensor that isn't working? Looks like it is Vision brand, but what is the model?

And can you turn on debug logging then open/close the sensor a few times, then copy/paste the Event Log results into a reply for me?

Image

Posted on
Fri Sep 09, 2016 5:14 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Matt - Thanks for taking a look.

I also did a device submission. Here is a link for reference :
http://www.thesmartesthouse.com/collect ... zd2105us-5

Model is : ZD2105US-5, V Manufacturer: Vision / Yale per the event log.

When you say turn on debug logging, do you mean under Interfaces, Configure Zwave dialog box, and check the box on the bottom that says "Show Debug logging in event log window"? If so, the log file in the folder named Indigo_log.txt time stamped a moment ago, show no entry for the device.

If there is another debug setting I am not familiar with, please tell me how / where to enable, and I can post those results.

The device appears as only having a battery level.

Thanks

Thanks
-Brian

Posted on
Fri Sep 09, 2016 5:18 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script to work with unsupported devices, thoughts ?

That is the setting I'm referring to. I'm surprised nothing is being written when the sensor is tripped. Instead of checking the log file, just open the Event Log window to see what it is logging (should mirror the file, of course). And I presume you closed out of the Z-Wave configuration dialog after changing the checkbox?

Image

Posted on
Fri Sep 09, 2016 5:21 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Re enabled debugging, yes, I had saved changed, but looking at live events, I see motion sensor updated , but nothing as I move the magnet away from the sensor, red light does reflect the sensor sees the magnet change, but no change in the event window that refers to that device


Sent from my iPhone using Tapatalk

Thanks
-Brian

Posted on
Sun Sep 11, 2016 10:33 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script to work with unsupported devices, thoughts ?

You should see something in the debug logging when the sensor is opened/closed. I wonder if it is in a bad state. Try excluding the module from the Z-Stick, then re-include it and re-sync it. Still nothing in the debug logging when it is opened/closed?

Image

Posted on
Sun Sep 11, 2016 10:42 am
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Thanks Matt, I'll give it a try in a bit when I get home


Sent from my iPhone using Tapatalk

Thanks
-Brian

Posted on
Sun Sep 11, 2016 9:22 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Removed , repaired with same results, only see battery level, no activity in event log when triggering device


Sent from my iPhone using Tapatalk

Thanks
-Brian

Posted on
Sun Oct 23, 2016 4:15 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script to work with unsupported devices, thoughts ?

Can you, with debug logging turned on, do the following:

1) Re-sync the module (after waking it)
2) Press/depress the switch several times
3) Note if Event Log shows anything (I understand it didn't in the past)
4) Remove the battery cover to trip the tamper switch on the device.
5) Note if Event Log shows anything
6) Copy/paste the Event Log results (along with any notes you have) into a reply for me?

Thanks!

Image

Posted on
Mon Oct 24, 2016 1:25 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Script to work with unsupported devices, thoughts ?

Sorry, gave that device to a Vera user, I can't try again:-(


Sent from my iPhone using Tapatalk

Thanks
-Brian

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 11 guests