# Cool-looking dashboard for connected devices

**URL:** <https://community.particle.io/t/cool-looking-dashboard-for-connected-devices/4021>\
**Category:** General\
**Created:** [April 23, 2014, 3:03pm UTC](https://community.particle.io/t/cool-looking-dashboard-for-connected-devices/4021 "2014-04-23T15:03:03Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![krvarma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/krvarma/32/3089_2.png) [@krvarma](https://community.particle.io/u/krvarma)\
**Post date:** [September 17, 2014, 7:07pm UTC](https://community.particle.io/t/cool-looking-dashboard-for-connected-devices/4021/27 "2014-09-17T19:07:51Z")

</div>

@kennethlimcp, the following data source should work

```
(function () {
	var sseDatasource = function (settings, updateCallback) {
		var self = this;
		var currentSettings = settings;

        this.updateNow = function () {
            var eventSource = new EventSource("https://api.spark.io/v1/devices/" + currentSettings.deviceId + "/events/?access_token=" + currentSettings.accessToken);

            eventSource.addEventListener('open', function(e) { },false);

            eventSource.addEventListener('error', function(e) { },false);

            eventSource.addEventListener(currentSettings.event_name, function(e) {
                var parsedData = JSON.parse(e.data);
                
                updateCallback(parsedData.data);
            }, false);	
		}

		this.onDispose = function () {
	
        }

		this.onSettingsChanged = function (newSettings) {
			currentSettings = newSettings;

			self.updateNow();
		}
	};

	freeboard.loadDatasourcePlugin({
		"type_name": "SSE",
		"display_name": "SSE",
		"settings": [
			{
				name: "deviceId",
				display_name: "Device ID",
				description: 'Spark Core Device ID.',
				type: "text",
			},
			{
				name: "accessToken",
				display_name: "Access Token",
				description: 'Spark Core Access Token.',
				type: "text",
			},
			{
				name: "event_name",
				display_name: "Event Name",
				description: 'Event Name.',
				type: "text",
			}
		],
		newInstance: function (settings, newInstanceCallback, updateCallback) {
			newInstanceCallback(new sseDatasource(settings, updateCallback));
		}
	});
}());

```

I downloaded the [Freeboard.io](http://Freeboard.io) and added this plugin. It is working for me, let me know it works for you

---

_[View the full topic](https://community.particle.io/t/cool-looking-dashboard-for-connected-devices/4021)._
