Skip to main content
1-Visitor
April 7, 2016
Question

My Thing wont open, Locked up system.

  • April 7, 2016
  • 1 reply
  • 5068 views

We are trying to set up our alert features for our door sensor by changing the value of IsTriggered, which is a property of the Thing from a Thing Shape. We are writing the subscription through the extension Twilio has given us. We are doing a few edits in that script and it works, every time we run we do get the text message from the Twilio account but  it seems to lock up the Thing that we Trigger that alert on within Thingworx. The Thing will not open, show properties, and in return locks up most of our system.

Below is the script that we are using:

if(Things["DoorOpenCloseSensor"].ArmedDisarmed==1){

                if(Things["DoorOpenCloseSensor"].IsTriggered==true){

                                 var params = {

                                 to: "//MY PHONE NUMBER" /* STRING */,

                                 text: "Your Door Has been Opened!" /* STRING */

                                                };

                Things["DoorOpenCloseSensor"].IsTriggered=false;

                // no return

                Things["TwilioBaseThing"].SendSMSMessage(params);

                }

}

                Things["DoorOpenCloseSensor"].IsTriggered=false;

When going to the Thingworx Community forums we noticed a listing that was kind of similar to what is going on with our project. Here is the link to that listing: https://community.thingworx.com/thread/2469

Is there a way to get out of this lockup? Is there something wrong in this script that could be causing this lockup?

1 reply

5-Regular Member
April 7, 2016

To narrow this down, can you try using the mail extension to send mails instead of using Twilio to send texts? Does any error message get logged?

rkmetz1-VisitorAuthor
1-Visitor
April 7, 2016

Just running a few more tests I've made a new script that sends the SMS messages with out getting locked out of the Thing. The only problem I'm having right now is the one Thing is still locked up, I can't access it. When clicked to see properties, or duplicate, or anything it just shows the loading screen but never actually loads up. I've implemented the new script on the Thing Shape but I still cant access that Thing.

Is there a way that I can unlock that Thing? or get it unstuck so I can edit its properties?

Below is the new scripts that work will all the Things, besides the Thing I cant access because it wont load.

if(me.ArmedDisarmed==1){

var params = {

  to: "//my number" /* STRING */,

  text: me.SensorName+ ""+ source + " " + eventData.description + " " + me.ArmedDisarmed + " " +me.IsTriggered/* STRING */

};

me.IsTriggered = false;

// no return

Things["TwilioBaseThing"].SendSMSMessage(params);

}

5-Regular Member
April 7, 2016

Well, restarting Tomcat would clear that up, but I suppose you will run into this issue again. You can try restarting the Platform Subsystem though. Also, if you go to Monitoring -> Subsystems, how does the Event Processing and Platform Subsystem look like?