{"action":"created","issue":{"url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/3","labels_url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/3/comments","events_url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/3/events","html_url":"https://github.com/hybridgroup/cylon-api-socketio/issues/3","id":58131141,"number":3,"title":"Sending custom data with events doesn't work","user":{"login":"jBachalo","id":247784,"avatar_url":"https://avatars.githubusercontent.com/u/247784?v=3","gravatar_id":"","url":"https://api.github.com/users/jBachalo","html_url":"https://github.com/jBachalo","followers_url":"https://api.github.com/users/jBachalo/followers","following_url":"https://api.github.com/users/jBachalo/following{/other_user}","gists_url":"https://api.github.com/users/jBachalo/gists{/gist_id}","starred_url":"https://api.github.com/users/jBachalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jBachalo/subscriptions","organizations_url":"https://api.github.com/users/jBachalo/orgs","repos_url":"https://api.github.com/users/jBachalo/repos","events_url":"https://api.github.com/users/jBachalo/events{/privacy}","received_events_url":"https://api.github.com/users/jBachalo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2015-02-18T21:30:50Z","updated_at":"2015-02-20T03:18:31Z","closed_at":"2015-02-19T17:05:31Z","body":"Running the demo server and client code with these 2 minor changes.\r\nOn the server I have (notice the addition data argument being passed)\r\n\r\n    turnOn: function () {\r\n        this.led.turnOn();\r\n        this.emit('turned-on', 'emit_data_from_server');\r\n        // also tried  this.emit('turned-on', {info:'custom message'});\r\n     },\r\n\r\nOn my client the handler is changed as so.  I checked the official socketIO documentation on how to handle custom event data, so this should work...\r\n\r\n    robot.on('turned-on', function (data) {\r\n            console.log('THE ROBOT JUST TURNED ON ITS LED!!! and data  is '+data);\r\n            //data is always undefined.....why?\r\n          });"},"comment":{"url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/comments/75183610","html_url":"https://github.com/hybridgroup/cylon-api-socketio/issues/3#issuecomment-75183610","issue_url":"https://api.github.com/repos/hybridgroup/cylon-api-socketio/issues/3","id":75183610,"user":{"login":"jBachalo","id":247784,"avatar_url":"https://avatars.githubusercontent.com/u/247784?v=3","gravatar_id":"","url":"https://api.github.com/users/jBachalo","html_url":"https://github.com/jBachalo","followers_url":"https://api.github.com/users/jBachalo/followers","following_url":"https://api.github.com/users/jBachalo/following{/other_user}","gists_url":"https://api.github.com/users/jBachalo/gists{/gist_id}","starred_url":"https://api.github.com/users/jBachalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jBachalo/subscriptions","organizations_url":"https://api.github.com/users/jBachalo/orgs","repos_url":"https://api.github.com/users/jBachalo/repos","events_url":"https://api.github.com/users/jBachalo/events{/privacy}","received_events_url":"https://api.github.com/users/jBachalo/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T03:18:31Z","updated_at":"2015-02-20T03:18:31Z","body":"Thanks will give that a try!\n\nOn Thu, Feb 19, 2015 at 5:59 PM, Edgar O Silva <notifications@github.com>\nwrote:\n\n> I have modified this branch:\n>\n> https://github.com/hybridgroup/cylon-api-socketio/tree/opts-for-socketio\n>\n> Where you can basically just pass the same options obj inside the robot\n> API definition like this:\n>\n> // ensure you install the API plugin first:// $ npm install cylon-api-socket-io\n> Cylon.api('socketio',\n> {\n> host: '0.0.0.0',\n> port: '3000',\n> options: {} // Options for socket.io\n> }\n> );\n>\n> Maybe that would solve your issue.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/hybridgroup/cylon-api-socketio/issues/3#issuecomment-75157296>\n> .\n>\n\n\n\n-- \n[c] 416.306.0036\n[w] www.bitstream.ca\n--------------------------------------------\n\"...all improvisation is life in search of a style.\"\n            - Bruce Mau,'LifeStyle'\n"}}