Triggering events from the outside


I have searched the forum briefly and have not found a relates topic so i will put it here.

The triggers are great, but what I really find as something that is missing is an outside trigger for something.
If I would have this, about 10 projects would emerge :slight_smile:

The idea would be, lets say someone adds a comment to my site, a little light blinks
I would just need an API call for device2 or something and trigger its event

The interface could be something like
Lets say you can have 5 api actions on each device

If “apiAction1” triggered
"turn on LED"

With that you can do whatever and it doesnt sound like something that hard to implement since you have the majority of the system

Is this something we could expect, or planned in the future?


I think that now you can code this functionality and then just send the state to the Cayenne. You can make a service and if you have new email, you can send value to the Cayenne or make other interesting stuff :slight_smile:


Could you point me to the documentation on this?
Its nice, but it still requires you to know every state beforehand. With an api you could easily set it in the interface alongside all your other triggers and change them around if needed. With your approach you would have half your triggers defined through the interface, and the other half through code sending states, which is not really maintainable if there is 10+ triggers


Yes, you are right, but they cannot implement every kind of interface, that’s why they have implemented “Bring your own thing”. What kind of outside triggers are you looking for? Also what kind of platform do you plan to use :wink:


Hmm yes, true, but from my perspective if there are events from arduinos it should be relatively easy to just trigger stuff via http request.
I am looking for something in the scope of
-> when something on the server happens, which could be a sent email, filled form, someone added a comment, someone registered/logged in
That we simply ping cayenne and make a Yun led turn on


You could have a sever that listens for these events and then sends an MQTT message to the Cayenne servers. Node-RED has some things built in like email and twitter, but you could create your own nodes for other services and send an MQTT message. Here is a guide I did a while back for integrating Node-RED and Cayenne Using Node-RED as a Local Fallback Server


These are all very good ways of achieving a similar effect, but for these I would need to setup a service just for this, set up mqtt, find a mqtt driver for my desired language and learn how to use it, and then integrate those 2 in a way that would not be a part of the nice “if then” interface.
Not to mention maintain these services, and educate others how to use them.
In my opinion, when http would be supported, you automatically decimate the learning curve, you basically have no setup, and can be played with from any server and any programming language since they all have http requests implemented and you’re probably already using them.

I think this would in turn provide better exposure and a much more convenient environment for developing projects. Not to mention integrating existing projects with cayenne.

Anyway, I love the cayenne idea and interface, yet the lack of this kind of functionality is basically all that is stopping me from making 10 projects, and integrating it into existing ones


I definitely think it’s something worth adding, just giving you a work around for now. But you are correct, it is quite a bit of setup to achieve this.


@adam thanks for your post about Node-Red. I really like this tool!

1 Like

I’ve been experiencing the same issues.
I have 3 Pi’s for devices at 3 separate outside locations on same network. Each Pi has same type of triggers but only one PI will activate the trigger (GPIO On/Off). Other two never trigger an event. Cayenne desktop and app interface will display GPIO activation but that’s all.