This post is an extension of this one

####Install Skynet-AllJoyn First, run npm install skynet-alljoyn for AllJoyn support in gateblu.

Then, connect an inject node to a function node that is connected to gateblu. Edit the function node in your nodeblu setup to create a new subdevice for gateblu.

In the function node, you’re going to set up alljoyn as a subdevice in gateblu by replacing the ‘gateway uuid’ and ‘gateway token’ with the uuid and token listed in your gateblu page.

msg.uuid = 'gateway uuid'; 
msg.token = 'gateway token'; 
msg.alternateMethod = 'gatewayConfig';

msg.method = 'createSubdevice';
msg.name = 'aj';
msg.type = 'skynet-alljoyn';

msg.options = {
  advertisedName: 'test',
  interfaceName: 'org.alljoyn.bus.samples.chat',
  findAdvertisedName: 'org.alljoyn.bus.samples.chat',
  signalMemberName: 'Chat',
  messageServiceName: '/chatService',
  relayUuid: '*'
};

return msg;

gist by monteslu create new subdevice setup

after you have that, save to deploy the code. You only have to inject once to create the subdevice in gateblu. After hitting the inject node, check your subdevice page for the new alljoyn subdevice.

show alljoyn in skynet-gateway subdevice portal

Awesome! Now that we have Alljoyn available in gateblu, we can send notifications to the TV!

###Send a Notification to the TV Replace the content of the function node to set the subdevice of the msg to ‘aj’, and send the payload an object with a method of ‘notify’ and a message of ‘hello world’. send tv notification

Now, if you save that and hit the inject node, you should see ‘Hello World’ show up as a notification on the TV.