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).
This page may help you? https://github.com/myDevicesIoT/Cayenne-MQTT-ESP8266
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 Sorry
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
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
Thanks very much!
This may help you as well