Low battery notifications

Stewart2 years ago

Would anyone be able to give me step-by-step instructions on how to create an email notification in the web app, for when a portable device’s battery level goes below a certain level? (or just point me to somewhere that has these instructions)
I’m sure it isn’t difficult, but I believe it involves computed attributes which is where I am completely lost.
I have email set up and working, it is just setting up the actual notification I am stuck with. Thanks.

Anton Tananaev2 years ago

Usually it's automatically reported by the device. If it's not, then you could use computed attributes to generate an alarm based on the battery level or voltage.

Stewart2 years ago

Thanks but using the device directly is not going to work in my scenario.

I will rephrase my question... How do I "use computed attributes to generate an alarm based on the battery level or voltage"?
Bearing in mind my original comment "I believe it involves computed attributes which is where I am completely lost".
Thank you.

Anton Tananaev2 years ago

The expression should look something like this:

battery < 2.0 ? "lowBattery" : null
Stewart2 years ago

Ok, so where do I put this?

Anton Tananaev2 years ago

Have you read the documentation?

Stewart2 years ago

I have... and they go completly over my head. I am a web app end user, not a programmer. Hence my question about a "step by step" guide.

Anton Tananaev2 years ago

Computed attributes are an advanced feature that requires at least some basic technical knowledge. I don't recommend using them if you don't know what you're doing.

Stewart2 years ago

I have much more than basic technical knowledge; I wouldn’t have been able to set up my own server if I didn’t. However, I am not a programmer, so I don’t understand the JEXL language and hence the principles involved.

Can anyone else help me with a more helpful answer to my ‘actual’ question?

Anton Tananaev2 years ago

I already gave you the JEXL expression to use. You don't need any programming knowledge beyond that.

Stewart2 years ago

Sure, but I then asked you what to do with it, to which you replied... "read the documentation". That is not a step by step guide!

Anton Tananaev2 years ago

We don't have a step by step guide, but what we do have should give you a pretty good idea how it works and how to set it up.

Stewart2 years ago

That is why I am asking if someone else can help me