Not sure I understand how gauge queres work with device id in payload



I will set out the scenario first then look at how I am use gauge queries.
I am monitoring diesel driven pumps. RPM should stay relatively constant, though RPM will increase/descrease slowly over time.

At times however set point’s on one of a series of pumps may be wrong and the pump speeds up/slows down rapidly over a large RPM range., This due to PID loops being too aggressive and/or target pressures incorrect .

The plan is to send out an alert when the MAX and MIN RPM values for a pump over 20min period vary by more than 50rpm for instance.

So plan was to use the gauge query for all devices with a particular tag and value hasRPM=true. so far so good.

Then use device id specified in the current payload to pick the device for the query and collect the MIN, and a seperate query to get the MAX.

However I find the pay load only every gets a timestamp and no value.
Here is the gauge settings

And payload

However if I select specific device/tag I do get a MIN value set in the payload.

To me it seems the device id in payload doesn’t work as I expect.

Can you shed some light




In case I didn’t userstand the “Device ID(s) JSON Path” I have tried


And none of these options had any effect.



Ok penny dropped :wink:

Now I realize the Device (id’s) was literal , as in the Device ID and not some other identifier.

Now this raises a question, how does one get the device id of the device that triggered a flow.
The device id doesn’t appear any where in the payload.




No I see. I apologise for taking up time here :wink:

“triggerId” is the device ID if the trigger type is “deviceId”

Maybe this will help other newbies like me :wink:



Thanks for the detailed rundown Tim! We chose to have all triggers provide a standardized payload, and now I can definitely see where you’d never know that triggerId was the device ID. We’ll noodle on that a little. Perhaps we can explicitly add deviceId to the payload, just like we do with tags. Even though it will be the same value as triggerId it would at least be obvious what it is.



Now I know it is fine, but maybe more explicit documentation is enough.
Mind you having the device id in the payload would be good. It would mean when constructing payloads or using device payloads the notion of deviceId is consitent.