Jump to content









Photo

Device status always disconnected

device status disconnected

  • Please log in to reply
13 replies to this topic

#1 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 18 November 2014 - 02:59 PM

Hello,

 

I am having trouble with the status of my device. The device is sending dataStreams to Carriots but its status it's always shown in the web interface as disconnected.

 

The device sends these dataStreams every 15 seconds and the Data Stream Frequency is set to 1 min.



#2 mcastillo

mcastillo

    Carriots CEO

  • Administrators
  • 34 posts
  • LocationMadrid

Posted 18 November 2014 - 04:56 PM

Have you read this https://blog.carriot...t-applications/ ?

 

Hope it helps.

 

Enjoy Carriots!



#3 mcastillo

mcastillo

    Carriots CEO

  • Administrators
  • 34 posts
  • LocationMadrid

Posted 18 November 2014 - 05:04 PM

If everything is well configured on your side try to change Data Stream Frequency to 2 or 5 minutes, because 1 minute is the minimum and might cause some problems. 



#4 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 18 November 2014 - 05:20 PM

Yes I read that before, and like the guide states:

 

  • No_status – no status stream received in the expected time range defined by “Status Stream Frequency” device’s property. Data stream received.

Then the status of the device should be at least No_status.

 

Yeah I tried that and changed it to the default value (1440) and the status is still disconnected.

 

Also I don't know if mentioned this but our case is using only data streams.

 

Thank you for the replies!



#5 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 25 November 2014 - 02:38 PM

Hello,

 

Now I am even sending statusStreams and the internal status of the device is still disconnected. I checked and the dataStreams and the statusStreams are sent and received with no problem, but the device displays as "Disconnected" always, in fact, the staus has never been anything different than "Disconnected".



#6 arzondra

arzondra

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 27 November 2014 - 09:58 AM

Hello, I am having the same problems here, could please someone give us a solution for this problem?

 

EDIT: Here is the code I use to send the status streams, is something wrong? I'm using Arduino YÚN. The status and data streams are being received in Carriots.

 

void updateStatus(){

 

 Serial.println("Sending status stream");

 

 // convert the readings to a String to send it:

 String dataString = "{\"protocol\":\"v1\",\"checksum\":\"\",\"device\":\"";

 dataString += DEVICE;

 dataString += "\",\"at\":\"now\",\"data\":{\"cosas\":\"falsas\"}}";

 

 

 //API call

 sendData(dataString, "status/");

   

}

 

void sendData(String dataString, String apiPath) {

 // form the string for the APIKEY header parameter:

 String apiString = "carriots.apikey: ";

 apiString += APIKEY;


 // Send the HTTP POST request

 Process carriots;

 carriots.begin("curl");

 carriots.addParameter("-k");

 carriots.addParameter("--request");

 carriots.addParameter("POST");

 carriots.addParameter("--data");

 carriots.addParameter(dataString);

 carriots.addParameter("--header");

 carriots.addParameter(apiString);

 carriots.addParameter("https://api.carriots.com/" + apiPath);

 carriots.run();


 // If there's incoming data from the net connection,

 // send it out the Serial:

 while (carriots.available() > 0) {

char c = carriots.read();

Serial.write©;

 }

 

 Serial.println("");


}



#7 jpastor

jpastor

    Development leader

  • Administrators
  • 151 posts

Posted 28 November 2014 - 12:59 PM

Hello.

You can use a listener to check if your devices are changing.

- In "event section" select "Event Device Change State"
- In "if expression", type "true"
- In "then expression", send you an email with the status information

 

Attached File  listener.jpg   36.4K   25 downloads

 

Hope it helps

 



#8 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 28 November 2014 - 06:37 PM

Indeed that is exactly what I was doing. Currently I have one device in "no_status" and another in "disconnected", while the cpanel displays that both status and data streams are received (I can take some screenshoot if you need them). Data streams are sent every 15 seconds, and status streams are sent every 75 seconds. In both devices, Data Stream Frequency and Status Stream Frequency are set to 1440 (and I have also tested some other numbers such as 0, 1438, etc).

 

I think I am doing it right but for some reason it does not work.

 

Thank you for your replie.



#9 jpastor

jpastor

    Development leader

  • Administrators
  • 151 posts

Posted 01 December 2014 - 01:21 PM

Hello xafilox

 

Could you send information every 5 minutes to do some test?

 

 

Thank you



#10 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 03 December 2014 - 06:05 PM

Ok, I have been sending information from 18:39 to 18:59 every 5 minutes. The status did not change. 



#11 jpastor

jpastor

    Development leader

  • Administrators
  • 151 posts

Posted 15 December 2014 - 11:49 AM

Hello xafilox.

 

It's really strange.


We need to check that your user account is correct.
Could we do some checking with your user account? We may need to send some debugging streams



#12 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 15 December 2014 - 12:18 PM

Yes, of course, no problem. Check whatever you need.



#13 sdeancos

sdeancos

    Master of Puppets

  • Members
  • PipPipPip
  • 102 posts
  • LocationMadrid, Spain.

Posted 19 December 2014 - 10:49 AM

Hi xafilox,

 

We have been doing some tests and it seems that is working correctly, please we ask you again to try and tell us the result.

Thank you so much for your patience,

Best regards.



#14 xafilox

xafilox

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 20 February 2015 - 12:53 PM

Hi.

 

Sorry for not responding until now.

 

The problem is still the same. Data and status streams are being sent and appear at the control panel, but the device status does not change from disconnected.

 

Regards.







Also tagged with one or more of these keywords: device, status, disconnected

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users