I’d like to setup an event that is triggered by the value of one variable and send a message that includes the context of another variable.
Eg. I have a boolean that monitors the status of the system and an “alarm” variable which sends the description of the alarm in the context.
I’d like to create an event which is triggered by the true value of the ‘status’ boolean, and would send a message with the context of the ‘alarm’ variable.
bool status;
if trigger: status == 1
than action: send email
Message: “Device name” alert was triggered at “Trigger timestamp” due to: {“alarm” : { “context” : {“alarm” : “KEY-VALUE”}}}
What would be the proper entry in the Message field of the “then actions” tab for this?
Hi there @Gabor, please gently write using the embedded chat with your issue as actually I cannot reproduce it, so I suspect that is isolated and related only to your account, using the embedded chat an IoT support specialist may assist you better than me through this forum.
“Unfortunately, this is not possible as the events engine only captures the variable value that fulfills the condition”
Too bad
It would be great to create a more informative alert message by including additional data from variables other than the one that triggers the event.
Hi there @Gabor, I did not get that you needed to send data from variables different than the one that triggered the event. Right now, two options come to my mind to reach your goal:
To send the alarm context value in the value that triggers the event.
To use the events engine to trigger an Ubifunction, in this way, you may run a logic that will trigger an alert with the values that you need from external sources.
If you wish to expand any of the above ideas, please write back to me using this post or the embedded chat (the last one is the fastest way to get answers).
Thank you @jotathebest, I think we’ll go for workaround 1.
I just thought that - in the future - it might be helpful for your users if they could construct an outgoing message by including any of the available variables and their values/context.
-I know that coming up with ideas is thousand times easier than implementing them, so sorry for playing Smart Aleck.
Thank you for your ongoing support!