Bug Filed on 04-18-2016: Devices intermittently non-functional on android, but functional on web

What dashboard are you using? (Web, iOS, Android)
Web and android


What OS? (Jessie, Wheezy)
Jessie (AQ1-1) and Wheezy (AQ1-3)


What Model Pi?
B+


Please describe the bug / issue. Attaching any relevant screenshots would be very helpful!

Often when I try to access my devices on the android app I get a message popping up at the bottom of the screen saying “Disconnected from remote device”, and I can not do anything on the device. But at the same time I’m able to access the device through the web dashboard.
This happens intermittently and completely unpredictably, meaning I have a good internet access and I’m the same network, but sometimes I can’t connect and at other times I get the message “Connected to remote device” and I’m able to control it. When this happens on one device through the app it happens on all devices. So if I can connect to one device I can connect to all, and vice versa. I also get “Server error” when I try to do any configurations on the device when I get the connection error.


1 Like

Thanks for reporting this. We’ll look into it.

How long does the app stay disconnected? Also, are you able to tell us what Android build version you are using?

-B

I can’t say for sure, since it varies. But sometimes hours at a time.
I suspect that my chance to connect successfully via the android app increases if I first access the device via the web dashboard, but I might be wrong about that. Seems like I’m using version 0.0.46a.

Do you think you can download the Google Play store version and let us know if it continues to occur??

https://play.google.com/store/apps/details?id=com.mydevices.cayenne

-B

similar problem here.
samsung s7 edge.
everything was working a few days ago then today its all over the place sometimes I can hit a few relays off ( out of 16 ) and they work fine then sometimes I can hit them and it just spins forever.
I can run my python script from ssh terminal on my phone and hear/see it click off from the next room but cayenne is so intermittent. The cayenne web isnt working well either with the same problems of not shutting on/off after a press.

@bestes updated to version 1 from the play store yesterday. Today I accessed the app and still get the message “Disconnected from remote device”. Logged into the web dashboard on my computer and everything works fine there, but not from the app.

Also, as you can see from my screenshots, the two devices are on different networks (one getting internet directly from ethernet port), so it can’t be because of the network.

1 Like

Hi @vegetish,

We’ve released many updates to Android app since this topic was created…let us know if this is still issue,after download the latest build from the Google Play Store? Thanks!

-B

hello @bestes, 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:

  1. Install the OneWire library (OneWire Arduino Library, connecting 1-wire devices (DS18S20, etc) to Teensy) from the Arduino Library Manager.
  2. Install the DallasTemperature library (Miles Burton - Innovative engineering for pretty much anything) from the Arduino Library Manager.
  3. In the Cayenne Dashboard add a new DS18B20 widget.
  4. Set the widget to Value Display.
  5. Select Virtual Pins and a virtual pin number.
  6. Set VIRTUAL_PIN to the pin number you selected.
  7. Attach a DS18B20 to an digital pin on your Arduino.
    Schematic:
    [Ground] – [DS18B20] – [4.7k resistor] – [5V]
    |______________|
    |
    Digital Pin
  8. Set the tmpPin variable to match the pin used to connect the DS18B20.
  9. Set the token variable to match the Arduino token from the Dashboard.
  10. Compile and upload this sketch.
  11. 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 = “teoiptfsvt”;
char ssid = “WiFi”;
char wifiPassword = “tr06703798”;

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));
}