Overview of the Cayenne-MQTT-Esp8266.h commands

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).

1 Like

Hello Sir,
This page may help you? GitHub - myDevicesIoT/Cayenne-MQTT-ESP: Cayenne MQTT ESP8266, ESP32 & NodeMCU Library

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.

I do not know other place :frowning: Sorry

Hi @theovanderkrogt,

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

-Benny

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: Cayenne-MQTT-ESP/CayenneArduinoMQTTClient.h at master · myDevicesIoT/Cayenne-MQTT-ESP · GitHub

1 Like

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.

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
1 Like

Thanks very much!

This may help you as well

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

1 Like

Hi @theovanderkrogt,

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

-Benny

1 Like