How to Submit Your MQTT API Code to Cayenne!

Adding Support for the MQTT API

This document will help ensure that Cayenne’s Github repository stays organized as community members submit their code.


Code Standard to Follow

  • For coding style, try and copy what the current libraries do. You can use this library as an example to follow.

  • Please use Doxygen comments for your functions.

  • For code structure, try and follow what the current libraries do. You can use this library as an example to follow.


Readme

Please include details in the Readme on how to use the code, external links that should be visited, and setup guidelines for other users to get their board online.

You can organize the sections in the Readme similar to this:

Cayenne [board] Library Instructions

  • Include picture + description of board and what user can do with your code / tutorial!

What’s Needed

  • Include links to

  • the board hardware (e.g. an Arduino Uno),

  • components (e.g. a TMP36 temperature sensor & relay),

  • libraries (e.g. Cayenne Arduino Libraries)

  • and software (e.g. Arduino IDE)

Cayenne Setup

  • Include steps for user to get setup prior to uploading code to their device.

  • For example, it may look like this:

  1. Create your Cayenne account at http://www.cayenne-mydevices.com/

  2. Add a new device using the BYOT API selection

  3. Download the Cayenne library to your tool chain / IDE

  4. Your board is powered on, connected to internet, and in your tool chain / IDE

  5. You’re now ready to get your board connected in Cayenne!

Getting Your Board Online

  • Include code, dashboard screenshots, and instructions

Sending Data to Cayenne

  • Include code, dashboard screenshots, and instructions

Using Actuators with Cayenne

  • Include code, dashboard screenshots, and instructions

Submit Your Code

Create a new topic on the Cayenne Community and submit links to your repository in the API - Bring Your Own Thing category so anyone can access your code. Once your code has been tested by the community & Cayenne team, we will ask you to submit your code as a pull request to the myDevices Github page!


For any questions, contact @bestes on the Cayenne Community Forum.

1 Like

Can I use Intel Edison to connect with Cayenne will I get prize $50 for the MQTT API code.

Yes! But you must make Github pull request with included ‘tutorial’ in the ReadMe. So, it should look like this: GitHub - myDevicesIoT/Cayenne-MQTT-ESP: Cayenne MQTT ESP8266, ESP32 & NodeMCU Library

Does that make sense? This is so other user can follow you work :slight_smile:

-B