For example, the device already send the variable value, and i want to include some context to it eg: values >28 is inactive. From here i want to create a devices table listing all the active and inactive device.
Since the project is already deployed and changing the source code is not an option.
Greetings @syafiq I hope this message finds you well.
Certainly, you can append context data to an existing Dot on Ubidots. Here’s a step-by-step guide on how to achieve this:
Set Up the Values Table Widget: Begin by creating a Values Table widget for the specific device and variable whose context you wish to modify.
Add a Context Column: Aside from the Date and Values columns that you’d normally add to the Values Table widget, introduce a context column to the table and specify the key you’d like to display within the Context.
Enable Editing: Turn on the Allow editing option for the context column. This will let you manually input the desired context.
Input Context Manually: Now, you can directly enter the context information from the Widget.
For clarity, please refer to the GIF below:
Breakdown: In this example, I’m working with a device named tempDevice. I aim to append context data to its temperature variable, specifically:
{"status" : "hot" }
After setting up the Values Table widget with Date, Value, and Context columns, and enabling the Allow editing option for the Context column, I can manually define the content for the status key within the context.
It’s worth noting that the above method is manual. If you’re looking to automatically set the status to “hot” or “cold” based on the temperature value, for instance, setting status to hot if the temperature is above 50, you’d need to integrate this logic within the HTTP request when sending the data.
I hope this helps! Let me know if you have any further questions.