Following this demo here exactly. The only difference is that I am using an edison instead of arduino.
This is my server code app.js.
var Cylon = require('cylon');
Cylon.robot({
name: 'chappie',
connections: {
edison: { adaptor: 'intel-iot' }//,
//led: { driver: 'led', pin: 13 }
},
devices: {
maxbotix: { driver: 'maxbotix', pin: '0' },
led: { driver: 'led', pin: 13 }
},
work: function (my) {
/*
STUFF TO DO!
*/
}
})
Cylon.api(
'socketio',
{
host: '0.0.0.0',//Is this correct??
port: '3000'
});
Cylon.start();
The 'blink-client' is exactly the same as in the demo except I am hardcoding the actual IP to the edison where we define the device. ie
device = io('http://ip of edison:3000/api/robots/chappie/devices/led');
When I runn app.js, the socketIO server correctly launches and I see
[2015-02-17T20:04:12.813Z] INFO -- : Initializing connections.
[2015-02-17T20:04:13.116Z] INFO -- : Initializing devices.
[2015-02-17T20:04:14.646Z] INFO -- : Starting connections.
[2015-02-17T20:04:14.650Z] INFO -- : Starting devices.
[2015-02-17T20:04:14.667Z] INFO -- : Working.
[2015-02-17T20:04:14.703Z] INFO -- : Cylon API Server is now online.
[2015-02-17T20:04:14.704Z] INFO -- : Listening at https://127.0.0.1:3000
But when I try and run the blink-client.html in a browser on a PC on the same network I get the ERR_CONNECTION_REFUSED
I am using cylon-api-socketio version "0.2.2" and nodejs version 0.10.28.
In the client PC in a browser if I simply go to
http://actual ip of edison
I correctly see the default page for the edison showing me that I have the correct IP and my app.js is running.
Really not sure what my next debugging steps should be. Any help appreciated!