Retain values (and history)

Hi,

It seems that the MQTT broker from Cayenne doesn’t support the Retain policy at this moment. This means that I have to wait for the next publish event until I see data in my dashboard. I use Cayenne to monitor my car data, and the tracker send new data every 60 minutes if the car is not driving, so this takes a while.
It would be nice if I could see the most recent values immediately.

It would be even nicer if Cayenne also stores older values so you could even display graphs and GPS movements immediately. I am aware that this requires myDevices to use a time series database to store these values, but if more people are interested in this feature it might be a paid feature to store history values.

Regards,
Remi

Hi @rfrenay, I’m seeing (and expect) the Cayenne dashboard to display data as soon as it is published to our server. I may not be understanding what you’re describing here – you are only sending the data once every 60 minutes but expect to see it online sooner?

We should be storing data for graphs and GPS history as well. We had a bug with the data history graphs showing zero that we resolved yesterday (before your post, but we may have collected some zeroes for your device while the bug was in place), so I’m curious if you’re seeing the expected history values for anything from today onward when tapping the data history graph at the upper-right of your Cayenne widgets.

Hi @rsiegel,
Thanks for your reply. I was not aware that Cayenne was already retaining values and history. The system is even cooler than I was aware of :slight_smile:. I had to wait quiet a long time before some data appeared because the values were not retained. I thought this was standard behavior of the system, but now the bug is fixed the system is exactly what I was looking for.

The only widget which seems to not yet getting the data history is the gps map in the “Bring your own thing”.

Regards,
Remi

Hey again Remy, thanks for the nice words!

The GPS map should retain history too, although it does a little differently than the other widgets – there is a slider on the bottom that you can use to drag to a specific time/date and it will show a marker where the GPS was logged at that moment. There is also a some controls in the upper right of the map that you can use to show historical data points/trails – here is a fun trip around the world from my publishing random numbers to the server :slight_smile:

The map on my “Bring Your Own Thing” does not work immediately. I have to wait for the next update before it shows a position on the map. And if switch between my devices it forgets the last position and start with the blue screen again (see picture).

My TTN LoRa device also uses a map, but this map does retain its position and history. So there is a difference between these devices.

Ah, I see what you mean now – yes, my data in the above picture was wiped when I returned to my account. Clearly something buggy going on here, I’ll share with our dev team.

This feature (the GPS widget) was developed for LoRa devices specifically and is accessible through the MQTT API somewhat incidentally, so there may be some oversight in what it needs to retain history. Certainly something important for us to fix soon.

Thanks for looking into it!

I wanted to update this thread after getting some confirmation from our development team.

In short, the GPS map widget should not have been available through the MQTT API despite it being listed in our documentation as an accepted data type (and our sorting our the correct format with which to send GPS data). As mentioned above it was designed for LoRa devices and needs further development to work properly with non-LoRa devices like those connected via MQTT.

We’re going to hide it from our documentation until such time as it is fully developed and tested. Until that time, you can probably still create a GPS widget by publishing gps,m=[lat,long,alt] type to Cayenne, but I wouldn’t expect it to work/retain data.

2 Likes

That map looks pretty cool!

1 Like

@bestes Thanks. We have an IoT middleware platform, and we were testing the integration with the Cayenne platform for visualization.

@rsiegel Thanks for the update!