patrickomni / omnimobileserver

Stubbed repository; using issues lists
0 stars 0 forks source link

Alerts - unclear algorithm for sendig Sempra low battery alerts #326

Open davroth opened 8 years ago

davroth commented 8 years ago

Potentially related to #316

In the picture below, it's possible to see a 30 day report adjacent to Sempra's landing page. Note the following:

  1. The 30 day report shows Trap 10.3 reported voltage of 2.4 on 10/09 @ 12:17. While that was not the last report from 10.3 (Last Report grid shows a time stamp of 10/11 12:05 and a larger voltage of 2.6), you can see on the Active Alerts grid that the report from Trap 10.3 on 10/09 @ 12:17 triggered an alert
  2. The 30 day report shows Trap 14.4 also reported a voltage level of 2.4 on 10/09 @ 11:25. Last Report grid shows that this low voltage report was the last one from 14.4, but it does not appear that a low voltage alert was fired for 14.4 when it reported a voltage level of 24.

There is only a global rule for Traps 10.3 and 14.4; Listener logs show battery levels are reported in what looks like tenths of volts (e.g., 2.6 volts is reported by a trap as 26)

Is it possible there is a bug for alert calculation for traps?

capture - alerts battery sempra

davroth commented 8 years ago

316

davroth commented 8 years ago

closed in error...

peters95 commented 8 years ago

that was a bit confusing to understand dave. Can you try to follow a different approach moving forward. Lets try to list these as user stories. So you would do something like.. "As a Trap User, I would like to be able to receive a low battery alert whenever the voltage of the battery is report below X value".. I'm not sure if that is correct but could you draft up a bunch of "stories" like that.. so max battery or whatever else and shoot them my way? I will then examine to determine if its functioning as expected or not. Could you also include user stories to explain "global" or "specific" rules. I think this will help not just me but the new team members too.

peters95 commented 8 years ago

from what I can understand is 10.3 reported low battery but 14.4 did not report low battery. What is the actual rule or "user story" around when these should report? is it different for specific or global.. (im not sure why you would bring this up so I am guessing it is different?) thanks!

davroth commented 8 years ago

from what I know right now, battery level threshold can only be set at an account level - at least that's what the Rules UI exposes. So the only way to cause 2 devices in the same account to have different behavior if the same battery level is reported is to turn off low battery alerts for one of them

peters95 commented 8 years ago

Hey Dave can you please try to repro this issue. I found a core difference in reports vs web and may have a fix. One was coming from DMResolved the other DMResolvedLatest which has some implications / differences in the data. I'm not totally sure why they are different but if you point both to same table data will be the same likely what you are seeing here.

davroth commented 8 years ago

this is a different problem - i'm not sure we even have any rules for low battery level, and that might be the root of the problem...

peters95 commented 8 years ago

ok can we close?

davroth commented 8 years ago

can you look at the UI code and see whether a battery level rule is supposed to be auto-generated if the Rules UI checkbox to 'Enable Low Battery and Low Signal Notifications' is checked?

We got a report from another customer today (Limelight Catering) that their devices stopped working and, while that checkbox is selected at the device level, I can't find a rule in the db for Limelight either.

It could be the bug is in code behind the UI that is supposed to generate the rule

peters95 commented 8 years ago

hey Dave

Can we try the user story approach maybe? this is starting to feel like more something just missing from the platform than a bug but i cant really understand without a clear grasp of the requirements. As Limelight Catering, I expected to receive "blah" alert given "X" criteria is met.. those stories will really help me otherwise im just staring at code wasting time...

thanks john

davroth commented 8 years ago

Miguel wants to be notified when battery levels on his devices drop so he can recharge them. He goes to his landing page and clicks the rules icon on the title bar of the Summary grid (or he could have clicked one of his devices to bring up a device-specific dialog). He makes sure the 'Enable Low Battery and Low Signal Notifications' box is checked. He can't change the values but might not know what to choose anyway. He is glad the Omni team has set reasonable thresholds based on their experience (probably should ask Gary for threshold if you don't see one in the code).

He selects himself as a user to receive alert notifications and clicks Save rule.

Several days later, he receives a text message informing him that the battery on one of his devices has dropped below the threshold. He goes to the device and replaces the battery, then uses the UI Landing Page Alert grid to clear the alert.