It sounds like from some of the posts that the triggers are now working. I tried BYOT with a
HUZZAH ESP8266 and the trigger didn’t work. Triggering on the onewire sensor temperature rise. No increment on the trigger counter either. Dashboard OK. Anything special I need to know?
Thanks,
John
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>
#include <CayenneMQTTESP8266.h>
#include <DHT_U.h>
#define DHTPIN 5
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress tempSensorA = { 0x28, 0xFF, 0x09, 0x61, 0x51, 0x17, 0x04, 0x97};
// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char ssid = “!!!”;
char wifiPassword = “!!!”;
char username = “!!!”;
char password = “!!!”;
char clientID = “!!!”;
unsigned long lastMillis = 0;
void setup()
{
Serial.begin(9600);
delay (5000);
Cayenne.begin(username, password, clientID);
sensors.begin();
sensors.setResolution(tempSensorA, 10);
dht.begin();
}
void loop()
{
Cayenne.loop();
//Publish data every 2 min.
if (millis() - lastMillis > 120000)
{
lastMillis = millis();
sensors.requestTemperatures();
Cayenne.fahrenheitWrite(9, sensors.getTempF(tempSensorA));
Cayenne.virtualWrite(1, dht.readTemperature(true),"temp","f");
long rssi = WiFi.RSSI();
Cayenne.virtualWrite(6, rssi, "rssi", "dbm");
}
}