Actuator Unreachable

My actuators won’t work after converting to MQTT, I’m using uno + esp8266, tried the lightswitch example but can’t get it to work even though the board is connected to Cayenne.

can you post the code you used to connect to cayenne??

My board connects successfully send sensor data but can’t control pins. Here is the code, I just removed the send sensor data function

#include <CayenneMQTTESP8266Shield.h>
char username = “”;
char password = “”;
char clientID = “”;
char ssid = “”;
char password1 = “”;
#define VIRTUAL_CHANNEL 1
#define ACTUATOR_PIN 4
#define EspSerial Serial
ESP8266 wifi(&EspSerial);
void setup()
{
Serial.begin(115200);
pinMode(ACTUATOR_PIN, OUTPUT);
Cayenne.begin(username, password, clientID, wifi, ssid, password1);
}

void loop()
{
Cayenne.loop();
}

CAYENNE_IN(VIRTUAL_CHANNEL)
{
int value = getValue.asInt();
CAYENNE_LOG(“Channel %d, pin %d, value %d”, VIRTUAL_CHANNEL, ACTUATOR_PIN, value);
// Write the value received to the digital pin.
digitalWrite(ACTUATOR_PIN, value);
}

add a custom button widget and select channel as 1.

CAYENNE_IN(1)
{
int value = getValue.asInt();
CAYENNE_LOG(“Channel %d, pin %d, value %d”, VIRTUAL_CHANNEL, ACTUATOR_PIN, value);
digitalWrite(ACTUATOR_PIN, value);
}

Thanks!, I tried to use the bring your own thing option and it seems to fix the problem. Other issue i noticed is that my Mega 2560 won’t connect to Cayenne if i connect the esp8266 on TX1RX1. Triggers are also not working for me

I’m in a similar boat. I’m using a Feather Huzzah and I’ve tried both using an Ardiuino setup and “bring your own device”. With the Arduino, if I add a slider, it shows the slider, but instead of a round ball on the slider, it’s a straight line and it will not move… nor send data.

If I use the “bring your own device”, it reads all the data I’m sending using MQTT to Cayenne, and I can see those values on the dashboard, but if I try to create any actuator, the device dropdown doesn’t show the device, though the device IS there and running.

you have to add custom widgets for BYOT.

Aha, okay will try that

Confirmed, this works!