Simple Forwarding
A Cloud Action can be used to forward events to another Stream. To enable this functionality, set Output to Write to stream. For example, you could use this to compute a status like an alert state on the cloud, and generate a new event with the alert information including the device, value, the date/time when the alert was posted into the company stream for alerts, etc.:
function(event) {
var deviceName = event.path.split("/")[3];
return {
"/my_company/alerts": [{"elems": {"device": deviceName, "alert": "too Hot!"}}]
}
}
Modify this code as required, to write to another stream.
The Stream with path "/my_company/alerts" must exists !
Updated almost 5 years ago