lib/dashboard/dashboard_operations.js
function dataCollectorHandler(data) {
		// debugDDC('New data', data['FIO0']);
		var diffObj = _.diff(data, self.dataCache);

		// console.log('Data Difference - diff', diffObj);
		// Clean the object to get rid of empty results.
		diffObj = _.pickBy(diffObj, function(value, key) {
			return Object.keys(value).length > 0;
		});

		var numKeys = Object.keys(data);
		var numNewKeys = Object.keys(diffObj);
		// console.log('Num Keys for new data', numKeys, numNewKeys);
		// console.log('Data Difference - pickBy', diffObj);
		self.dataCache = data;

		self.emit(device_events.DASHBOARD_DATA_UPDATE, diffObj);
	}
function dataCollectorHandler(data) {
		// debugDDC('New data', data['FIO0']);
		var diffObj = _.diff(data, self.dataCache);

		// console.log('Data Difference - diff', diffObj);
		// Clean the object to get rid of empty results.
		diffObj = _.pickBy(diffObj, function(value, key) {
			return Object.keys(value).length > 0;
		});

		var numKeys = Object.keys(data);
		var numNewKeys = Object.keys(diffObj);
		// console.log('Num Keys for new data', numKeys, numNewKeys);
		// console.log('Data Difference - pickBy', diffObj);
		self.dataCache = data;

		self.emit(device_events.DASHBOARD_DATA_UPDATE, diffObj);
	}
function dataCollectorHandler ( data ) { // debugDDC('New data', data['FIO0']); var diffObj = _ . diff ( data , self . dataCache ) ; // console.log('Data Difference - diff', diffObj); // Clean the object to get rid of empty results. diffObj = _ . pickBy ( diffObj , function ( value , key ) { return Object . keys ( value ) . length > 0 ; } ) ; var numKeys = Object . keys ( data ) ; var numNewKeys = Object . keys ( diffObj ) ; // console.log('Num Keys for new data', numKeys, numNewKeys); // console.log('Data Difference - pickBy', diffObj); self . dataCache = data ; self . emit ( device_events . DASHBOARD_DATA_UPDATE , diffObj ) ; }
Function that handles the data collection "data" events.  This data is the data returned by the read-commands that are performed. This data still needs to be interpreted saved, cached, and organized into "channels". Maybe?? The dashboard_data_collector has logic for each of the devices. This logic should probably be put there?
Function that handles the data collection data events . This data is the data returned by the read - commands that are performed . This data still needs to be interpreted saved cached and organized into channels . Maybe?? The dashboard_data_collector has logic for each of the devices . This logic should probably be put there?