Threshold (versioning)

What is the most appropriate place to store the thresholds of a given device considering that at any given time these thresholds may change, and this must be properly represented in the graphs?

For example: for 6 months a device operated with a threshold set to a maximum of 50 degrees F, but on a given day the equipment after maintenance started to operate with a threshold of 70 degrees F. I would like to display in the graph the states line measured throughout the time, and also the line of threshold when it was at 50 and started to operate at 70.
Any suggestion?

Hi @Carlos_Mecking,

I would recommend reporting this value as state, possibly for a device attribute threshold. If the timestamp is of importance, meaning, you would like to display the data as Time Series, it is likely ideal for your use case to utilize device state. This will allow you to easily use the Time Series graph.

However, you do also have the option of storing the data in a Data Table, and then utilizing the Custom HTML Node. This will require configuration and some custom CSS, HTML, and Javascript.


Hi @JuliaKempf,
Thanks Julia for your answer.
I think using the time series for that would be very good.
Thinking about the Edge scenario: I thought about storing the threshold in the tags of the devices and the edge inserting it into the payload, sending it to the platform as an attribute.
The problem would be having to consult the Device tags every time a payload arrives.
There could be an activity in the flow to synchronize the tags once a day for example. keeping a copy of them on the edge …
Does that make sense to you?

Hi @Carlos_Mecking,

I just want to confirm I understand your edge scenario. Are you saying you would like to store the current threshold value in the device tags, in addition to reporting the value as state? Or are you saying you would like to store this value in a tag exclusively? In both scenarios, you will have to use a node to retrieve this stored value from Losant.

I am not sure if this would be ideal for your use case, but if you were to utilize Workflow Storage, you could store the value in the workflow before it is sent to Losant. Thus, if you store the threshold value within the workflow, you would not need to fetch or “sync” the value from Losant, you would already have it! You would set the Storage value in the workflow at the same time you reported the threshold value as state to Losant, and both your workflow and Losant would be up-to-date on the current threshold value.

Please let me know if I understood your use case, or if this suggestion is not ideal!


Hello @JuliaKempf,
Sorry I didn’t answer before, but I did some tests here and I’m going to follow that way, it seems to solve my problem by now.

1 Like