Jump to content









Photo

Control datetime sensor data

Arduino sensor date time

  • Please log in to reply
4 replies to this topic

#1 patricio74

patricio74

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 March 2017 - 02:27 PM

Hello. I am developing a project using a gsm shield, an arduino uno and a sensor. I would like to control the day and time Arduino send sensor value. It is possible?. Thanks in advance.

#2 sdeancos

sdeancos

    Master of Puppets

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

Posted 07 March 2017 - 03:53 PM

Hi patricio74,

 

You can send "now" in 'at' field when you send the Carriots Stream from Arduino then in the Carriots Control Panel you show the datetime in Streams List.

 

For example:

 

{
    "protocol": "v1",
    "device": "defaultDevice@carriots",
    "at": "now",
    "persist": "true",
    "data": {
        "temperature": "20",
        "humidity": "50"
    }
}


You can learn more:
- https://www.carriots...agement#streams

- https://www.carriots...rduino_carriots

 

 

I hope this help you,

 

BR.



#3 patricio74

patricio74

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 March 2017 - 08:16 PM

Thanks for your response. So you can 'tell' to Arduino to send data at certain date and time?

#4 sdeancos

sdeancos

    Master of Puppets

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

Posted 08 March 2017 - 10:35 AM

In carriots rest api you can get the "now" datetime via http requests, with that information you can do some kind of planning on your arduino.


You can learn more in https://www.carriots...i-console/dates

 

 

--

 

Example:

 

Request
GET https://api.carriots.com/now/ 
Content-Type: application/json; charset=utf-8 
Carriots.apiKey: YOUR_APIKEY_HERE
Response Status
OK (200)
Response Headers
Date: Wed, 08 Mar 2017 10:31:16 GMT 
Content-Type: application/vnd.carriots.v2+json; charset=utf-8 
Connection: keep-alive 
Server: Carriots REST API 
Cache-Control: no-cache 
Response Body
{ "date": "2017-03-08T10:31:16+0000" }

 

 

BR



#5 patricio74

patricio74

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 08 March 2017 - 05:10 PM

Okay, I'll try it on my device. Thank you very much.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users