Overview of the Cayenne-MQTT-Esp8266.h commands


#1

Where can I find an overview of the Cayenne-MQTT-Esp8266.h library commands that can be used in Esp8266 programs? I can find some commands in the examples, but it is not clear if these are all the possibilities and what are the variables that need to be included. I couldn’t find this information in the library documents (as far as I could see).


#2

Hello Sir,
This page may help you? https://github.com/myDevicesIoT/Cayenne-MQTT-ESP8266


#3

Dear Sir,
Thanks for the response. I saw that page as well, but it doesn’t present all possible cayenne subroutines that can be called from the mainprogramme. At least as far as I can see.


#4

I do not know other place :frowning: Sorry


#5

Hi @theovanderkrogt,

Thanks for your question! @jburhenn perhaps you can help answer?

-Benny


#6

Hi @theovanderkrogt,

Sorry for the delay, I was out on vacation. The documentation for the functions and their parameters are contained in the code itself. Most of the functions you would use from your program are described in this file: https://github.com/myDevicesIoT/Cayenne-MQTT-ESP8266/blob/master/src/CayenneArduinoMQTTClient.h


#7

Thanks, that helped.
Still I have one question:

  • the general template to publish data on Cayenne is: Cayenne.virtualWrite(2, 50, TYPE, UNIT);
    But what TYPE’s and UNIT’s are possible?
    Thanks in advance.

#8

These are from the python library, but I think that they are all the same for the Cayenne dashboard:

# Data types
TYPE_BAROMETRIC_PRESSURE = "bp" # Barometric pressure
TYPE_BATTERY = "batt" # Battery
TYPE_LUMINOSITY = "lum" # Luminosity
TYPE_PROXIMITY = "prox" # Proximity
TYPE_RELATIVE_HUMIDITY = "rel_hum" # Relative Humidity
TYPE_TEMPERATURE = "temp" # Temperature
TYPE_VOLTAGE = "voltage" # Voltage

# Unit types
UNIT_UNDEFINED = "null"
UNIT_PASCAL = "pa" # Pascal
UNIT_HECTOPASCAL = "hpa" # Hectopascal
UNIT_PERCENT = "p" # % (0 to 100)
UNIT_RATIO = "r" # Ratio
UNIT_VOLTS = "v" # Volts
UNIT_LUX = "lux" # Lux
UNIT_CENTIMETER = "cm" # Centimeter
UNIT_METER = "m" # Meter
UNIT_DIGITAL = "d" # Digital (0/1)
UNIT_FAHRENHEIT = "f" # Fahrenheit
UNIT_CELSIUS = "c" # Celsius
UNIT_KELVIN = "k" # Kelvin
UNIT_MILLIVOLTS = "mv" # Millivolts

#9

Thanks very much!


#10

This may help you as well

http://mydevices.com/cayenne/docs/#bring-your-own-thing-api-supported-data-types


#11

Hi @theovanderkrogt,

If you end up building a project with Cayenne, let us know about it in our ‘projects made with Cayenne’ category.

-Benny