Custom timestamp for values?

hi, is there a way to set the timestamp for a value? our system stores stores values and only sends them when it has about 20 or so. each value is something like
{"epochTime":xxxx, "value":41, "type":"temp", unit:"C"}

also, is there a way to send multiple values in one message?


you cannot attach time to publish data. it takes time of arrival and current timestamp is allocated. Also sending all data is not the best practise as you might hit rate limit and you device can get blocked. You can take average of all data and send it.

@shramik_salgaonkar I remember from the slack server that there is a way to do this, but it’s not documented anywhere and those messages have dropped off due to the 10k message limit. Maybe you can ask some of the devs? I seem to remember that the format for payload is:

[{payload:payload, timestamp:timestamp},{payload:payload, timestamp:timestamp}]

okay let me check it out.

1 Like

Just to be clear to @mahesh this would require manually sending the messages using Paho MQTT or some other MQTT library. AFAIK it’s not supported with the Cayenne library.

hi @shramik_salgaonkar , while the rate limit might be an issue specific to cayenne, from an architectural point, this is the correct design for IoT; store and forward when possible if urgent action is not required. this saves a significant amount of battery life as a lot of power is taken up by starting up WiFi and making a connection. the size of the data packet (even several kB) is not the power drain. an average of the timeseries data is not useful in our case. i get 80% of my requirements on – they allow you to send the epoch time – but i’d like to be able to have a better UI and more customizations.

hi @adam, is payload a single data point or multiple? is this part of an official API? we send bursts of data – about 60 data points – a few times a day. so perhaps this system with the rate limit isn’t a good fit. thanks, mahesh

being a free platform, we are trying to provide the best possible platform to the users. Also if saying battery is your concern then you might opt for more battery technology like lora.

we’ll probably use LoRA in the future anyway but the cayenne restrictions won’t be a deciding factor. do you have a for-payment service that doesn’t have these restrictions?

in cayenne we dont have paid service. But you can have a look at the sister platform

@mahesh That API was designed to take up to a certain amount of data readings per payload. I can’t remember anything about it other than it existed. It’s been probably 2 years since I used it and all the examples I had were on slack and disappeared. Sorry.

@mahesh Looks like you’re in luck, I managed to find a post I made on here Timestamped data

Edit: but…still doesn’t look like it supports timestamps. @shramik_salgaonkar can you ask any of the devs if this has been added?

Doesn’t look good, this doesn’t have any timestamp info in it

thanks for looking, though! finding a good dashboard without spending a lot of time messing with it (after all, i have other parts of my startup to build) has been like kissing newts to see if they’ll turn into frogs, one of whom might turn into a princesses. in the meantime, i’ve been reading about the notebook paradigm of which jupyter seems to be one with which to start. it kinda makes sense – dashboards are cruelly dumb and limiting, case in point the problem that created this very thread :-).

1 Like