Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smart Handling of ISY Motion events
#1
After working with Dean on http://www.charmedquark.com/vb_forum/sho...hp?t=12664 , I think it may be related to my processing of ISY motion events.

For each Insteon Motion sensor, ISY creates 3 nodes:
<Name>-Dusk.Dawn
<Name>-Low Bat
<Name>-Sensor

I am trying to make my system easily flexible such that I can have new motion sensors trigger a scene without having to add code for each one. So, my approach was to name a sensor as "FamilyRoomMotion" and then have a scene of "FamilyRoomMotion-Scene".

In the ISY Event handler I want to just strip off the "-Sensor" from the triggering sensor name so I can then append "-Scene" and activate the scene. However, I've noticed that I'm getting events for some "Dusk.Dawn" from motion sensors. So, when I hard code removing 7 characters from the name and then append "-Scene" I end up with a non-existant field and errors in the event handler. My concern is that those errors lead to ISY disconnecting.

How can I quickly and easily check that the event is actually a motion triggered event and not a low bat or dusk/dawn? I wish there was a string.endswith("-Sensor") that I could use but I can't find anything like that.

Suggestions?
Reply


Messages In This Thread
Smart Handling of ISY Motion events - by Sendero - 09-20-2016, 03:47 PM
Smart Handling of ISY Motion events - by Sendero - 09-20-2016, 04:07 PM
Smart Handling of ISY Motion events - by Sendero - 09-23-2016, 07:41 AM
Smart Handling of ISY Motion events - by Sendero - 09-23-2016, 09:56 AM
Smart Handling of ISY Motion events - by Sendero - 09-23-2016, 12:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Status of Scheduled and Triggered Events gReatAutomation 4 1,497 04-21-2020, 12:58 PM
Last Post: gReatAutomation
  Timers or Waits in events? simplextech 18 5,811 01-08-2020, 02:01 PM
Last Post: Dean Roddey
  Scheduled Events & Variables gReatAutomation 2 1,362 06-20-2019, 01:31 PM
Last Post: gReatAutomation
  your sched/triggered/tasker/IFTTT events IVB 17 9,278 01-18-2018, 07:41 AM
Last Post: RichardU
  Amazon Echo Smart Home Skills API jkmonroe 23 9,525 04-19-2016, 08:40 PM
Last Post: IVB
  Smart Things Hub Discussion Deane Johnson 16 7,719 01-28-2016, 05:15 PM
Last Post: Dean Roddey
  trigger on motion end jkmonroe 5 3,578 12-29-2015, 01:18 PM
Last Post: jkmonroe
  UPB motion sensor? rtarver 1 2,218 10-21-2014, 02:58 PM
Last Post: anogee
  EmailURLImg in Triggered Events TurboSam 6 3,606 11-23-2013, 01:50 PM
Last Post: Dean Roddey
  Variable Times for Triggered Events TurboSam 9 5,524 11-19-2013, 10:00 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)