Using viewon to change an alarm email

I attended a class the other day for eWON training and the trainer showed me his viewon dashboard with an option for changing the alarm email, I figured I could easily do this by making my own section of script and such for a custom email but I would like to avoid that and just use the system settings for this, I believe it was something to do with get/put sys… He explained that the viewon uses the same code as the eWON. can someone point me in the right direction for writing the sys file.

Thanks

Hi Lucas,

here’s an example that I made up for this. I ended up creating a string tag called string that is just going to store the value of the email.

After that go into ViewON and go to project > import tags

The first thing I did was go to drawing > graphical components > text field and create a box. From there go to Actions > New > Send > String and change it so that the tag to write is string.

After that I went to drawing > texte and create the tag. After that can you go to animations > Text on string and set the tag to string.

After that when you push the project to the flexy you should be able to see the tag “String” have it’s value change whenver you write to the text field

image

This does work great to send a string tag from viewon to the eWON however I am looking at the alarm configuration on a tag, I want to edit the tags alarm config. Im trying to keep it simple and avoid adding more script to the eWON for this specific field.

On my last note this is what I have figured out so far,

setsys tag, “LOAD”, “A1_HIGH_ALARM”
setsys tag, “ETO”, string_tag@
setsys tag, “SAVE”

this allows me to directly change the tag alarm config without actually changing the tag, you can also change any other tag configuration also with this, I am stuck with viewon right now, so I am going to walk away for a little and come back to this.

The above script is pretty handy to make a setting change without having to go into the ewon, I am thinking for the end user, I do not want them into the ewon, only my dashboard.

Hi Lucas,

It seems like if we do a combination of your code and what I have above we should be able to get this working. I think if you just have something like onchange for the string and then have it call your code:

setsys tag, “LOAD”, “A1_HIGH_ALARM”
setsys tag, “ETO”, string_tag@
setsys tag, “SAVE”

you should be able to do it that way. I’m trying to figure out a way to just do it in viewon but haven’t quite figured that part out yet

i got this working, I used the code above made a text box that a string can be typed into and saved to a tag on the ewon, after that I made a button to send a command, that command was the script above and now my alarm changes on my tag without any extra script in the ewon.

Topic closed due to inactivity.