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:
-
Create your Cayenne account at http://www.cayenne-mydevices.com/
-
Add a new device using the BYOT API selection
-
Download the Cayenne library to your tool chain / IDE
-
Your board is powered on, connected to internet, and in your tool chain / IDE
-
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.