diff --git a/app.php b/app.php deleted file mode 100644 index 9fc6c62..0000000 --- a/app.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - beestat - - - - - - - get('commit') . '">'; - echo ''; - - require 'js/js.php'; - ?> - - - diff --git a/css/index.css b/css/index.css deleted file mode 100644 index 6269fa1..0000000 --- a/css/index.css +++ /dev/null @@ -1,407 +0,0 @@ -html { - box-sizing: border-box; -} - -*, *:before, *:after { - box-sizing: inherit; -} - -.highcharts-container, .highcharts-container svg { width: 100% !important; } - -body { - background: #111; - font-family: Montserrat; - font-weight: 300; - font-size: 13px; - color: #ecf0f1; - margin: 0; - padding: 0; - overflow-x: hidden; -} - -/* Fonts */ -@font-face{ - font-family:"Montserrat"; - font-weight:100; - font-style:normal; - src:url("../font/montserrat/montserrat_100.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_100.woff") format("woff"),url("../font/montserrat/montserrat_100.ttf") format("truetype"),url("../font/montserrat/montserrat_100.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:200; - font-style:normal; - src:url("../font/montserrat/montserrat_200.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_200.woff") format("woff"),url("../font/montserrat/montserrat_200.ttf") format("truetype"),url("../font/montserrat/montserrat_200.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:300; - font-style:normal; - src:url("../font/montserrat/montserrat_300.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_300.woff") format("woff"),url("../font/montserrat/montserrat_300.ttf") format("truetype"),url("../font/montserrat/montserrat_300.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:400; - font-style:normal; - src:url("../font/montserrat/montserrat_400.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_400.woff") format("woff"),url("../font/montserrat/montserrat_400.ttf") format("truetype"),url("../font/montserrat/montserrat_400.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:500; - font-style:normal; - src:url("../font/montserrat/montserrat_500.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_500.woff") format("woff"),url("../font/montserrat/montserrat_500.ttf") format("truetype"),url("../font/montserrat/montserrat_500.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:600; - font-style:normal; - src:url("../font/montserrat/montserrat_600.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_600.woff") format("woff"),url("../font/montserrat/montserrat_600.ttf") format("truetype"),url("../font/montserrat/montserrat_600.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:700; - font-style:normal; - src:url("../font/montserrat/montserrat_700.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_700.woff") format("woff"),url("../font/montserrat/montserrat_700.ttf") format("truetype"),url("../font/montserrat/montserrat_700.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:800; - font-style:normal; - src:url("../font/montserrat/montserrat_800.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_800.woff") format("woff"),url("../font/montserrat/montserrat_800.ttf") format("truetype"),url("../font/montserrat/montserrat_800.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:900; - font-style:normal; - src:url("../font/montserrat/montserrat_900.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_900.woff") format("woff"),url("../font/montserrat/montserrat_900.ttf") format("truetype"),url("../font/montserrat/montserrat_900.svg#Montserrat") format("svg") -} -/* -@font-face{ - font-family:"Droid Serif"; - font-weight:400; - font-style:normal; - src:url("../font/droid_serif/droid_serif_400.woff") format("woff"),url("../font/droid_serif/droid_serif_400.ttf") format("truetype") -}*/ - -/* Icons */ -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url(../font/material_icons/material_icons.eot); /* For IE6-8 */ - src: local('Material Icons'), - local('MaterialIcons-Regular'), - url(../font/material_icons/material_icons.woff2) format('woff2'), - url(../font/material_icons/material_icons.woff) format('woff'), - url(../font/material_icons/material_icons.ttf) format('truetype'); -} - -.icon { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; /* Preferred icon size */ - display: inline-block; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - direction: ltr; - - /*position: relative;*/ - /*top: 2px;*/ - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} - -/*.icon.f18 { font-size: 18px; } -.icon.f24 { font-size: 24px; } -.icon.f36 { font-size: 36px; } -.icon.f48 { font-size: 48px; }*/ - -/* Beestat logo */ -.beestat { - font-weight: 200; - font-size: 40px; - font-family: Montserrat; -} - -.beestat > .bee { - color: #f1c40f; -} - -.beestat > .stat { - color: #2ecc71; -} - -/* Link styles */ -a { - cursor: pointer; -} - -a:link { - color: #ecf0f1; - text-decoration: none; -} - -a:visited { - color: #ecf0f1; -} - -a:focus { - color: #ecf0f1; -} - -a:hover { - color: #bdc3c7; - text-decoration: none; -} - -a:active { - color: #ecf0f1; -} - -h1 { - font-family: Montserrat; - font-weight: 200; - font-size: 24px; - margin: 0 0 8px 0; - color: #ecf0f1; -} - -h2 { - font-family: Montserrat; - font-weight: 500; - font-size: 18px; - margin: 0 0 8px 0; - color: #bdc3c7; -} - -.loading { - border: 5px solid #f7b731; - border-radius: 30px; - height: 30px; - /*left: 50%;*/ - /*margin: -15px 0 0 -15px;*/ - opacity: 0; - /*position: absolute;*/ - /*top: 50%;*/ - width: 30px; - display: inline-block; - - animation: loading 1s ease-out; - animation-iteration-count: infinite; -} - -@keyframes loading { - 0% { - transform: scale(.1); - opacity: 0.0; - } - 50% { - opacity: 1; - } - 100% { - transform: scale(1.2); - opacity: 0; - } -} - - - - - -@keyframes spin { - from { - transform:rotate(0deg); - } - to { - transform:rotate(360deg); - } -} - - - - - - - - - - - -._index { - display: flex; - min-height: 100vh; - flex-direction: column; -} - -._index main { - position: relative; - flex: 1; - width: 100%; - overflow-x: hidden; -} - -._index .waveform { - position: absolute; - left: 0; - top: 195px; - right: -2548px; - background: url('../img/waveform.png') 0% 0% repeat-x; - z-index: -1; - height: 312px; - - -webkit-animation: waveform_scroll linear 600s; - -webkit-animation-iteration-count: infinite; - -moz-animation: waveform_scroll linear 600s; - -moz-animation-iteration-count: infinite; - -o-animation: waveform_scroll linear 600s; - -o-animation-iteration-count: infinite; - -ms-animation: waveform_scroll linear 600s; - -ms-animation-iteration-count: infinite; -} - -@keyframes waveform_scroll{ - 0% { - transform: translateX(0); - } - 100% { - transform: translateX(-2548px); - } -} - -@-moz-keyframes waveform_scroll{ - 0% { - -moz-transform: translateX(0); - } - 100% { - -moz-transform: translateX(-2548px); - } -} - -@-webkit-keyframes waveform_scroll { - 0% { - -webkit-transform: translateX(0); - } - 100% { - -webkit-transform: translateX(-2548px); - } -} - -@-o-keyframes waveform_scroll { - 0% { - -o-transform: translateX(0); - } - 100% { - -o-transform: translateX(-2548px); - } -} - -@-ms-keyframes waveform_scroll { - 0% { - -ms-transform: translateX(0); - } - 100% { - -ms-transform: translateX(-2548px); - } -} - -._index .header { - padding: 16px; - overflow: auto; -} - -._index .beestat { - float: left; - line-height: 55px; -} - -._index .log_in { - display: none; - float: right; - line-height: 40px; - font-size: 16px; - font-weight: 500; - line-height: 55px; -} - -._index .connect { - text-align: center; - margin-top: 140px; -} - -._index .connect_text { - font-size: 24px; - font-weight: 500; -} - -._index .ecobee, ._index .nest { - width: 120px; - height: 120px; - border-radius: 50%; - display: inline-block; - margin: 32px 16px 0 16px; - background-size: 100%; - transition: background-color 100ms ease; -} - -._index .ecobee { - background-color: #27ae60; - background-image: url('../img/ecobee/connect.png'); -} - -._index .ecobee:hover { - background-color: #2ecc71; -} - -._index .nest { - background-color: #bdc3c7; - background-image: url('../img/nest/connect.png'); -} - -._index .demo { - /*display: none;*/ - text-align: center; - margin-top: 100px; - font-size: 18px; - color: #7f8c8d; - font-weight: 500; -} - -._index footer { - /*margin-top: 200px;*/ - background: #2c3e50; - padding: 32px 16px; - text-align: center; - font-size: 14px; -} - -._index .footer_text { - font-weight: 500; -} - -._index .footer_links { - margin-top: 32px; - font-weight: 200; -} - -/* Less header space when the browser is short. */ -@media (max-height: 680px) { - ._index .connect { - margin-top: 40px; - } - - ._index .waveform { - top: 95px; - } -} diff --git a/css/privacy.css b/css/privacy.css deleted file mode 100644 index fb1f793..0000000 --- a/css/privacy.css +++ /dev/null @@ -1,283 +0,0 @@ -html { - box-sizing: border-box; -} - -*, *:before, *:after { - box-sizing: inherit; -} - -.highcharts-container, .highcharts-container svg { width: 100% !important; } - -body { - background: #111; - font-family: Montserrat; - font-weight: 300; - font-size: 13px; - color: #ecf0f1; - margin: 0; - padding: 0; - overflow-x: hidden; -} - -/* Fonts */ -@font-face{ - font-family:"Montserrat"; - font-weight:100; - font-style:normal; - src:url("../font/montserrat/montserrat_100.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_100.woff") format("woff"),url("../font/montserrat/montserrat_100.ttf") format("truetype"),url("../font/montserrat/montserrat_100.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:200; - font-style:normal; - src:url("../font/montserrat/montserrat_200.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_200.woff") format("woff"),url("../font/montserrat/montserrat_200.ttf") format("truetype"),url("../font/montserrat/montserrat_200.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:300; - font-style:normal; - src:url("../font/montserrat/montserrat_300.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_300.woff") format("woff"),url("../font/montserrat/montserrat_300.ttf") format("truetype"),url("../font/montserrat/montserrat_300.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:400; - font-style:normal; - src:url("../font/montserrat/montserrat_400.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_400.woff") format("woff"),url("../font/montserrat/montserrat_400.ttf") format("truetype"),url("../font/montserrat/montserrat_400.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:500; - font-style:normal; - src:url("../font/montserrat/montserrat_500.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_500.woff") format("woff"),url("../font/montserrat/montserrat_500.ttf") format("truetype"),url("../font/montserrat/montserrat_500.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:600; - font-style:normal; - src:url("../font/montserrat/montserrat_600.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_600.woff") format("woff"),url("../font/montserrat/montserrat_600.ttf") format("truetype"),url("../font/montserrat/montserrat_600.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:700; - font-style:normal; - src:url("../font/montserrat/montserrat_700.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_700.woff") format("woff"),url("../font/montserrat/montserrat_700.ttf") format("truetype"),url("../font/montserrat/montserrat_700.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:800; - font-style:normal; - src:url("../font/montserrat/montserrat_800.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_800.woff") format("woff"),url("../font/montserrat/montserrat_800.ttf") format("truetype"),url("../font/montserrat/montserrat_800.svg#Montserrat") format("svg") -} -@font-face{ - font-family:"Montserrat"; - font-weight:900; - font-style:normal; - src:url("../font/montserrat/montserrat_900.eot?") format("embedded-opentype"),url("../font/montserrat/montserrat_900.woff") format("woff"),url("../font/montserrat/montserrat_900.ttf") format("truetype"),url("../font/montserrat/montserrat_900.svg#Montserrat") format("svg") -} -/* -@font-face{ - font-family:"Droid Serif"; - font-weight:400; - font-style:normal; - src:url("../font/droid_serif/droid_serif_400.woff") format("woff"),url("../font/droid_serif/droid_serif_400.ttf") format("truetype") -}*/ - - -/* Beestat logo */ -.beestat { - font-weight: 200; - font-size: 40px; - font-family: Montserrat; -} - -.beestat > .bee { - color: #f1c40f; -} - -.beestat > .stat { - color: #2ecc71; -} - -/* Link styles */ -a { - cursor: pointer; -} - -a:link { - color: #ecf0f1; - text-decoration: none; -} - -a:visited { - color: #ecf0f1; -} - -a:focus { - color: #ecf0f1; -} - -a:hover { - color: #bdc3c7; - text-decoration: none; -} - -a:active { - color: #ecf0f1; -} - -h1 { - font-family: Montserrat; - font-weight: 200; - font-size: 24px; - margin: 0 0 8px 0; - color: #ecf0f1; -} - -h2 { - font-family: Montserrat; - font-weight: 500; - font-size: 18px; - margin: 0 0 8px 0; - color: #bdc3c7; -} - -.loading { - border: 5px solid #f7b731; - border-radius: 30px; - height: 30px; - /*left: 50%;*/ - /*margin: -15px 0 0 -15px;*/ - opacity: 0; - /*position: absolute;*/ - /*top: 50%;*/ - width: 30px; - display: inline-block; - - animation: loading 1s ease-out; - animation-iteration-count: infinite; -} - -@keyframes loading { - 0% { - transform: scale(.1); - opacity: 0.0; - } - 50% { - opacity: 1; - } - 100% { - transform: scale(1.2); - opacity: 0; - } -} - - - - - -@keyframes spin { - from { - transform:rotate(0deg); - } - to { - transform:rotate(360deg); - } -} - -/* Icons */ -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url(../font/material_icons/material_icons.eot); /* For IE6-8 */ - src: local('Material Icons'), - local('MaterialIcons-Regular'), - url(../font/material_icons/material_icons.woff2) format('woff2'), - url(../font/material_icons/material_icons.woff) format('woff'), - url(../font/material_icons/material_icons.ttf) format('truetype'); -} - -.icon { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; /* Preferred icon size */ - display: inline-block; - line-height: 1; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - direction: ltr; - - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - - /* Support for IE. */ - font-feature-settings: 'liga'; -} - -.icon.f18 { font-size: 18px; } -.icon.f24 { font-size: 24px; } -.icon.f36 { font-size: 36px; } -.icon.f48 { font-size: 48px; } - - - - - - - - - - - - - - -._privacy .header { - padding: 16px; - overflow: auto; -} - -._privacy .beestat { - float: left; - cursor: pointer; - line-height: 55px; -} - -._privacy .log_in { - display: none; - float: right; - line-height: 55px; - font-size: 16px; - font-weight: 500; -} - -._privacy .text { - /*font-family: Droid Serif;*/ - padding: 16px; - background: #34495e; -} - -._privacy .footer { - /*margin-top: 200px;*/ - background: #2c3e50; - padding: 48px 16px; - text-align: center; - font-size: 16px; -} - -._privacy .footer_text { - font-weight: 500; -} - -._privacy .footer_links { - margin-top: 32px; - font-weight: 200; -} diff --git a/dashboard.php b/dashboard.php deleted file mode 100644 index 9ceb9d8..0000000 --- a/dashboard.php +++ /dev/null @@ -1,15 +0,0 @@ - - - - beestat - - - - - - - - - - - diff --git a/index.php b/index.php index 201985c..48851bf 100644 --- a/index.php +++ b/index.php @@ -20,9 +20,34 @@ $_COOKIE['session_key'] = 'd31d3ef451fe65885928e5e1bdf4af321f702009'; } - // Skip this page entirely if you're logged in. - if($setting->is_demo() === true || preg_match('/app\.beestat\.io/', $_SERVER['HTTP_HOST']) !== 0) { - require 'app.php'; - } else { - require 'www.php'; + require_once 'api/cora/setting.php'; + $setting = cora\setting::get_instance(); + + // If you're not logged in, just take you directly to the ecobee login page. + if(isset($_COOKIE['session_key']) === false) { + header('Location: http://' . $_SERVER['HTTP_HOST'] . '/api/?resource=ecobee&method=authorize&arguments={}&api_key=ER9Dz8t05qUdui0cvfWi5GiVVyHP6OB8KPuSisP2'); + die(); } + +?> + + + + + beestat + + + + + + + get('commit') . '">'; + echo ''; + + require 'js/js.php'; + ?> + + + diff --git a/privacy.php b/privacy.php deleted file mode 100644 index c5367f8..0000000 --- a/privacy.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - beestat - - - - - - - - - - -
-
-
- beestat -
- -
-
-

Privacy

-

- Beestat exists to provide useful data to people about their HVAC usage; we have no interest in selling your data. -

-

Data we store

- -

Data we share

-

- In no circumstances will any of your data ever be shared with a third party; this includes de-identified data. Your data will only be used in aggregate to show comparisons, trends, and other useful information to other beestat users. This will never include any identifiable information. -

-

Third parties

-

- Some information is shared with the following third parties in order to provide a meaningful service. -

- -

Access to your thermostats

-

- Beestat will have continued access to all of the thermostats and their data unless you manually revoke it. For ecobee, you may do this by logging into their web portal, clicking the menu button in the top right, selecting My Apps, selecting beestat, then selecting Remove App. -

-

Data retention

-

- All data stored in the beestat database is kept indefinitely regardless of your continued usage of beestat or if you revoke beestat's access to your data. To have your data deleted, submit a request to ziebelje@gmail.com. -

-
- -
- - diff --git a/www.php b/www.php deleted file mode 100644 index 4a58e44..0000000 --- a/www.php +++ /dev/null @@ -1,52 +0,0 @@ - - - - beestat - - - - - - - - - - -
-
-
-
-
- beestat -
- -
-
-
- Connect your thermostat -
-
- - -
-
- -
- -
- -