zhongjin 6 years ago
parent 541e22701e
commit dd644dc42e

@ -12,7 +12,7 @@ before_script:
- 'if [[ $NPMVERSION == 5 ]]; then npm install -g npm@5; fi'
- npm -v
- npm install winston@2.3.1
- 'npm install https://github.com/ioBroker/ioBroker.js-controller/tarball/master --production'
- 'npm install https://github.com/yunkong2/yunkong2.js-controller/tarball/master --production'
env:
- CXX=g++-4.8
addons:

@ -1,12 +1,12 @@
![Logo](admin/history.png)
# ioBroker.history
# yunkong2.history
===============================
[![NPM version](http://img.shields.io/npm/v/iobroker.history.svg)](https://www.npmjs.com/package/iobroker.history)
[![Downloads](https://img.shields.io/npm/dm/iobroker.history.svg)](https://www.npmjs.com/package/iobroker.history)
[![Tests](http://img.shields.io/travis/ioBroker/ioBroker.history/master.svg)](https://travis-ci.org/ioBroker/ioBroker.history)
[![NPM version](http://img.shields.io/npm/v/yunkong2.history.svg)](https://www.npmjs.com/package/yunkong2.history)
[![Downloads](https://img.shields.io/npm/dm/yunkong2.history.svg)](https://www.npmjs.com/package/yunkong2.history)
[![Tests](http://img.shields.io/travis/yunkong2/yunkong2.history/master.svg)](https://travis-ci.org/yunkong2/yunkong2.history)
[![NPM](https://nodei.co/npm/iobroker.history.png?downloads=true)](https://nodei.co/npm/iobroker.history/)
[![NPM](https://nodei.co/npm/yunkong2.history.png?downloads=true)](https://nodei.co/npm/yunkong2.history/)
This adapter saves state history in a two-staged process.
At first data points are stored in RAM, as soon as they reach maxLength they will be stored on disk.
@ -15,7 +15,7 @@ To set up some data points to be stored they must be configured in admin "Object
## Settings
- **Storage directory** - Path to the directory, where the files will be stored. It can be done relative to "iobroker-data" or absolute, like "/mnt/history" or "D:/History"
- **Storage directory** - Path to the directory, where the files will be stored. It can be done relative to "yunkong2-data" or absolute, like "/mnt/history" or "D:/History"
- **Maximal number of stored in RAM values** - After this number of values reached in RAM they will be saved on disk.
- **Store origin of value** - If "from" field will be stored too. Can save place on disk.
- **De-bounce interval** - Protection against too often changes of some value and defined tha time in ms in which after one value change other changes are not logged
@ -86,7 +86,7 @@ If you manually request some aggregation you should ignore first and last values
If you want to write other data into the InfluxDB you can use the build in system function **storeState**.
This function can also be used to convert data from other History adapters like History or SQL.
The given ids are not checked against the ioBroker database and do not need to be set up there, but can only be accessed directly.
The given ids are not checked against the yunkong2 database and do not need to be set up there, but can only be accessed directly.
The Message can have one of the following three formats:
* one ID and one state object
@ -225,7 +225,7 @@ Possible options and Parameter:
- **DB-Instance**: DB-Instance to send the data to.Required parameter. Needs to be first parameter after scriptname.
- **Loglevel**: Loglevel for output (Default: info). If set needs to be second parameter after scriptname.
- **Date-to-start**: Day to start in format yyyymmdd (e.g. 20161028). Use "0" to use detected earliest values. If set needs to be third parameter after scriptname.
- **path-to-Data**: Path to the datafiles. Defauls to iobroker-install-directory/iobroker-data/history-data . If set needs to be fourth parameter after scriptname.
- **path-to-Data**: Path to the datafiles. Defauls to yunkong2-install-directory/yunkong2-data/history-data . If set needs to be fourth parameter after scriptname.
- **<delayMultiplicator>**: Modify the delays between several actions in the script by a multiplicator. "2" would mean that the delays the converted had calculated by itself are doubled. If set needs to be fifth parameter after scriptname.
- **--logChangesOnly [relog-Interval(m)]**: when --logChangesOnly is set the data are parsed and reduced, so that only changed values are stored in InfluxDB. Additionally a "relog-Interval(s)"" can be set in minutes to re-log unchanged values after this interval.
- **--ignoreExistingDBValues**: With this parameter all existing data are ignored and all data are inserted into DB. Please make sure that no duplicates are generated. This option is usefull to fix "holes" in the data where some data are missing. By default it only fills all datapoints with at least one entry in the DB. This can be overwritten by --processAllDPs

@ -1,4 +1,4 @@
<script type="text/x-iobroker" data-template-name="history">
<script type="text/x-yunkong2" data-template-name="history">
<div class="form-row">
<table style="font-size: 12px">
<tr>

@ -1,4 +1,4 @@
<script type="text/x-iobroker" data-template-name="history">
<script type="text/x-yunkong2" data-template-name="history">
<div class="row">
<div class="col s4">
<input type="checkbox" data-field="enabled" data-default="false"/>

@ -16,7 +16,7 @@ install:
- ps: npm --version
- npm install
- npm install winston@2.3.1
- 'npm install https://github.com/ioBroker/ioBroker.js-controller/tarball/master --production'
- 'npm install https://github.com/yunkong2/yunkong2.js-controller/tarball/master --production'
test_script:
- echo %cd%
- node --version

@ -182,9 +182,9 @@
"Apollon77 <ingo@fischer-ka.de>"
],
"license": "MIT",
"readme": "https://github.com/ioBroker/ioBroker.history/blob/master/README.md",
"readme": "https://git.spacen.net/yunkong2/yunkong2.history/raw/master/README.md",
"icon": "history.png",
"extIcon": "https://raw.githubusercontent.com/ioBroker/ioBroker.history/master/admin/history.png",
"extIcon": "https://git.spacen.net/yunkong2/yunkong2.history/raw/master/admin/history.png",
"type": "storage",
"supportCustoms": true,
"materialize": true,

@ -27,8 +27,8 @@ let appName;
function getControllerDir(isInstall) {
// Find the js-controller location
const possibilities = [
'iobroker.js-controller',
'ioBroker.js-controller',
'yunkong2.js-controller',
'yunkong2.js-controller',
];
/** @type {string} */
let controllerPath;

@ -1,27 +1,19 @@
{
"name": "iobroker.history",
"name": "yunkong2.history",
"description": "Log state history in a two-stages process (first to RAM, then to disk)",
"version": "1.8.5",
"author": "hobbyquaker <hq@ccu.io>",
"contributors": [
"bluefox <dogafox@gmail.com>",
"smiling-Jack",
"hobbyquaker <hq@ccu.io>",
"Apollon77"
],
"homepage": "https://github.com/ioBroker/ioBroker.history",
"homepage": "https://git.spacen.net/yunkong2/yunkong2.history",
"repository": {
"type": "git",
"url": "https://github.com/ioBroker/ioBroker.history"
"url": "https://git.spacen.net/yunkong2/yunkong2.history"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/ioBroker/ioBroker.history/blob/master/LICENSE"
"url": "https://git.spacen.net/yunkong2/yunkong2.history/blob/master/LICENSE"
}
],
"keywords": [
"ioBroker",
"log data",
"home automation"
],
@ -31,9 +23,6 @@
"mocha": "^4.1.0",
"chai": "^4.1.2"
},
"bugs": {
"url": "https://github.com/ioBroker/ioBroker.history/issues"
},
"main": "history.js",
"scripts": {
"test": "node node_modules/mocha/bin/mocha --exit"

@ -415,7 +415,7 @@ function clearControllerLog() {
}
function clearDB() {
var dirPath = rootDir + 'tmp/iobroker-data/sqlite';
var dirPath = rootDir + 'tmp/yunkong2-data/sqlite';
var files;
try {
if (fs.existsSync(dirPath)) {

@ -52,12 +52,12 @@ describe('Test package.json and io-package.json', function() {
console.log();
}
if (
ioPackage.common.title.indexOf('iobroker') !== -1 ||
ioPackage.common.title.indexOf('ioBroker') !== -1 ||
ioPackage.common.title.indexOf('yunkong2') !== -1 ||
ioPackage.common.title.indexOf('yunkong2') !== -1 ||
ioPackage.common.title.indexOf('adapter') !== -1 ||
ioPackage.common.title.indexOf('Adapter') !== -1
) {
console.log('WARNING: title contains Adapter or ioBroker. It is clear anyway, that it is adapter for ioBroker.');
console.log('WARNING: title contains Adapter or yunkong2. It is clear anyway, that it is adapter for yunkong2.');
console.log();
}

Loading…
Cancel
Save