updating deps, make consistent the lights icon path between filled/outline, beatDelay
|
|
@ -6,5 +6,6 @@
|
|||
Setting `disableAnalytics` to true will prevent any data from being sent.
|
||||
*/
|
||||
"disableAnalytics": true,
|
||||
"usePods": true
|
||||
"usePods": true,
|
||||
"port": 8080
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ export default Component.extend({
|
|||
chrome.storage.local.clear();
|
||||
location.reload();
|
||||
chrome.runtime.sendMessage({ action: 'stop-listening' });
|
||||
},
|
||||
email() {
|
||||
chrome.tabs.create({ url: 'mailto:contact@nidratech.com' });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
{{#content.menu-item onClick="clearAllSettings" }}
|
||||
{{paper-icon "settings backup restore" class=dimmerOnClass}} Reset settings
|
||||
{{/content.menu-item}}
|
||||
|
||||
{{#content.menu-item onClick="email" }}
|
||||
{{paper-icon "email" class=dimmerOnClass}} Contact
|
||||
{{/content.menu-item}}
|
||||
{{/menu.content}}
|
||||
{{/paper-menu}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default Component.extend({
|
|||
case 'HML003':
|
||||
case 'HML004':
|
||||
case 'HML005':
|
||||
src = 'phoenix_ceiling_pendant_table_wall';
|
||||
src = 'phoenix_ceiling';
|
||||
break;
|
||||
case 'HML006':
|
||||
src = 'phoenix_down';
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
"broccoli-asset-rev": "^2.2.0",
|
||||
"ember-cli": "^2.8.0",
|
||||
"ember-cli-app-version": "^3.0.0",
|
||||
"ember-cli-babel": "^5.1.5",
|
||||
"ember-cli-babel": "^6.0.0",
|
||||
"ember-cli-dependency-checker": "^1.2.0",
|
||||
"ember-cli-htmlbars": "^1.0.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.13.0",
|
||||
"ember-cli-release": "^1.0.0-beta.2",
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
"ember-export-application-global": "^2.0.0",
|
||||
"ember-inline-svg": "^0.1.7",
|
||||
"ember-load-initializers": "^1.0.0",
|
||||
"ember-modal-dialog": "^0.9.0",
|
||||
"ember-modal-dialog": "^1.0.0",
|
||||
"ember-notify": "^5.0.4",
|
||||
"ember-paper": "^1.0.0-alpha.19",
|
||||
"ember-resolver": "^4.0.0",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
|
|
@ -9,6 +9,7 @@ let isNone = function (obj) {
|
|||
// the main ember app controls may change these
|
||||
let state = {
|
||||
activeLights: [],
|
||||
beatDelay: 0,
|
||||
threshold: 0.2,
|
||||
hueRange: [0, 65535],
|
||||
brightnessRange: [1, 254],
|
||||
|
|
@ -25,13 +26,13 @@ let dancer = new window.Dancer(),
|
|||
kick;
|
||||
|
||||
// initialze the state
|
||||
chrome.storage.local.get('activeLights', ({activeLights}) => {
|
||||
chrome.storage.local.get('activeLights', ({ activeLights }) => {
|
||||
if (!isNone(activeLights)) {
|
||||
state.activeLights = activeLights;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('threshold', ({threshold}) => {
|
||||
chrome.storage.local.get('threshold', ({ threshold }) => {
|
||||
if (!isNone(threshold)) {
|
||||
state.threshold = threshold;
|
||||
}
|
||||
|
|
@ -48,38 +49,44 @@ chrome.storage.local.get('threshold', ({threshold}) => {
|
|||
kick.on();
|
||||
});
|
||||
|
||||
chrome.storage.local.get('hueRange', ({hueRange}) => {
|
||||
chrome.storage.local.get('beatDelay', ({ beatDelay }) => {
|
||||
if (!isNone(beatDelay)) {
|
||||
state.beatDelay = beatDelay;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('hueRange', ({ hueRange }) => {
|
||||
if (!isNone(hueRange)) {
|
||||
state.hueRange = hueRange;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('brightnessRange', ({brightnessRange}) => {
|
||||
chrome.storage.local.get('brightnessRange', ({ brightnessRange }) => {
|
||||
if (!isNone(brightnessRange)) {
|
||||
state.brightnessRange = brightnessRange;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('bridgeIp', ({bridgeIp}) => {
|
||||
chrome.storage.local.get('bridgeIp', ({ bridgeIp }) => {
|
||||
if (!isNone(bridgeIp)) {
|
||||
state.bridgeIp = bridgeIp;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('bridgeUsername', ({bridgeUsername}) => {
|
||||
chrome.storage.local.get('bridgeUsername', ({ bridgeUsername }) => {
|
||||
if (!isNone(bridgeUsername)) {
|
||||
state.bridgeUsername = bridgeUsername;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get('lightsData', ({lightsData}) => {
|
||||
chrome.storage.local.get('lightsData', ({ lightsData }) => {
|
||||
if (!isNone(lightsData)) {
|
||||
state.lightsData = lightsData;
|
||||
}
|
||||
});
|
||||
|
||||
// add listeners for appliation state change
|
||||
chrome.storage.onChanged.addListener(function ({activeLights, threshold, hueRange, brightnessRange, bridgeIp, bridgeUsername, lightsData}) {
|
||||
chrome.storage.onChanged.addListener(function ({ activeLights, threshold, beatDelay, hueRange, brightnessRange, bridgeIp, bridgeUsername, lightsData }) {
|
||||
if (activeLights) {
|
||||
state.activeLights = activeLights.newValue;
|
||||
}
|
||||
|
|
@ -89,6 +96,10 @@ chrome.storage.onChanged.addListener(function ({activeLights, threshold, hueRang
|
|||
kick.set({ threshold: state.threshold });
|
||||
}
|
||||
|
||||
if (beatDelay) {
|
||||
state.beatDelay = beatDelay.newValue;
|
||||
}
|
||||
|
||||
if (hueRange) {
|
||||
state.hueRange = hueRange.newValue;
|
||||
}
|
||||
|
|
@ -140,6 +151,12 @@ let stopListening = function () {
|
|||
}
|
||||
};
|
||||
|
||||
chrome.runtime.onMessageExternal.addListener(
|
||||
function (request, sender, sendResponse) {
|
||||
sendResponse({ installed: true });
|
||||
}
|
||||
);
|
||||
|
||||
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||
if (request.action === 'start-listening') {
|
||||
chrome.tabCapture.capture({
|
||||
|
|
@ -216,10 +233,12 @@ let simulateKick = (/*mag, ratioKickMag*/) => {
|
|||
|
||||
color = Math.floor(Math.random() * (state.hueRange[1] - state.hueRange[0] + 1) + state.hueRange[0]);
|
||||
|
||||
_stimulateLight(light, state.brightnessRange[1], color);
|
||||
setTimeout(function () {
|
||||
_stimulateLight(light, state.brightnessRange[0])
|
||||
}, timeToBriOff);
|
||||
setTimeout(() => {
|
||||
_stimulateLight(light, state.brightnessRange[1], color);
|
||||
setTimeout(function () {
|
||||
_stimulateLight(light, state.brightnessRange[0])
|
||||
}, timeToBriOff);
|
||||
}, state.beatDelay);
|
||||
}
|
||||
|
||||
state.paused = true;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Huegasm for Philips Hue Lights",
|
||||
"short_name": "Huegasm",
|
||||
"description": "Manage and synchronize your Philips Hue lights with the beat of your music.",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.6",
|
||||
"icons": {
|
||||
"16": "16x16.png",
|
||||
"48": "48x48.png",
|
||||
|
|
@ -23,6 +23,11 @@
|
|||
"default_popup": "index.html",
|
||||
"default_title": "Huegasm"
|
||||
},
|
||||
"externally_connectable": {
|
||||
"matches": [
|
||||
"http://www.huegasm.com/*", "http://localhost:*/*"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
"tabCapture",
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export default Component.extend({
|
|||
case 'HML003':
|
||||
case 'HML004':
|
||||
case 'HML005':
|
||||
src = 'phoenix_ceiling_pendant_table_wall';
|
||||
src = 'phoenix_ceiling';
|
||||
break;
|
||||
case 'HML006':
|
||||
src = 'phoenix_down';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.hoboman313.huegasm" version="1.2.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget id="com.hoboman313.huegasm" version="1.2.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>Huegasm</name>
|
||||
<content src="index.html" />
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.6.1" />
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
"broccoli-asset-rev": "^2.2.0",
|
||||
"ember-cli": "^2.11.0",
|
||||
"ember-cli-app-version": "^3.0.0",
|
||||
"ember-cli-babel": "^5.1.5",
|
||||
"ember-cli-babel": "^6.0.0",
|
||||
"ember-cli-dependency-checker": "^1.2.0",
|
||||
"ember-cli-htmlbars": "^1.0.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.13.0",
|
||||
"ember-cli-release": "^1.0.0-beta.2",
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
"ember-export-application-global": "^2.0.0",
|
||||
"ember-inline-svg": "^0.1.7",
|
||||
"ember-load-initializers": "^1.0.0",
|
||||
"ember-modal-dialog": "^0.9.0",
|
||||
"ember-modal-dialog": "^1.0.0",
|
||||
"ember-notify": "^5.0.4",
|
||||
"ember-paper": "^1.0.0-alpha.19",
|
||||
"ember-resolver": "^4.0.0",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Raleway" rel="stylesheet">
|
||||
|
||||
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/mbjanbdhcpohhfecjgbdpcfhnnbofooj">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
|
||||
|
|
|
|||
|
|
@ -1,21 +1,13 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
const {
|
||||
A,
|
||||
Component,
|
||||
computed,
|
||||
isEmpty,
|
||||
isNone,
|
||||
run: { later, scheduleOnce },
|
||||
inject,
|
||||
$
|
||||
} = Ember;
|
||||
const { A, Component,computed, isEmpty, isNone, run: { later, scheduleOnce }, inject, $, set } = Ember;
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ['container-fluid'],
|
||||
elementId: 'hue-controls',
|
||||
lightsData: null,
|
||||
|
||||
canTryChrome: false,
|
||||
activeLights: A(),
|
||||
tabList: ["Lights", "Music"],
|
||||
selectedTab: 1,
|
||||
|
|
@ -75,6 +67,8 @@ export default Component.extend({
|
|||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
let isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
||||
|
||||
if(!this.get('trial')) {
|
||||
this.updateLightData();
|
||||
setInterval(this.updateLightData.bind(this), 2000);
|
||||
|
|
@ -83,6 +77,20 @@ export default Component.extend({
|
|||
if (!isNone(this.get('storage').get('huegasm.selectedTab'))) {
|
||||
this.set('selectedTab', this.get('storage').get('huegasm.selectedTab'));
|
||||
}
|
||||
|
||||
if (isChrome && chrome && chrome.runtime && chrome.runtime.sendMessage) {
|
||||
set(this, 'canTryChrome', true);
|
||||
|
||||
chrome.runtime.sendMessage(
|
||||
'mbjanbdhcpohhfecjgbdpcfhnnbofooj',
|
||||
{},
|
||||
(response) => {
|
||||
if (response && response.installed){
|
||||
set(this, 'canTryChrome', false);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
updateLightData(){
|
||||
|
|
@ -115,7 +123,7 @@ export default Component.extend({
|
|||
window.open("https://play.google.com/store/apps/details?id=com.hoboman313.huegasm", '_blank');
|
||||
},
|
||||
tryExtension() {
|
||||
window.open("https://chrome.google.com/webstore/detail/huegasm-for-philips-hue-l/mbjanbdhcpohhfecjgbdpcfhnnbofooj", '_blank');
|
||||
chrome.webstore.install("https://chrome.google.com/webstore/detail/mbjanbdhcpohhfecjgbdpcfhnnbofooj");
|
||||
},
|
||||
changeTab(tabName){
|
||||
let index = this.get('tabList').indexOf(tabName);
|
||||
|
|
@ -138,6 +146,9 @@ export default Component.extend({
|
|||
this.get('storage').clear();
|
||||
location.reload();
|
||||
},
|
||||
email() {
|
||||
window.open("mailto:contact@nidratech.com", '_blank');
|
||||
},
|
||||
startIntro(){
|
||||
let intro = introJs(),
|
||||
playerBottom = $('#player-bottom');
|
||||
|
|
|
|||
|
|
@ -13,9 +13,11 @@
|
|||
{{/menu.trigger}}
|
||||
|
||||
{{#menu.content width=3 as |content|}}
|
||||
{{#content.menu-item class="hidden-xs" onClick="tryExtension"}}
|
||||
{{paper-icon "extension" class=dimmerOnClass}} Try the Chrome Extension
|
||||
{{/content.menu-item}}
|
||||
{{#if canTryChrome}}
|
||||
{{#content.menu-item class="hidden-xs" onClick="tryExtension"}}
|
||||
{{paper-icon "extension" class=dimmerOnClass}} Try the Chrome Extension
|
||||
{{/content.menu-item}}
|
||||
{{/if}}
|
||||
|
||||
{{#content.menu-item class="visible-xs" onClick="tryAndroid"}}
|
||||
{{paper-icon "extension" class=dimmerOnClass}} Try the Android Extension
|
||||
|
|
@ -40,6 +42,10 @@
|
|||
{{#content.menu-item onClick="clearAllSettings"}}
|
||||
{{paper-icon "settings backup restore" class=dimmerOnClass}} Reset settings
|
||||
{{/content.menu-item}}
|
||||
|
||||
{{#content.menu-item onClick="email"}}
|
||||
{{paper-icon "email" class=dimmerOnClass}} Contact
|
||||
{{/content.menu-item}}
|
||||
{{/menu.content}}
|
||||
{{/paper-menu}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default Component.extend({
|
|||
case 'HML003':
|
||||
case 'HML004':
|
||||
case 'HML005':
|
||||
src = 'phoenix_ceiling_pendant_table_wall';
|
||||
src = 'phoenix_ceiling';
|
||||
break;
|
||||
case 'HML006':
|
||||
src = 'phoenix_down';
|
||||
|
|
|
|||
|
|
@ -2,14 +2,7 @@ import Ember from 'ember';
|
|||
import helperMixin from './mixins/helpers';
|
||||
import visualizerMixin from './mixins/visualizer';
|
||||
|
||||
const {
|
||||
Component,
|
||||
observer,
|
||||
isEmpty,
|
||||
isNone,
|
||||
$,
|
||||
run: { later, next }
|
||||
} = Ember;
|
||||
const { Component, observer, isEmpty, isNone, $, run: { later, next } } = Ember;
|
||||
|
||||
export default Component.extend(helperMixin, visualizerMixin, {
|
||||
updatePageTitle: observer('playQueuePointer', function () {
|
||||
|
|
@ -174,8 +167,10 @@ export default Component.extend(helperMixin, visualizerMixin, {
|
|||
timeToBriOff = 80;
|
||||
}
|
||||
|
||||
stimulateLight(light, brightnessRange[1], color);
|
||||
later(this, stimulateLight, light, brightnessRange[0], timeToBriOff);
|
||||
later(this, () => {
|
||||
stimulateLight(light, brightnessRange[1], color);
|
||||
later(this, stimulateLight, light, brightnessRange[0], timeToBriOff);
|
||||
}, this.get('beatDelay'));
|
||||
}
|
||||
|
||||
this.set('paused', true);
|
||||
|
|
@ -213,7 +208,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
|
|||
kick: kick
|
||||
});
|
||||
|
||||
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'flashingTransitions', 'colorloopMode', 'hueRange', 'brightnessRange'].forEach((item) => {
|
||||
['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'flashingTransitions', 'colorloopMode', 'hueRange', 'brightnessRange', 'beatDelay'].forEach((item) => {
|
||||
if (!isNone(storage.get('huegasm.' + item))) {
|
||||
let itemVal = storage.get('huegasm.' + item);
|
||||
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ export default Mixin.create({
|
|||
}
|
||||
},
|
||||
|
||||
beatDelay: 0,
|
||||
threshold: 0.3,
|
||||
hueRange: [0, 65535],
|
||||
brightnessRange: [1, 254],
|
||||
|
|
|
|||
30
web/config/deploy.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* jshint node: true */
|
||||
|
||||
module.exports = function(deployTarget) {
|
||||
var ENV = {
|
||||
build: {},
|
||||
git: {
|
||||
commitMessage: 'Deployed %@'
|
||||
}
|
||||
};
|
||||
|
||||
if (deployTarget === 'development') {
|
||||
ENV.build.environment = 'development';
|
||||
// configure other plugins for development deploy target here
|
||||
}
|
||||
|
||||
if (deployTarget === 'staging') {
|
||||
ENV.build.environment = 'production';
|
||||
// configure other plugins for staging deploy target here
|
||||
}
|
||||
|
||||
if (deployTarget === 'production') {
|
||||
ENV.build.environment = 'production';
|
||||
// configure other plugins for production deploy target here
|
||||
}
|
||||
|
||||
// Note: if you need to build some configuration asynchronously, you can return
|
||||
// a promise that resolves with the ENV object instead of returning the
|
||||
// ENV object synchronously.
|
||||
return ENV;
|
||||
};
|
||||
|
|
@ -19,10 +19,13 @@
|
|||
"broccoli-asset-rev": "^2.2.0",
|
||||
"ember-cli": "^2.8.0",
|
||||
"ember-cli-app-version": "^3.0.0",
|
||||
"ember-cli-babel": "^5.1.5",
|
||||
"ember-cli-babel": "^6.0.0",
|
||||
"ember-cli-dependency-checker": "^1.2.0",
|
||||
"ember-cli-deploy": "^1.0.0",
|
||||
"ember-cli-deploy-build": "^1.0.0",
|
||||
"ember-cli-deploy-git": "^1.1.0",
|
||||
"ember-cli-htmlbars": "^1.0.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.13.0",
|
||||
"ember-cli-release": "^1.0.0-beta.2",
|
||||
|
|
@ -33,7 +36,7 @@
|
|||
"ember-export-application-global": "^2.0.0",
|
||||
"ember-inline-svg": "^0.1.7",
|
||||
"ember-load-initializers": "^1.0.0",
|
||||
"ember-modal-dialog": "^0.9.0",
|
||||
"ember-modal-dialog": "^1.0.0",
|
||||
"ember-notify": "^5.0.4",
|
||||
"ember-paper": "^1.0.0-alpha.19",
|
||||
"ember-resolver": "^4.0.0",
|
||||
|
|
|
|||
10
web/public/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/.idea/
|
||||
/app/
|
||||
/node_modules/
|
||||
/bower_components/
|
||||
/tmp/
|
||||
/dist/
|
||||
/web/
|
||||
/mobile/
|
||||
/chrome/
|
||||
/.vscode/
|
||||
4
web/public/BingSiteAuth.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<users>
|
||||
<user>358DAA5A6687F1E33975112708669D1C</user>
|
||||
</users>
|
||||
1
web/public/CNAME
Normal file
|
|
@ -0,0 +1 @@
|
|||
www.huegasm.com
|
||||
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 989 B After Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |