Device > Edge Actions - why do return streams go to :default?

For Device > Edge Actions why does the returned data appear in the stream >> :default
Is it possible to send it to another stream or is this intended behaviour?

function(event) {
  var p1 = {};
  p1.weather = {}
  p1.weather.humidity = 30;
  p1.weather.pressure = 10000;
  p1.weather.temperature = 27.3;
  p1.weather.light = 23;
 
  return {   
    "cl://result1" : [JSON.stringify(p1.weather)]
  };

returns on a stream the following (note “path”: “/iinnovate/devices/john_test_yellow/:default”,)

{
  "creationDate": 1574266787550,
  "creatorId": "i000000000000000000000001",
  "elems": {
    "humidity": 30,
    "light": 23,
    "pressure": 10000,
    "temperature": 27.3
  },
  "generatedDate": 1574266822535,
  "hash": null,
  "id": "e5dd567a32992f07db5d81518",
  "lastEditDate": null,
  "location": null,
  "metadata": null,
  "path": "/iinnovate/devices/john_test_yellow/:default",
  "streamId": "s5db01378b8c3502a9e5c1f35",
  "tags": {
  }
}

Hey John,

This is the intended behavior: from edge actions, “cl://” events are received on the :default stream.
Then, you can do a cloud action to process it from :default.

Alternatively, your edge action could return a virtual resource “vr://” and then add an observation on this virtual resource that sends directly to the cloud (it will end up onto a specific stream then).

.Thibault.

1 Like

Hi Thibault

Great answer - Many thanks

John