Cayenne dashboard freeze

Hi all

First I’m not write good English or code expert :pensive:

I have little project where is
1 → Raspberry pi 3 (control arduino and it’s connected lan) and there is Jessie OS
1 → Arduino Uno (control my sensor etc… connected to Rpi3 with usb-cable)
1 → USB hub (connected Uno and Rpi3)
6 → d18s20 temp sensors
2 → Relays (control water pump and fan)
4 → Moisture sensors
2 → water level sensors

Relays, water level sensors and moisture sensors are controlled by Cayenne dashboard. Only code what I have done is temperature sensor code and uptime (see below). Problem is that Cayenne dashboard freezing (after about 1- 10min) when I run script. Also arduino are freezing and last online status continue running without no control. I have change usb-cables, internet connections, reinstalled Rpi3, arduino codes… etc… I can’t trust that everything works well when I leave my greenhouse. I can do arduino code where everything this works (without cayenne and everything this) but this cayenne dashboard etc… is so good :sunglasses: mobile control etc… I like

if I add more code to my arduino, cayenne dashboard goes online but freeze immediately. If I run only temp sensors code all works fine. Same situation is all other sensors if I run sensors one by one. Everything works fine if I run one by one but if I add evrything in the same code dashboard will freeze. Maybe Uno can’t handle so many sensors but if look forum there is much more difficult system and one arduino :smile: I don’t understand what is wrong. Sorry this code are not full english but I think you can handle that.

#include <CayenneSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define CAYENNE_PRINT Serial

#define VIRTUAL_PIN1 V1
#define VIRTUAL_PIN2 V2
#define VIRTUAL_PIN3 V3
#define VIRTUAL_PIN4 V4
#define VIRTUAL_PIN5 V5
#define VIRTUAL_PIN6 V6
#define VIRTUAL_PIN13 V13

const int tmpPin1 = 3;

OneWire oneWire1(tmpPin1);
OneWire oneWire2(tmpPin1);
OneWire oneWire3(tmpPin1);
OneWire oneWire4(tmpPin1);
OneWire oneWire5(tmpPin1);
OneWire oneWire6(tmpPin1);

DallasTemperature sensors1(&oneWire1);
DallasTemperature sensors2(&oneWire2);
DallasTemperature sensors3(&oneWire3);
DallasTemperature sensors4(&oneWire4);
DallasTemperature sensors5(&oneWire5);
DallasTemperature sensors6(&oneWire6);

char token[] = "xxxxxx";

void setup()


void loop()

Cayenne.celsiusWrite(VIRTUAL_PIN1, sensors1.getTempCByIndex(0));

Cayenne.celsiusWrite(VIRTUAL_PIN2, sensors2.getTempCByIndex(1));
Cayenne.celsiusWrite(VIRTUAL_PIN3, sensors3.getTempCByIndex(2));
Cayenne.celsiusWrite(VIRTUAL_PIN4, sensors4.getTempCByIndex(3));
Cayenne.celsiusWrite(VIRTUAL_PIN5, sensors5.getTempCByIndex(4));
Cayenne.celsiusWrite(VIRTUAL_PIN6, sensors6.getTempCByIndex(5));
  CAYENNE_LOG("Data requested for Virtual Pin %d", VIRTUAL_PIN13);
  Cayenne.virtualWrite(VIRTUAL_PIN13, millis() / 60000);


The beginning of the code was left out

#include CayenneSerial.h
#include OneWire.h
#include DallasTemperature.h
#define CAYENNE_PRINT Serial
  • BR MH

Hi @mattiheikkinen84,

It seems like a really cool project! And your English is very good :slight_smile:

Hmmm. What do you mean by dashboard freeze? The data is not coming into the widgets?


Hi @bestes,

Thanks. Yes data is not coming into the widgets. There is another chain here too…

and I will test now this…(what @adam says) → you cant use the serial output to display messages in the serial console That maybe problem in my code.