Sensors not working/triggers wont save


First delete the widgets from the dashboard. try this code:

//  This Arduino sketch reads DS18B20 "1-Wire" digital
//  temperature sensors.
//  Copyright (c) 2010 Mark McComb, hacktronics LLC
//  License: (Go crazy)
//  Tutorial:
#define CAYENNE_PRINT Serial
#include <CayenneMQTTEthernet.h>

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "MQTT_USERNAME";
char password[] = "MQTT_PASSWORD";
char clientID[] = "CLIENT_ID";

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

// Assign the unique addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:

DeviceAddress  ColdStorage1Thermometer = { 0x28, 0xFF, 0xAC, 0xCF, 0x02, 0x17, 0x04, 0x55 };
DeviceAddress  CooldStorage2Thermometer = { 0x28, 0xFF, 0x6E, 0xED, 0x02, 0x17, 0x03, 0x00 };
DeviceAddress  ColdStorage3Thermometer = { 0X28, 0xFF, 0x34, 0x58, 0x02, 0x17, 0x05, 0xE5 };
DeviceAddress  GH1Thermometer        =   { 0x28 , 0xFF, 0xA2, 0xCD, 0x02, 0x17, 0x03, 0x73 };

void setup(void)
  // start serial port
  Cayenne.begin(username, password, clientID);
  // Start up the library
  // set the resolution to 10 bit (good enough?)
  sensors.setResolution( ColdStorage1Thermometer, 10);
  sensors.setResolution( CooldStorage2Thermometer, 10);
  sensors.setResolution(ColdStorage3Thermometer, 10);
  sensors.setResolution(GH1Thermometer, 10);

void loop(void)

  float tempC1 = sensors.getTempC(ColdStorage1Thermometer);
  if (tempC1 == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Cayenne.celsiusWrite(VIRTUAL_CHANNEL_1, tempC1);
  float tempC2 = sensors.getTempC(CooldStorage2Thermometer);
  if (tempC2 == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Cayenne.celsiusWrite(VIRTUAL_CHANNEL_2, tempC2);
  float tempC3 = sensors.getTempC(ColdStorage3Thermometer);
  if (tempC3 == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Cayenne.celsiusWrite(VIRTUAL_CHANNEL_3, tempC3);
  float tempC4 = sensors.getTempC(GH1Thermometer);
  if (tempC4 == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Cayenne.celsiusWrite(VIRTUAL_CHANNEL_4, tempC4);


This should auto add new green temporary widgets to your dashboard. Add them by clicking +


the above sketch did add two widgets but not other two dont appear to be responding to temperature change


Check you serial monitor if you are getting Error getting temperature


me bad


can you try the previous code again without the cayenne code and see if you can get reading from all the sensor.


I am back been out of town and had a host of problems with ethernet board and bad arduino board. Went back and sensors are all getting a reading. Loaded your last code it did add 4 wingets i saved them but do not respond to temperature change.


it shows 85 degrees on all four and the room is 70 degrees tried warming them up no response


can you start from fresh? first follow this tutorial (replace the esp8266 with arduino) and try getting reading from each sensor. Do not add the cayenne code.


Went thru both tutorials again earlier and this last one as you see all four sensors are reading and adjust to temperature change working fine. But when i go back to your code to get me working with cayenne i get this

I need to get this working plus alerts by oct first as i will be going in for cervical surgery and will be out of commission for some time


can you share the code you are using for getting sensor reading without the cayenne code (Serial monitor code)