Trigger is not working


@margettepv made some changes to your code and start with a new device and DO NOT add the widget from dashboard (add new). this code will automatically add a widget. then add the trigger.

int counter = 0;

unsigned long lastMillis = 0;

void setup() {
Cayenne.begin(username, password, clientID, ssid, wifiPassword);

void loop() {

	if (millis() - lastMillis > 10000) {
		lastMillis = millis();
		//Write data to Cayenne here. This example just sends the current uptime in milliseconds.
		Cayenne.virtualWrite(0, counter);

// Default function for processing actuator commands from the Cayenne Dashboard.
// You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_LOG(“Channel %u, value %s”,, getValue.asString());
//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError(“Error message”);


I wasn’t sure what you wanted me to trigger so I set it up as an email notify. Did not trigger. The run count on that trigger still shows 0.



I followed your provided instructions to add a new NodeMCU ESP8266 device and then tested three trigger variations on it - to fire the Widget button to ON when the set threshold value was reached. When it didn’t fire, I deleted the button widget and created a new button widget using a different channel number, deleted the initial triggers and then recreated new corresponding triggers. They also failed to fire.

Additionally, I deleted one of my REAL devices, updated the motion sensor code with the following: “Cayenne.virtualWrite(motionSMSON, HIGH, “digital_sensor”, “d”);”. I also used the automatically added digital sensor widget for the channel by clicking on the + sign and then created a trigger to fire an SMS when the widget went HIGH. The motion sensor widget on my device DOES properly indicate motion On and Off on the dashboard. However, the trigger does not fire…

Again, I had 10+ triggers set up for my four ESP’s that had worked without error for more than a month. ALL of them simultaneously stopped firing five days ago.

Below is the screenshots from the tests I just completed.


I am new to cayenne, only been on for a week now. I have never been able to get triggers to work. i thought i was doing something wrong but im sure now there is a bug.


let me check whether there is a bug with triggers and i will get back here.


Thanks for checking into it! If someone would like access to my account to check on it just let me know.


my triggers still dont work, has anyone looked into it?


The solution that works for me is that it seems that you should use plot for triggering not the meters for example. I mean if you use meters for triggering just add a plot and use the new plot for triggering. It works for me and a little bit strange thing!!! :slight_smile:



I was tested the triggers, the text notification. I make if the the temp below -2 C the send me a massge. But it doesnt work, just when i open the app or the we site, then send it. It always need to run in background or need always open the dashboard??? It doesnt good.
I wanna to make a complete ventilaton control system, but it neccesary to run without i Will open the app. For example, need change the ventilator speed belove -5 C to dont freeze the heat exchanger.
What do you think, it would be work or need find something else solution?


It was works, just need some delay


Hi @ericjsimerman,

We have looked into it and pushed some changes, can you test again?



Hi @margettepv,

We’ve made some changes for triggers, can you see if you are able to use triggers?



Hi @jfb820,

We pushed some changes for triggers, can you check again and see if they are back to working for you?



YES! We have triggers. It seems the only one that isn’t working is the on-off line.
Thank You!


Thanks for checking in. We’ll look into the on / off line triggers notifications.




Yesterday, I tested an SMS trigger and it worked! Today I went back to test a device to device trigger and that worked! However, the SMS trigger does not seem to be working today.

Many thanks for working to resolve these issues!


My earlier SMS test today that failed was on an actuator widget. After remembering that those are no longer usable to trigger an SMS, I tested SMS on a sensor widget and that fired just fine. So all appears good.

Thanks again for the Cayenne platform! Now that MQTT triggers are back in business I’m looking forward to rolling up my sleeves on some more projects.


the problem persists, I can not use the trigger in any way, neither with digital signals, nor with analog signals


If and then triggers not working


Triggers is not working long time.
My device - Raspberry Pi2
Not working Web/Android, SMS, email.

Please help me.