Custom Widgets not Updating/Working

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…

Do you have 3 widgets in your dashboard? If you don’t have a widget set up it won’t send the other values. As far as the values not actually updating…double check that they are on the correct virtual channel.

Thanks!

I have tried with 3 (and 4), but the latest test was with just one widget (which was on V1 during this test). I have configured V0, V1, V2, V3 to respond to requests, each of the last integers represents the virtual port (to make it easier for testing). No problem re the other values not coming through, the issue is nothing coming up in the widget itself once it’s configured as per the attached.

Cheers!

Further to this, I’m also finding that it’s sending through escape strings (ie: “c=%.3f”) when I use either:

Cayenne.celsiusWrite(V2, 192.22);

or

Cayenne.virtualWrite(V2, 102.22, TEMPERATURE, CELSIUS);

This is the output it’s generating:

[52856] >msg 20,5,4
>vr2
[52857] <msg 20,5,16
<vw2temp,c=%.3f
[53195] state 1, tconn 1

It’s not my original issue, but appears to be something else that’s not quite right.

Cheers!