Edge Agent - Payload older than 7 days

Hi, I’ve observed an issue this morning on two edge agent devices.

Both experienced a comms loss for a number of days. (Comms provided by a 4G router).

The edge agent presumably continued to capture data from a Modbus slave, waiting for comms to be restored.

When comms was restored, the device debug showed the edge agent was connected, and attempting to transmit state on schedule, however Losant rejected the payload with the error “Payload is older than 7 days”

The edge agent then repeated this process on it’s transmit interval 10 minutes later, again being rejected by Losant.

I powered cycled the systems, the logs were cleared, and the system is now up and running.

How should this scenario normally behave?
Is there anything I can do to ensure that a manual intervention is not required in the future?

Many thanks,
Chris

Hi @ChrisGM,

Device state can be reported historically 30 days in the past; however, I have not seen this error in the past and would like to discuss it with our platform engineers to see if this is unintended behavior. Could you include a screenshot of this error if you have it available?

Thanks!
Julia

Hi Julia,

I expected 30 days, but the warning was for sure “7 days”.

I’m afraid I didn’t take the screenshot. (Kicking myself now)
It appeared in the Device Log, in the Devices section of the interface. The warning was orange, with a little yellow exclamation mark warning triangle from memory.

To try and replicate would likely take days of downtime, which I could stage on a demo unit if this helps. Please let me know if you’re able to find the warning message with a search function first :smiley:

The payload data is coming in every 10 minutes now, albeit with a strange time delay. Seems like the latest reading is always a little late. One device around 30 minutes, one around 15. Different issue to the above.

Many thanks,
Chris

1 Like

Hi @ChrisGM,

Excellent, thank you for your thorough description! I did confirm with the engineering team that this is only a warning in the Debug Log to let the user know that data is being reported in the past, and should exclusively be a front-end warning message. The state data should have still been recorded to your device in Losant despite the warning, but I want to ensure that is the case. Is the data you received with the warning available within the Data Explorer for your device?

Thanks so much! :smile:
Julia

Hi @JuliaKempf,

It’s very possible that the device was transmitting a large quantities of ‘logged’ payloads, hence the delay.

However I did not see lots of ‘state reports’ in the debug log. Am I correct in expecting to see historical states in the debug log as they are reported? - At what frequency would they be reported if there was around 500 logs for example?

I will need to stage the test to be sure. I didn’t take sufficient notes to track timings and expected payloads.

Many thanks,
Chris

@ChrisGM,

While the Edge Agent is not connected to Losant, if your Edge Workflows report state, the agent will automatically start saving to disk any message you create using the Device State Node and the MQTT Node.

Once the connection is restored, every message will be “replayed” to the cloud. The agent will report each message that was stored while using the reporting time as the time the original message was created.

While you’re testing the agent’s offline behavior, here are two places you can use to confirm that your device reported state:

Thanks for this.

My other issue which may be related is this:

I am getting periodic Modbus Read errors. There is no particular reason I can see. Sometimes it works, sometimes it doesn’t.

The odd thing is that when I poll the edge device using a virtual button, the Modbus works correctly, and the payload timestamp is within a few seconds of the debug timestamp.

However when my 10 minute timer triggers (triggering the same set of nodes as the Poll button) I get the Modbus read error. The time stamp of the actual payload is in the past. (2hr 3min older than the debug timestamp)

This may be my original issue in hindsight!

I can provide screenshots in a DM if this helps?

@ChrisGM,

I think the problem would depend on what error you’re receiving from the Modbus Read Node. Could you send over what error you’re seeing?

Could you invite me to a private DM please?

  • “type”:

“MODBUS_READ_ERROR”

  • “message”:

“TCP Connection Timed Out”

Works on ‘Poll’
Shows the error on the timer

@ChrisGM,

I just sent you a message so you can share some screenshots :slight_smile: