<commit_before>'use strict';

var zigbee = require('./index');
var Table = require('cli-table');
var when = require('when');
var ZCLCluster = require('./lib/zcl').ZCLCluster;
var ResetHue = require('./lib/util/ResetHue');

var Concentrate = require('concentrate');

var glob = require('glob');

glob('/dev/cu.usbmodem*', function (err, devices) {
	// TODO: Support the CC2530 on the Sphere.
	if (err || devices.length != 1) {
		//throw new Error('Found ' + devices.length + ' devices that could be the CC2531 usb dongle.');
  }

  connect(devices[0]);
});

//connect('/dev/cu.usbmodem1411');

function connect(path) {

	zigbee
		.connectNetworkProcessor(path)
		.then(function(zigbeeClient) {
			// Display some version information
			return zigbeeClient.firmwareVersion().then(function(version) {
				console.log('Firmware version: %s %d.%d.%d', version.type,
					version.specifics.majorRelease, version.specifics.minorRelease,
					version.specifics.maintenanceRelease);
			})
			/*/ reset our device so we get back to a clean state
			.then(function() {
				return zigbeeClient.resetDevice(true);
			})//*/
			// and now initiate our coordinator
			.then(function() {<commit_msg>Don't reset every time =)<commit_after>'use strict';

var zigbee = require('./index');
var Table = require('cli-table');
var when = require('when');
var ZCLCluster = require('./lib/zcl').ZCLCluster;
var ResetHue = require('./lib/util/ResetHue');

var Concentrate = require('concentrate');

var glob = require('glob');

glob('/dev/cu.usbmodem*', function (err, devices) {
	// TODO: Support the CC2530 on the Sphere.
	if (err || devices.length != 1) {
		//throw new Error('Found ' + devices.length + ' devices that could be the CC2531 usb dongle.');
  }

  connect(devices[0]);
});

//connect('/dev/cu.usbmodem1411');

function connect(path) {

	zigbee
		.connectNetworkProcessor(path)
		.then(function(zigbeeClient) {
			// Display some version information
			return zigbeeClient.firmwareVersion().then(function(version) {
				console.log('Firmware version: %s %d.%d.%d', version.type,
					version.specifics.majorRelease, version.specifics.minorRelease,
					version.specifics.maintenanceRelease);
			})
			//*/ reset our device so we get back to a clean state
			.then(function() {
				return zigbeeClient.resetDevice(true);
			})//*/
			// and now initiate our coordinator
			.then(function() {
{'fraction_non_alphanumeric': 0.15889029003783103, 'fraction_numerical': 0.011769651113913409, 'mean_word_length': 4.0210970464135025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2695131', 'n_tokens_mistral': 846, 'n_tokens_neox': 743, 'n_words': 186}