To send data to the Favoriot platform, you can use REST, MQTT, or CoAP protocols. Here’s how to proceed with each:

1. REST API

  • Endpoint: https://apiv2.favoriot.com/v2/streams
  • Method: POST
  • Headers:
    • Content-Type: application/json
    • apikey: <Your API Key>
  • Body:
  {
    "device_developer_id": "<Your Device Developer ID>",
    "data": {
      "temperature": "25",
      "humidity": "60"
    }
  }

 

2. MQTT

  • Broker: mqtt.favoriot.com
  • Ports:
    • Non-secure: 1883
    • Secure (TLS/SSL): 8883
  • Credentials:
    • Username: <Your Device Access Token>
    • Password: <Your Device Access Token>
  • Publish Topic: <Your Device Access Token>/v2/streams
  • Message Payload:
  {
    "device_developer_id": "<Your Device Developer ID>",
    "data": {
      "temperature": "25",
      "humidity": "60"
    }
  }

 

3. CoAP

  • Endpoint: coap://coap.favoriot.com/v2/streams
  • Method: POST
  • Payload:
  {
    "method": "POST",
    "apikey": "<Your API Key>",
    "parameters": {
      "device_developer_id": "<Your Device Developer ID>",
      "data": {
        "temperature": "25",
        "humidity": "60"
      }
    }
  }

 

Ensure that your device is registered on the Favoriot platform and that you have the correct device_developer_id and apikey or device access token. For detailed information, refer to the Favoriot Platform Documentation.

 

Podcast also available on PocketCasts, SoundCloud, Spotify, Google Podcasts, Apple Podcasts, and RSS.

One response

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share This

Share this post with your friends!

Discover more from IoT World

Subscribe now to keep reading and get access to the full archive.

Continue reading