I’m having an issue where we have add a custom widget to my device, things stop working. It’s very weird, and occasionally it will work OK.
I have tried both Firefox and Chrome. I have deleted all my devices and widgets and tried with a single device and a single custom widget, and it never updates (it just displays a “-”). I’m always using a Virtual port. I have tried all the different types (Graph, Gauge etc), but I’m sticking with a “value” for the moment as it looks the simplest. If I add a sensor (I selected a TMP102), things work and the value is updated, so the events appear to be making it to the server OK.
-
Device & model you are using: This maybe the source of the issue, but it’s an ESP8266 (WeMos D1 mini v2)
-
What dashboard are you using? Web, I have tried in Firefox and Chrome
I have written the simplest of code to try and reproduce, this is what I’m using:
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
char ssid[] = "xxx"; // your network SSID (name)
char pass[] = "xxx"; // your network password
char token[] = "xxx"; // Cayenne authentication token.
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Cayenne.begin(token, ssid, pass);
}
void loop() {
// put your main code here, to run repeatedly:
Cayenne.run();
yield();
}
CAYENNE_OUT(V0)
{
Cayenne.virtualWrite(V0, 100.99);
}
CAYENNE_OUT(V1)
{
Cayenne.virtualWrite(V1, 101.11);
}
CAYENNE_OUT(V2)
{
Cayenne.virtualWrite(V2, 102.22);
}
CAYENNE_OUT(V3)
{
Cayenne.virtualWrite(V0, 103.33);
}
This is the output of the debug serial port, I can see in there the 101.11 getting sent to the server:
>vr1
[848916] <msg 20,188,12
<vw1101.110
[853252] state 1, tconn 1
[853919] >msg 20,189,4
>vr1
[853920] <msg 20,189,12
<vw1101.110
[858253] state 1, tconn 1
I’m hoping it’s just something silly but from all my research and testing I have not been able to figure anything out…