Payload state consolidation and breakout

I’m a prospective customer learning the platform, just finished a few of the courses.

Payloads are max 256kb, that is in my application, a lot of information. I could theoretically pack all my data for one day into 1 or 2 payloads.

I have a machine that takes in parts, processes them, and rejects some. I would have sensors counting each of these (jn, out, reject). The machine doesn’t run all day, or even every day, maybe 40 hours a week. I want to track starts, stops and the parts in/out/rejected at each start/stop and fluid consumed for each run.

I’m not clear if I can pack all these parameters into one payload and then break it out into data that would be displayed on a chart correctly?

I would have to report state anytime the machine started/stopped and report the counts each time.

  1. Can Losant workflows/edge consolidate multiple states into one payload that can then be broken down into time series data once in the platform? or is it one timestamp per payload only?
  2. How many payloads would be required (triggered events are a payload as I understand?) to consolidate, send, and decode this data, if at all possible?

Similar to this question here, but not quite the same.

Thanks

Hi @GeneParmesan, and welcome to the Losant Forums!

Gene Parmesan

Can Losant workflows/edge consolidate multiple states into one payload that can then be broken down into time series data once in the platform? or is it one timestamp per payload only?

Two options here - you can send multiple state reports in one MQTT message over a device’s state topic, in which case you’d be sending just the one message and getting the data exploded out by timestamp automatically.

Alternatively, you could send a message to a custom MQTT topic in any shape you’d like (assuming it’s under 256KB). Then, when handling messages to that topic in a workflow, you can consolidate / reshape that data however you see fit before using a Device State Node to report one or more points to the time series database. We have a good guide on how to do this.

How many payloads would be required (triggered events are a payload as I understand?) to consolidate, send, and decode this data, if at all possible?

I believe each state report in a batch report would still count as an individual payload, even if they are all sent in one message. This is assuming that each object in the batch report has its own timestamp; for example, reporting 10 attributes in one state report object all at the same timestamp is itself only a single payload.

In the custom topic case, a message sent to the custom topic would count as a payload and then using the Device: State Node would count as an additional payload (again, one payload per each object in a bulk state report if you do so that way).

Please let us know if you have any other questions, and again, welcome to Losant!