On System#Boot do
Publish /%sysname%/online,{"ip":"%ip%"}
timerSet,1,60
endon
On Rules#Timer=1 do
Publish /%sysname%/online,{"ip":"%ip%"}
timerSet,1,60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // <div data-jc="apexradialbar__system.hdd__val:used;max:total;labelformat:(val, max) => val.filesize(2, 'GB', true) + ' / ' + max.filesize(2, 'GB')">HDD</div> | |
| COMPONENT('apexradialbar', '', function(self, config){ | |
| var chart, label, formatter2; | |
| var val2, max2; | |
| var converter = function(val, max) { | |
| val2 = val; | |
| max2 = max; | |
| return (val * 100) / max; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function everage(each) { | |
| var count = 0; | |
| var result = []; | |
| var len = arr.length; | |
| if (!each) { | |
| var val = 0; | |
| for (var i = 0; i < len; i++) { | |
| val += arr[i]; | |
| } | |
| return val / len; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env node | |
| var Path = require('path'); | |
| if (process.argv[2] === '--help' || process.argv[2] === '-h') { | |
| console.log(''); | |
| console.log('Runs in release mode on port 8000 by default'); | |
| console.log('Add port number to run on different port'); | |
| console.log('Example: `$ totalr 3000`'); | |
| console.log(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env node | |
| var Path = require('path'); | |
| if (process.argv[2] === '--help' || process.argv[2] === '-h') { | |
| console.log(''); | |
| console.log('Runs in debug mode on port 8000 by default'); | |
| console.log('Add port number to run on different port'); | |
| console.log('Example: `$ totald 3000`'); | |
| console.log(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ESP8266WiFi.h> | |
| #include <OneWire.h> | |
| #include <DallasTemperature.h> | |
| //AP definitions | |
| #define AP_SSID "xxxxx" | |
| #define AP_PASSWORD "xxxxxxxxxxxx" | |
| #define IP_ADDRESS "192.168.0.107" | |
| #define PORT 80 | |
| #define NAME "living_room" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('total.js'); | |
| var Fs = require('fs'); | |
| function existsSync(filename, file) { | |
| try { | |
| var val = Fs.statSync(filename); | |
| return val ? (file ? val.isFile() : true) : false; | |
| } catch (e) { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('total.js').http('debug'); | |
| var util = require('util'); | |
| var EventEmitter = require('events'); | |
| // jen na test | |
| var WSCONTROLLER = { | |
| send: function(data){ console.log(data)} | |
| } |