Line chart doesn't display anything


#4

Are you using MQTT API? if so I found this on release notes:

Known Issues

Custom ranges for data history graphs are currently not working for MQTT and LoRa connected devices.
Server side slowness with MQTT and LoRa triggers/notifications.


#5

Yes, I connected it via MQTT… I have seen some videos and tutorials where
the charts were working with MQTT, so I thought it will work also for me.


#6

Hello @tarna.alexandru

Once I have this issue with specific browser, because the browser engine was old. Can you restart the device and try with different devices?

Thank you!


#7

It’s been a few months, is there any further word on this?

I too have this same problem. I have a Sparkfun Thing Dev board with three temperature sensors on it. The first one (channel 0) gets data and does have a chart data, but the other two (channel 1 and 2) don’t show values in the charts but the gauges do.

Here is my code

https://github.com/dglinder/SparkThing-Monitor/blob/master/TempSensor003

If it’s visible, my dashboard is here:

https://cayenne.mydevices.com/cayenne/dashboard/device/3392ecd0-a197-11e7-bba6-6918eb39b85e

Thoughts?
Dan


#8

It’s possible that the values are being sent too fast. Try this:

for ( i = 0; i < MAXPROBES; i++) {
  //Cayenne.virtualWrite(probenum, celsius, TEMPERATURE, CELSIUS);
  Cayenne.celsiusWrite(i, tempsC[i]);
  Serial.print(" Probe "); Serial.print(i);
  Serial.print(" Value "); Serial.print(tempsC[i]); Serial.print("C");
  Serial.print(" or ");    Serial.print(tempsF[i]); Serial.print("F");
  Serial.print("  ADDR "); Serial.print(MACaddr[i][6], HEX); Serial.print(MACaddr[i][7], HEX);
  Serial.println("");
  delay(500); //decrease or increase at needed
}

#9

Thanks, @adam - adding a delay there looks like it did the job. I’m going to let my Thing run a bit to ensure the data is collected but looking fine so far.


#10

Hi,

I’m also sending via MQTT from a custom device and I’m getting the same issues.

I’m sending a QoS1 publish, waiting for the acknowledge packet (which takes about 300mS), then I wait about 200mS before sending the next value. That seems quite slow to me. Is that still too fast for the line graphs to work?


#11

For what it’s worth I ended up going with a 1000mS delay between packets, but then I only take three readings every 5 minutes so it’s not a big deal in my case.


#12

I’ll tag @rsiegel but I’d say it probably is too fast. From what I’ve seen in the past the default rate to send values back to Cayenne was every 5-10 seconds. Cayenne is meant to be more of a general display of what’s going on rather than a this is the value at this very second kind of thing. To put it another way, hundreds of thousands to millions of devices sending packets faster than every 1 second uses a ton of bandwidth and processing power.


#13

I would aim for 10+ seconds for sending data from any MQTT device. I don’t have any reason to say a feature like the line chart wouldn’t work with more frequent samples, just that our Engineering Manager said he would throttle people if they were sending data more than once a second. :slight_smile:

That being said, about the line chart:

  • It is expected that the “Live” tab is missing for MQTT and LoRa connected devices, nothing has gone wrong here, this is simply a design choice and partially reflective of the fact that we’re not expecting these devices to update so frequently. The Live tab should still appear for Pi and Arduino devices connected through their own connectivity options in the Cayenne UI. It may re-appear for MQTT/LoRa devices in the future but I’m not aware of any immediate plans to do so.

  • I expect that the “No Data Available for this period” message should clear as soon as there is sufficient data in each of the tab views. For the hour view this should be no more than 60 minutes, and for the day view no more than 24 hours, and so on. If you’re still seeing a blank line chart and your device has been connected sending data for longer than those times, we might be onto some sort of a bug.

If you find one or more of your MQTT widgets in that state, it would help me to troubleshoot if you could try the steps in this post to extract the data that we have stored for that widget and shared with me at support@mydevices.com so I can investigate. Or PM me with your account credentials and a mention of the problem widget(s) and I’d be happy to extract/investigate myself.


#14

Maybe my earlier post was misleading. I’m not sending data continuously at that rate. The fastest update period we would ever use would be 1 minute and probably every 10 minutes would be typical. However for each update we may send 3 or 4 different parameters and the timing figures I gave earlier represent the intervals between these parameters only.

It also seems strange to me that the instantaneous values one gauges etc, all update correctly. It’s just the line graphs which always report no data, regardless of how long I leave it.


#15

Yeah, my impression is that the update rate for the device is wholly unrelated to any issues with populating the line chart. I just wanted to answer the question about expected publish rates.

Can you let me know what type (units, values) of data you’re sending to the widget(s) that are having trouble populating like this. I suspect it’s probably an issue on our back end and nothing you can resolve on your own, so I’d like to set up a reproduction case and investigate with our engineers.


#16

Sure. I’ll email you at support@mydevices.com and give you access to one of our units which is just a test unit anyway.


#17

Thanks for the email @mulder.roy, I think I’m much closer to why this is happening now, though I don’t have a fix just yet.

In investigating your account (as well as discovering this same behavior on some devices on one of my test accounts), I can see that there are 404 errors returning each time these data history graph tabs are clicked on the problem widgets. Here is a screenshot from one of my test accounts:

This at least explains pretty well that this is ultimately a data retrieval issue on our end and not some problem with the data send rate. I’ll investigate with our IT/Engineering why these 404’s might be occurring so we can ultimately put a stop to them. If anyone else is seeing empty line charts, I’d be curious if you’re seeing 404’s like this in the browser console (View > Developer > Javascript Console on Chrome)


#18

I have found the same error message


#19

Thanks for sharing this data @sidmarc12, we do have an engineer looking at this specific issue now, I’ll update as soon as we have more information.


#20

I’m also having the same issue. I installed the Cayenne app on my Android device and the live chart appears to be working there.


Edit:
Seems like suddenly It’s collected enough data to allow me to use the chart through the browser:

Live and minutes scales still aren’t available though.


#21

Glad that the 404s resolved for you @jonmacd, we’re still looking in to the root cause for them in the general case.

As far as the Line Chart missing ‘Live’ and ‘Minute’ views, this is expected behavior for MQTT and LoRa devices on Cayenne at the moment. Raspberry Pi and Arduino devices not connected through the MQTT API should still have these tabs. This is due to a difference in how the data is stored in different databases on our back end.


#22

Just wondering if there is any progress on this issue for MQTT?


#23

do you using MQTT?