Skip to content

Instantly share code, notes, and snippets.

View AdamEsterle's full-sized avatar

Adam Esterle AdamEsterle

View GitHub Profile
@AdamEsterle
AdamEsterle / Sylvania Smart Motion Temperature Sensor
Created February 22, 2018 18:15
Sylvania Smart Motion/Temperature Sensor code for SmartThings hub
import physicalgraph.zigbee.clusters.iaszone.ZoneStatus
metadata {
definition (name: "SYLVANIA Smart Motion/Temperature Sensor", namespace: "ledvanceDH", author: "Ledvance") {
capability "Configuration"
capability "Motion Sensor"
capability "Temperature Measurement"
capability "Battery"
capability "Refresh"
capability "Health Check"
<?php
$urls = Repo::all();
$correctKeys = \DB::connection()->getSchemaBuilder()->getColumnListing("packages");
unset($correctKeys[0], $correctKeys[1]);
foreach ($urls as $repo) {
$text_filename = $repo->id . '.txt';
if (!Storage::exists($text_filename)) {
var ATTExcel = function() {
var usage = {};
var dollars = {};
var rollOverData = '';
var totalBill = '';
this.begin = function() {
if (getCache()) {
getUsage();
getBill();
var ATTExcel = function() {
var usage = {};
var dollars = {};
var rollOverData = '';
var totalBill = '';
this.begin = function() {
if (getCache()) {
getUsage();
getBill();
var ATTExcel = function() {
usage = {};
dollars = {};
rollOverData = '';
totalBill = '';
this.begin = function() {
if (this.getCache()) {
this.getUsage();
this.getBill();
var ATTExcel = function() {
usage = {};
dollars = {};
rollOverData = '';
totalBill = '';
this.begin = function() {
if (this.getCache()) {
console.log("1");
this.getUsage();
var data = {};
var dollars = {};
jQuery.get( "https://www.att.com/olam/billUsageTiles.myworld", function( mbData ) {
var names = [];
jQuery(mbData).find('p.font14.botMar0 > strong').each(function(i) {
names.push(jQuery(this).text().trim());
});
jQuery(mbData).find('a[title="Web Usage"]').each(function(i) {
var data = {};
var dollars = {};
jQuery.get( "https://www.att.com/olam/billUsageTiles.myworld", function( mbData ) {
var names = [];
jQuery('a.font14.linkColor.float-left').each(function(i) {
var name = jQuery(this).text().trim();
names.push(name.substring(0, name.length - 12).trim());
});
var data = [];
var dollars = [];
jQuery.get( "https://www.att.com/olam/billUsageTiles.myworld", function( mbData ) {
jQuery(mbData).find('a[title="Web Usage"]').each(function(i) {
data.push(parseFloat(jQuery(this).find('span > strong').text().trim()) * 1024);
});
jQuery.get( "https://www.att.com/olam/billOverviewTiles.myworld", function( dollarData ) {
jQuery(dollarData).find('span.flipper.float-right.font14.top10px.padRight20.colorBlack').not('.ie7Top7').each(function(i) {
dollars.push(jQuery(this).text().trim());