Thank you for taking the time to submit your bug/issue! Please use the points below as a guide when submitting.
- What dashboard are you using? (Web, iOS, Android)
*Cayenne is not connecting, it shows OFFLINE
Is it down for maintenance ?
Thank you for taking the time to submit your bug/issue! Please use the points below as a guide when submitting.
*Cayenne is not connecting, it shows OFFLINE
Is it down for maintenance ?
Hi @kirmaqtech, welcome to the Cayenne Community!
We are not down for maintenance or any other expected downtime. What exactly is the issue, you are seeing an individual Pi or Arduino as offline? Something else?
hello @rsiegel , I am still having problems with the connection (I am using nodemcu esp8266-12). It manteins connected by 30-40 minutes and then go down.
In android, last version of Cayenne not connect my devices here with me.
Can you think what would do?
my sketch: (all sensors and buttons is working fine untill I lose connection. the only way to reconnected is clicking RESET on board.)
thanks man!
/*
Cayenne DS18B20 Example
This sketch shows how to send temperature data to a DS18B20 Sensor in the Cayenne Dashboard.
The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.
Steps:
Install the OneWire library (http://www.pjrc.com/teensy/td_libs_OneWire.html) from the Arduino Library Manager.
Install the DallasTemperature library (http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library#Code.2FLibrary) from the Arduino Library Manager.
In the Cayenne Dashboard add a new DS18B20 widget.
Set the widget to Value Display.
Select Virtual Pins and a virtual pin number.
Set VIRTUAL_PIN to the pin number you selected.
Attach a DS18B20 to an digital pin on your Arduino.
Schematic:
[Ground] – [DS18B20] – [4.7k resistor] – [5V]
|______________|
|
Digital Pin
Set the tmpPin variable to match the pin used to connect the DS18B20.
Set the token variable to match the Arduino token from the Dashboard.
Compile and upload this sketch.
Once the Arduino connects to the Dashboard it should automatically update the DS18B20 widget with data.
*/
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>
#include “CayenneDefines.h”
#include “BlynkSimpleEsp8266.h”
#include “CayenneWiFiClient.h”
#include <ESP8266WiFi.h>
// Virtual Pin of the DS18B20 widget.
#define VIRTUAL_PIN1 V1
#define VIRTUAL_PIN2 V2
#define VIRTUAL_PIN3 V3
#define VIRTUAL_PIN4 V4
#define VIRTUAL_PIN5 V5
// Digital pin the DS18B20 is connected to. Do not use digital pins 0 or 1 since those conflict with the use of Serial.
const int tmpPin = 2;
OneWire oneWire(tmpPin);
DallasTemperature sensors(&oneWire);
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “tt”;
char ssid[] = “WiFi”;
char wifiPassword[] = “tr8”;
void setup()
{
Serial.begin(115200);
Cayenne.begin(token, ssid, wifiPassword);
sensors.begin();
}
void loop()
{
Cayenne.run();
}
// This function is called when the Cayenne widget requests data for the Virtual Pin.
CAYENNE_OUT(VIRTUAL_PIN1)
{
// Send the command to get temperatures.
sensors.requestTemperatures();
// This command writes the temperature in Celsius to the Virtual Pin.
Cayenne.virtualWrite(VIRTUAL_PIN1, sensors.getTempCByIndex(0));
// To send the temperature in Fahrenheit use the corresponding code below.
//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}
CAYENNE_OUT(VIRTUAL_PIN5)
{
// Send the command to get temperatures.
sensors.requestTemperatures();
// This command writes the temperature in Celsius to the Virtual Pin.
Cayenne.virtualWrite(VIRTUAL_PIN5, sensors.getTempCByIndex(0));
// To send the temperature in Fahrenheit use the corresponding code below.
//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}
CAYENNE_OUT(VIRTUAL_PIN2)
{
// Send the command to get temperatures.
sensors.requestTemperatures();
// This command writes the temperature in Celsius to the Virtual Pin.
Cayenne.virtualWrite(VIRTUAL_PIN2, sensors.getTempCByIndex(1));
// To send the temperature in Fahrenheit use the corresponding code below.
//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}
CAYENNE_OUT(VIRTUAL_PIN3)
{
// Send the command to get temperatures.
sensors.requestTemperatures();
// This command writes the temperature in Celsius to the Virtual Pin.
Cayenne.virtualWrite(VIRTUAL_PIN3, sensors.getTempCByIndex(2));
// To send the temperature in Fahrenheit use the corresponding code below.
//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}
CAYENNE_OUT(VIRTUAL_PIN4)
{
// Send the command to get temperatures.
sensors.requestTemperatures();
// This command writes the temperature in Celsius to the Virtual Pin.
Cayenne.virtualWrite(VIRTUAL_PIN4, sensors.getTempCByIndex(3));
// To send the temperature in Fahrenheit use the corresponding code below.
//Cayenne.fahrenheitWrite(VIRTUAL_PIN, sensors.getTempFByIndex(0));
}
I’m not sure if this could be the case, but I know most (all?) of our sketches generally use a baud rate of 9600, maybe try changing to this and seeing if stability improves?
Hi
How are you powering your ESP?
Does your power supply provide at least 500mA?
Are you powering via USB from a netbook, etc.?
Maybe energy managment “sleeps” the USB ports.
Sometimes those ports don´t provide the needed current…
Some information about the power management:
Currently ESP8266 can support three low power modes: Light Sleep, Modem Sleep and Deep Sleep.
①:Modem-Sleep requires the CPU to be working, as in PWM or I2S applications. According to 802.11 standards (like U-APSD), it saves power to shut down the Wi-Fi Modem circuit while maintaining a Wi-Fi connection with no data transmission.
E.g. in DTIM3, to maintain a sleep 300ms-wake 3ms cycle to receive AP’s Beacon packages, the current is about 15mA.
②:During Light-Sleep, the CPU may be suspended in applications like Wi-Fi switch. Without data transmission, the Wi-Fi Modem circuit can be turned off and CPU suspended to save power according to the 802.11 standard (U-APSD).
E.g. in DTIM3, to maintain a sleep 300ms-wake 3ms cycle to receive AP’s Beacon packages, the current is about 0.9mA.
③:Deep-Sleep does not require Wi-Fi connection to be maintained. For application with long time lags between data transmission, e.g. a temperature sensor that checks the temperature every 100s.
E.g. sleep 300s and waking up to connect to the AP (taking about 0.3~1s), the overall average current is less than 1mA.
More info at: ESP8266 Power Consumption - ESP8266 Developer Zone
thank you everyone.
My problem of stability was solved changing the baud rate to 9600 and with external power supply .
But now, my data from ds18b20 is floating from -127ºC to 85ºC everytime and sometimes show the right temperature. Do you think what I can do? --------> solved = bad connection with jumpers
My android app sends me the message SERVER ERROR.
Thank you for your time and teachings.
Try to open and close the android app. Mine is shown the same sometimes. This problem came after I updated the app. I will report this bug to the creators.