Charts/Details are not updating

Using ESP/HTU21d for temperature/humidity monitoring. For power saving reasons i reduced the messures to 4/h or 15mins. In detail ESP gets his values pushs them to cayenne and the goes sleeping for 15min. After 15min he reboots, connects to wifi, reads its values, pushs them to cayenne, goes sleeping, and so on.
Since expanding the intervals cayenne is not updating the charts any more or rather the showed value are wrong. Cayenne just copies the old values on an on. Additionally you get error message ā€œNo data available for this periodā€ if you select minutes or hours in chart.

https://cayenne.mydevices.com/cayenne/dashboard/arduino/V03-OQKMRHIZ-RHIZ-OD25-F010-FD96-1244-58B3

I noticed this as well on my battery powered DHT11 project. Seems to be a limitation of the graphs, not sure if they can come up with something to fix that or not.

1 Like

I hope @rsiegel can help here.

Maybe our charts are not dealing well with the situation of the device being offline 99% of the time? Iā€™m actually wondering if weā€™re receiving the pushed value consistently every time based on what Iā€™m seeing on your account.

For example, if I look at the hourly graph, iā€™d expect a data point every 15 minutes, but Iā€™m seeing one at :29, then :39 then :53. Is it possible to add a delay (just for troubleshooting) to your sketch so it stays online a few minutes at each wake interval to see if this improves the results?

Thanks for your quick response.

Correct me but for me it looks like the normal widgets (Value) are updated correctly (23.2Ā°C) but not the graphs. For temperature e.g. i got message ā€œno data availableā€ for minutes page, for hours page i got a value every 14min (19:39, 19:53, 20:07) this seems to be correct but it is always the same value (22.20). And for day page i got a value once a hour (03:00, 04:00, 05:00 ā€¦)

I should be possible to insert that delay you mentioned, but tell me what else communication between cayenne and the device there is after sending a value? Itā€™s also interesting for power saving strategies.

Hi again,

So I set up my own test: Not quite the same thing but I had a Raspberry Pi with a temperature sensor, and I only allowed it online every 10-15 minutes or so, over the past hour. Looking at my data, I see two things that I think are bugs, that may be more pronounced in your situation:

1 - Occasional data reading (not many, but some) were missed by the platform while I know the machine was online and polling for data. Considering you are polling only once every 15 minutes, I think even a single missed instance can very much mix up your results here.

2 - The hours page seems to be ā€˜guessingā€™ at a value on the hour (2:00, 3:00, ā€¦) even if the device was not on to deliver a reading then. This seems incorrect to me and Iā€™m going to suggest that we change it. If we only have readings at 2:45 and 3:15, we should not assume what the data value may have been at 3:00 in a graph.

3 - Not reproduced with my sensors, but the repeat values you are seeing in the graph which are not consistent with what the widget value is showing.

Things that Iā€™m not convinced are a bug, yet:

  • The lack of data in the ā€˜minutesā€™ view, which is designed to show only the last 10 minutes of readings. If you are polling every 15 minutes, I expect this view to be empty some of the time.

I will have to ask our engineering team to find out more about communication between the Arduino and the platform outside of just updating these values. I know you are interested in saving power, but I think it would be a beneficial test to allow the device to stay online for a slightly larger window (maybe 1 minute) to see if it improves any of the behavior here. It may not and we may just have some bugfixing to do, but it would be an interesting test.

Hi @rsiegel,

sorry for the delayed reply.

I made some changes to the sketch as you suggested. Now ESP is waiting for 60 sec after getting his values before he goes sleeping. Right now i see no changes to the charts but maybe you want to take a look for yourself.

Regarding minute/hour page i think the strategy should be something like, chart should show the same or no value if there is no update for 15min e.g. maybe it would be good to have the possibility to choose this.
On the hour page the chart should show the value which is the closest from time or the possibility show an median value of the last 60 minutes.

Short update:

Keeping the ESP online for a minute seems not to make anything better. Chartstill show the same value which showed since last week and not the actual values :frowning:

Any news @rsiegel ?

Weā€™ve made updates to our graph widget that may have made the issues you experienced better. Let me know if you see improvements?

-B

i am having the same problem. i am using a nodemcu with a dht11 sensor and the value seems to update fine, but the graph does not show any change for a long time. it refreshes when i refresh the page. any solutions???

Can you share the code you are using? you need to use the correct data types to create the appropriate widget for it.