Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JArau
New Contributor I
1,683 Views

The Intel Iot Platforms: Cloud Analytics Data Transfer Issue

Hi,

I am having an issue with the chart on the DashBoard Analytics. When I see the charts, to be able to see the graphing on the reading temperature, in this case, it only shows me from one time period of 16 minutes 12:45 to 13:01. I do not understand why is doing that, it should be continuously showing data (moving) since the sensor is still reading and the edison should be processing the sketch over and over (void loop()). Even if I tried to increase the time period in the Customize time period, it always just reset to 12:45 - 13:01, I also have tried refreshing it, but nothing is like it stops reading at 13:01. Anyone know how to deal with this? Is this how is suppose to work or I am doing something wrong when uploading my sketch from the IDE Arduino? I was thinking of using another Cloud, but I was not sure of what to use.

Thanks in advance!

6 Replies
Pablo_M_Intel
Employee
43 Views

Hi Jeanfranco,

Could you please provide some more information about the issue?

  • Which IDE are you using?
  • Which guide are you following to use the Analytics Dashboard?
  • Which Edison image are you currently using?
  • Did you have any trouble installing the local agent?

Regards,

Pablo

JArau
New Contributor I
43 Views

Hi Pablo,

I am using the Arduino IDE to upload my sketches to the Edison

I used the Getting Started cloud analytics guide: https://software.intel.com/en-us/intel-iot-platforms-getting-started-cloud-analytics Intel® IoT Platforms: Getting Started: Cloud Analytics | Intel® Developer Zone

I used the latest image as far as I know Then I changed it to a previous version to try a sketch boot, since that did not work, I am going to re-flashed to the latest again: https://downloadmirror.intel.com/25871/eng/iot-devkit-prof-dev-image-edison-20160315.zip Release 3.0 Yocto* complete image . What do you mean with the local agent? I think I probably installed while following the getting started guide. My issue is that when checking the information that is send from the edison to the cloud, it stops after certain amount of time. I do not understand why since it should just keep sending data. I wrote the sketch that I am using below. Thank you for your reply!

# include

//# include

//# include "rgb_lcd.h"

# include // include IoTkit.h to use the Intel IoT Kit

# include // must be included to use IoTkit

# include

//const int pinButton = 3; // pin of button define here

//const int pinSound = A0; // pin of Sound Sensor

const int pinTemp = A1; // pin of temperature sensor

const int pinLight = A2; // pin of light sensor

const int pinGas = A3; // pin of the gas sensor

IoTkit iotkit; // create an object of the IoTkit class

double temperature, soundLevel,lightLevel, GasLevel;

int B=3975; // B value of the thermistor

//

void setup()

{

Serial.begin(115200);

configDevice();

}

void loop()

{

temperature = GetTemperature();

// soundLevel = GetSound();//soundLevel

lightLevel = GetLight(); //lightLevel

GasLevel = GetGas(); //gas level

iotkit.send("temperature", temperature);

iotkit.send("light", lightLevel);

// iotkit.send("sound", soundLevel);

iotkit.send("Gas",GasLevel);

delay(2000); //2000

}

void configDevice()

{

// Additional time to open let the system catch up

delay(10000);

// Check connectivity

system("iotkit-admin test > /dev/ttyGS0 2>&1");

// Change the device-id

system("iotkit-admin set-device-id 02-00-86-97-7b-16 > /dev/ttyGS0 2>&1");

// After activation we should restart iotkit-agent service

// If your installation is local, execute scripts start-agent.sh and stop-agent.sh instead providing full path to them

system("systemctl stop iotkit-agent > /dev/ttyGS0 2>&1");

delay(5000);

system("systemctl start iotkit-agent > /dev/ttyGS0 2>&1");

for(int i = 0; i < 3; i++)

{

delay(5000);

system("systemctl status iotkit-agent > /dev/ttyGS0 2>&1");

}

}

// // register sensor names

// iotkit.begin();

// Serial.println("Registering components");

//

// iotkit.send("{ \"n\": \"temperature\", \"t\": \"temperature.v1.0\"}\n");

// //iotkit.send("{ \"n\": \"humidity\", \"t\": \"humidity.v1.0\"}\n");

// iotkit.send("{ \"n\": \"GasSensor\", \"t\": \"GasSensor.v1.0\"}\n");

// //iotkit.send("{ \"n\": \"sound\", \"t\": \"sound.v1.0\"}\n");

// iotkit.send("{ \"n\": \"light\", \"t\": \"light.v1.0\"}\n");

//}

/* int GetSound()

{

int soundValue = analogRead(pinSound); //read the sensorValue on Analog 0

return soundValue;

}

*/

double GetTemperature()

{

double temperature;

float resistance;

double valTemp = analogRead(pinTemp); // get analog value

resistance=(float)(1023-valTemp)*10000/valTemp; // get resistance

temperature=1/(log(resistance/10000)/B+1/298.15)-273.15; // calc temperature

return temperature;

}

int GetLight()

{

int lightValue = analogRead(pinLight); //the light sensor is attached to analog 0

return lightValue;

}

int GetGas()

{

int gasValue = analogRead(pinGas);

return gasValue;

}

JArau
New Contributor I
43 Views

Just in Case, I am using this guide to flash to the latest image : http://www.intel.com/content/www/us/en/support/boards-and-kits/000005990.html# 2 Flashing Intel® Edison (Wired) Linux* Instructions for Intel® Edison...

Pablo_M_Intel
Employee
43 Views

Hi Jeanfranco,

Regarding the iot-agent, you are correct. If you followed the Cloud Analytics Getting Started guide you should have installed that successfully. About the flashing process, the document that you're using is no longer the document that you should be looking at. Here's the most recent one: /docs/DOC-98643 https://communities.intel.com/docs/DOC-98643.

I just checked your code and everything seems fine, I would suggest you to test the Temperature example from the https://github.com/enableiot/iotkit-samples/tree/master/arduino/IoTkit/examples Arduino library and code samples from GitHub and see if that one works in the same way. There are some other examples that might also be useful to check if the error repeats with every sample code.

Regards,

Pablo

Pablo_M_Intel
Employee
43 Views

Hi Jeanfranco,

Do you have updates on this? Have you been able to test the other sketches to see what your results are?

Regards,

Pablo

JArau
New Contributor I
43 Views

HI, sorry for the late replay,

I could not find an answer for my issue, but I did find the problem, which was in a message on the Arduino serial. It looks like my problems comes when trying to connect to the dashboard (The iotkit agent gives me error when check for the status). I already create another question regarding that issue.

Thank you for your help