Jump to content

Strings/Characters in ISY


Recommended Posts

Posted

I notice that variables only handle numbers.  Is there a way to handle Characters?

We have programs that set an Integer to 0 or 1 to indicate OFF or ON.  When we send an email to notify of the current status it show 0 or 1.  Is there a way to get it to show OFF or ON?

Thank you for the assist! 

Posted (edited)

I use pushover and format the string based on if the state variable is 1 or 0.  This requires two network resources (one for each state).  Then the program will call the network resource based on the IF statement.

IF sVar == 1 AND sVar != 0

Then network resource: person.home

Else network resource: person.away

Since you are using email, I am not sure how this would work.  I would assume that it is similar in nature.

Edited by Mecheng70
Posted

to specifically answer your question no, you can't store stings in variables.

You can make as many custom email templates as you desire, so yes you could make a template for on and one for off, and use each differently in programs.  https://wiki.universal-devices.com/index.php?title=ISY-994i_Series:EMail_and_Networking_Substitution_Variables

You can also create custom messages via network resources (assuming you have a portal subscription which includes the networking module) to send messages via a service like Pushover.  There are also nodeservers such as "Push", and "Notification" that can be used to send custom notices.  "Push" exists in both the polyglot cloud  instance and is available as a local nodeserver.  "notification" is only available in the local nodeservers for Polyglot running on Polisy or a rPi.

 

  • Like 1
Posted

Additional note about using Pushover:

Actually find it's easiest to use the Network Resources method.  I've tried the two nodeservers but I find it easier to "just do it the old way" which is the network resources method.  The first time you set Pushover up it you will think its complicated and cumbersome.    It gets easier tho!   When I set up a new message I take the one I already have that is closet to the one I need, and copy it with the copy button, then immediately rename it, then edit the content, then save.  Once you've done it half dozen times it's a piece of cake!    Also, the wiki suggest a timeout of 2000ms, I recommend 4000ms instead, most of the time 2000 is plenty long enough, I have seen fringe cases tho where there was a missing message and the ISY main error log shows a timeout-- i don't recall that happening since i went through and up'd them all to 4000,

Pushover is the fastest notification method that I know of, my favorite example is that if I pull open our mailbox most of the time the "mailbox open" notification taps my wrist before my hand is even off the handle of the mailbox. 

Guest
This topic is now closed to further replies.

×
×
  • Create New...