Notifications
Clear all

[Sticky] FAQ - FAVORIOT PLATFORM

4 Posts
3 Users
0 Reactions
1,662 Views
Mazlan Abbas
(@mazlan-abbas)
Posts: 93
Member
Topic starter
 

Dear All - Please check here first for the FAQ. We will keep on updating the FAQ! Thanks!

  1. FAVORIOT Platform Documentation
  2. How to Subscribe
  3.  
 
Posted : 04/04/2019 10:11 am
Topic Tags
jaywong
(@jaywong)
Posts: 4
New Member
 

Good afternoon, Sir.

I faced a major problem with how to send my data from  ESP32 to Favoriot Data Stream. I am total cannot understand the codings that I got it from Google. Can you simply explain the coding structures for me and my project team?

Thank you so much, Sir.

.

.

We cannot understand the codings below:

if (client.connect(server, 80)) {
// if (1) {
// the 'if' function is connected successfully, and it is if(1).
// the if function is executing
client.println("POST /v2/iot/streams HTTP/1.1");
client.println("Host: api.favoriot.com");

client.println(F("apikey:  abcdef")); // change it!

client.println("Content-Type: application/json");
client.println("cache-control: no-cache");
client.print("Content-Length: ");
int thisLength = json.length();
client.println(thisLength);
client.println("Connection: close");
client.println();
client.println(json);
Serial.println("asfas"); //testing is the 'if' function looping or not
}
while (client.available()) {
char c = client.read();
Serial.write(c);
}
if (!client.connected()) {
client.stop();
}

This post was modified 5 years ago 4 times by jaywong
 
Posted : 24/11/2019 7:52 pm
jaywong
(@jaywong)
Posts: 4
New Member
 

Can I get the format of URL to update the data to Favoriot?

 

 
Posted : 24/11/2019 8:39 pm
 Gops
(@gopish)
Posts: 31
Member
 

@jaywong

Please refer to the following post regarding connecting ESP32 to Favoriot Platform. The code and tutorial in given in the GitHib.

https://www.favoriot.com/forum/favoriot-iot-platform/esp32-to-favoriot-platform#post-189

 

 

 
Posted : 14/04/2020 9:49 am
Share:

Copyright © 2024 All rights reserved