Attributes with 2 numbers

#1

I have sensor values which have numbers, but ever sensor value in my system (dozens) has a unique address from the device that generated the data. We need to track the value of the sensor as well as a second number representing its address. The address is a decimal number from 0-255.

Ideally, it would be clean to update the device state with an attribute that is a vector [number, address]. I know there are no vectors or arrays as attributes but is there a workaround to neatly tie them together without having to create 2 number attributes for each sensor?

#2

Vectors (or Tuples) has been something we’ve been investigating for a while. The difficulty on our end is how to make it easy to visualize and process (workflows) arbitrary vector data.

#3

In our case we don’t really need much visualization on those. But for others you could do x,y or x,y,z charts and leave it at that.

Food for thought.

#4

@Brandon_Cannaday

At this point, would my only option me to have a separate attribute key/value like this?

Sensor_A_value
Sensor_A_address

I can’t store JSON strings to as a string attribute I assume?

#5

Generally I use two attributes.

You can put a JSON string in a string attribute if you want, but Losant doesn’t natively understand that anywhere for visualizations or the data aggregations.