Latency with messages?

In my workflow I have a device disconnect node that goes off after a couple minutes without a mqtt message packet being received. I have tested it thoroughly and I know it works.

I am wondering how these graphs update, because there are multiple periods on this graph with large gaps of 30 minutes or more however no message was sent to my phone so I know that the application was still receiving mqtt messages. I am wondering what is happening behind the scenes on losant when there are these gaps?

Before answering, I’m making some assumptions here …

  • This screenshot comes from a dashboard time series graph, and each of your segments targets a single device/attribute combination.
  • When you say “device disconnect node”, I’m guessing you actually mean a Device: Inactive Trigger, given your followup statement of “goes off after a couple minutes without a mqtt message packet being received.” (A Device: Disconnect Trigger, by comparison, would fire immediately as soon as a device disconnects from the broker.)

If my assumptions are accurate, then the gaps you see in the graph could be reconciled against the lack of an inactivity alert if the the attribute for a given device was not reported for that gap time period, but other attribute values were reported for the device in that time period. When returning graph data to the dashboard, if we do not have data for a given resolution bucket, we simply return no data for that resolution bucket’s timestamp. (If, in the graph, you’d like these gaps to connect through anyways, you can set that option per segment.)

Alternatively, depending on how long “a couple minutes” actually is (2? 5? 10?), it could be possible that your device stopped receiving state reports for those gap periods, but the gap is not long enough to trigger the Inactivity Trigger.

The situation is becoming even more weird:

My MQTT messages in are stating that all the switches are on. It appears that way on my bar graph too but my histogram is showing now that two of the switches are off which was what it was this morning like 5 hours ago. What is up with the major delay??



I am applying an expression to my graph segments because my switches are low-true so I have to invert the output to have it make sense.

I was viewing a current dashboard state.

Can you provide the dashboard ID and timestamp at which you took the screenshots in your previous reply? You can just visit the dashboard, use the time picker to travel to that moment, and paste the link here (or PM it to me). Note that if you paste the link here in this public thread, and this is a public dashboard, it will be visible to anybody who reads this post until the dashboard is no longer made public.

I sent you a PM @Dylan_Schuster

For anyone else who has this problem in the future:

Even though my device was sending data at the right times, the onboard timestamp was a couple hours in the past and it was throwing off some of the readings once they got to losant.