Coder Social home page Coder Social logo

iobroker.history's Introduction

Logo

ioBroker.history

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

This adapter saves state history in a two-staged process.

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

Configuration

Changelog

3.0.1 (2023-10-24)

  • (tuxyme) activated the round option when averaging

3.0.0 (2023-09-19)

  • (foxriver76) fix history2db.js with controller v5
  • (bluefox) Minimal node.sj version is 16
  • (bluefox) Added support for count aggregate type on getHistory

2.2.6 (2023-08-23)

  • (Apollon77) Fix getHistory when aggregations were used in some cases

2.2.4 (2022-09-19)

  • (Apollon77) Update for future js-controller versions

2.2.3 (2022-09-12)

  • (Apollon77) Fix error in history2db converter script

2.2.1 (2022-08-13)

  • (Apollon77) Fix crash cases reported by Sentry
  • (kleinOr) Updated converter scripts to work with influxdb 2.x

2.2.0 (2022-07-22)

  • (Apollon77) make sure getHistory works for all cases
  • (Bluefox/Apollon77) Added an option to add comment and user info to results

2.1.7 (2022-06-27)

  • (Apollon77) Allowed removing a configuration value for "round" in config again

2.1.6 (2022-06-27)

  • (Apollon77) When not count is provided for aggregate "none" or "onchange" then the limit (default 2000) is used as count to define the number of data to return.

2.1.5 (2022-06-24)

  • (Apollon77) Ignore errors from a forked process after response was sent for GetHistory

2.1.4 (2022-06-12)

  • (Apollon77) Make sure the debug log is active, according to the settings

2.1.3 (2022-06-08)

  • (Apollon77) Huge performance optimizations for GetHistory calls

2.1.2 (2022-05-28)

  • (Apollon77) Fixed crash case reported by Sentry

2.1.1 (2022-05-27)

  • (Apollon77) Fix crash case reported by Sentry

2.1.0 (2022-05-27)

  • (Apollon77) Fix several crash cases reported by Sentry
  • (Apollon77) Make sure disabling "Log changes only" also really do not log the changes anymore
  • (Apollon77) Allow storeState and GetHistory also to be called for "unknown ids"

2.0.1 (2022-05-11)

  • (Apollon77) BREAKING: Configuration is only working in the new Admin 5 UI!
  • (Apollon77) Did bigger adjustments to the recording logic and added a lot of new Features. Please refer to Changelog and Forum post for details.
  • (Apollon77) Make sure disabling "Log changes only" also really do not log the changes anymore

2.0.0 (2022-05-11)

  • (Apollon77) BREAKING: Configuration is only working in the new Admin 5 UI!
  • (Apollon77) BREAKING! Did bigger adjustments to the recording logic. Debounce is refined and blockTime is added to differentiate between the two checks
  • (Apollon77) BREAKING! GetHistory requests now need to deliver the ts in milliseconds! Make sure to use up to date scripts and Charting UIs
  • (Apollon77) New setting added to disable the "logging of additional values for charting optimization" - then only the expected data are logged
  • (Apollon77) Add flag returnNewestEntries for GetHistory to determine which records to return when more entries as "count" are existing for aggregate "none"
  • (Apollon77) Make sure id is always returned on GetHistory when addId is set
  • (Apollon77) Add new Debug flag to enable/disable debug logging on datapoint level (default is false) to optimize performance
  • (Apollon77) Add support to specify how to round numbers on query per datapoint
  • (Apollon77) Add aggregate method "percentile" to calculate the percentile (0..100) of the values (requires options.percentile with the percentile level, defaults to 50 if not provided). Basically same as Quantile just different levels are used
  • (Apollon77) Add aggregate method "quantile" to calculate the quantile (0..1) of the values (requires options.quantile with the quantile level, defaults to 0.5 if not provided). Basically same as Percentile just different levels are used
  • (Apollon77) Add (experimental) method "integral" to calculate the integral of the values. Requires options.integralUnit with the time duration of the integral in seconds, defaults to 60s if not provided. Optionally a linear interpolation can be done by setting options.integralInterpolation to "linear"
  • (Apollon77) When request contains flag removeBorderValues: true, the result then cut the additional pre and post border values out of the results
  • (Apollon77) If storeState Message calls include a rules property then the new value is added with respecting all rules (incl. debounce, so be careful!)
  • (Apollon77) Enhance the former "Ignore below 0" feature and now allow specifying to ignore below or above specified values. The old setting is converted to the new one
  • (Apollon77) Allow to specify custom retention duration in days
  • (Apollon77) Adjust handing for data files prior 1.1.2010 and automatically convert older ts formats to the new one
  • (Apollon77) Adjust handling of data prior 1.1.2000 in the importer scripts
  • (Apollon77) Make sure that min change delta allows numbers entered with comma (german notation) in all cases

1.11.1 (2022-03-26)

  • (Apollon77) Fix the js-controller and admin minimum version

1.11.0 (2022-02-22)

  • (bluefox) Added support deletion and changing of stored values.

1.10.6 (2022-02-19)

  • (Apollon77) Prevent some crash cases reported by Sentry

1.10.5 (2021-12-19)

  • (Excodibur) Hide settings not relevant when "log changes only" is not used
  • (Apollon77) Allow all number values for debounce again

1.10.4 (2021-12-14)

  • (bluefox) Support only js.controller >= 3.3.x
  • (bluefox) Used system/custom view for collecting the objects
  • (bluefox) Implemented option to ignore zero- or/and below zero- values

1.9.14 (2021-11-19)

  • (Apollon77) Prevent crash cases reported by Sentry

1.9.13 (2021-04-19)

  • (bluefox) Added the support of Admin5

1.9.12 (2021-01-17)

  • (Apollon77) Optimize stop handling

1.9.10 (2020-07-28)

  • (bluefox) Code formatting done
  • (bluefox) Filtered out the acknowledgment and the quality from the getHistory call if not requested

1.9.9 (2020-06-29)

  • (Apollon77) prevent crashes (Sentry IOBROKER-HISTORY-K, IOBROKER-HISTORY-J, IOBROKER-HISTORY-C, IOBROKER-HISTORY-G)

1.9.8 (2020-05-14)

  • (bluefox) added command to read supported features

1.9.7 (2020-05-08)

  • (bluefox) set default history if not yet set

1.9.6 (2020-05-04)

  • (Apollon77) optimize retention directory logic again (Sentry IOBROKER-HISTORY-A)

1.9.5 (2020-04-30)

  • (Apollon77) optimize retention directory logic again (Sentry IOBROKER-HISTORY-7)

1.9.4 (2020-04-23)

  • (Apollon77) Catch error when Storage directory can not be created (Sentry IOBROKER-HISTORY-1)
  • (Apollon77) make sure internal structures are initialized correctly (Sentry IOBROKER-HISTORY-2)
  • (Apollon77) make sure to handle cases where retention directory is not existing (Sentry IOBROKER-HISTORY-3)

1.9.3 (2020-04-19)

  • Requires js-controller >= 2.0.0
  • (foxriver76) removed usage of adapter.objects
  • (Apollon77) check if objects have changed and ignore unchanged
  • (Apollon77) adjust allowed file system names
  • (Apollon77) Add Sentry for Error Reporting with js-controller 3.0
  • (Apollon77) Make sure value undefined is ignored

1.8.7 (2019-09-02)

  • (paul53) old files should be deleted automatically

1.8.6

  • Fix several smaller issues and optimized some texts

1.8.5 (2018-07-02)

  • (Apollon77) Error fixed in storeState

1.8.4 (2018-06-24)

  • (Apollon77) Fixing/allow to disable writing of start and end values

1.8.0 (2018-06-19/24)

  • (Apollon77) Add option to write data to a different ID to make device changes easier. Retrieving data works for both IDs

1.7.4 (2018-04-03)

  • (AlCalzone) Fix filename handling for states with special characters

1.7.3 (2018-03-28)

  • (Apollon77) Respect 'keep forever' setting for retention from datapoint configuration

1.7.2 (2018-02-05)

  • (bondrogeen) Admin3 Fixes

1.7.1 (2018-01-31)

  • (Bluefox) Admin3 Fixes

1.7.0 (2018-01-17)

  • (bluefox) Ready for Admin3

1.6.6 (2017-12-20)

  • (bluefox) translations

1.6.5 (2017-10-05)

  • (Apollon77) fix relog value feature

1.6.4 (2017-08-12)

  • (bluefox) add "save last value" option

1.6.3 (2017-08-03)

  • (Apollon77) fix behaviour of log interval to always log the current value

1.6.2 (2017-04-07)

  • fix in datatype conversions

1.6.0 (2017-02-28)

  • (Apollon77) Replace some characters in history filenames

1.5.3 (2017-02-22)

  • (Apollon77) Small fix for older configurations

1.5.2

  • (Apollon77) Enhance Min-Delta logic for datapoints from type mixed

1.5.1 (2017-01-16)

  • (bluefox) Fix handling of float values in Adapter config and Datapoint config.

1.5.0 (2016-12-01)

  • (Apollon77) Add messages enableHistory/disableHistory
  • (Apollon77) add support to log changes only if value differs a minimum value for numbers
  • (Apollon77) Fixing aggregate calculation

1.4.0 (2016-10-29)

  • (Apollon77) add option to re-log unchanged values to make it easier for visualization
  • (Apollon77) added converter scripts to move history data to db

1.3.1 (2016-09-25)

  • (Apollon77) Fixed: ts is assigned as val
  • (bluefox) Fix selector for history objects

1.3.0 (2016-08-30)

  • (bluefox) сompatible only with new admin

1.2.0 (2016-08-27)

  • (bluefox) change name of object from history to custom

1.1.0 (2016-08-27)

  • (bluefox) fix aggregation of last point
  • (bluefox) aggregation none just deliver the raw data without any aggregation

1.0.5 (2016-07-24)

  • (bluefox) fix aggregation on large intervals

1.0.4 (2016-07-05)

  • (bluefox) fix aggregation on seconds

1.0.3 (2016-05-31)

  • (bluefox) draw line to the end if ignore null

1.0.2 (2016-05-29)

  • (bluefox) switch max and min with each other

1.0.1 (2016-05-28)

  • (bluefox) calculate end/start values for "on change" too

1.0.0 (2016-05-20)

  • (bluefox) change default aggregation name

0.4.1 (2016-05-14)

  • (bluefox) support sessionId

0.4.0 (2016-05-05)

  • (bluefox) use aggregation file from sql adapter
  • (bluefox) fix the values storage on exit
  • (bluefox) store all cached data every 5 minutes
  • (bluefox) support of ms

0.2.1 (2015-12-14)

  • (bluefox) add description of settings
  • (bluefox) place aggregate function into separate file to enable sharing with other adapters
  • (smiling-Jack) Add generate Demo data
  • (smiling-Jack) get history in own fork
  • (bluefox) add storeAck flag
  • (bluefox) mockup for onchange

0.2.0 (2015-11-15)

  • (Smiling_Jack) save and load in adapter and not in js-controller
  • (Smiling_Jack) aggregation of data points
  • (Smiling_Jack) support of storage path

0.1.3 (2015-02-19)

  • (bluefox) fix small error in history (Thanks on Dschaedl)
  • (bluefox) update admin page

0.1.2 (2015-01-20)

  • (bluefox) enable save&close button by config

0.1.1 (2015-01-10)

  • (bluefox) check if state was not deleted

0.1.0 (2015-01-02)

  • (bluefox) enable npm install

0.0.8 (2014-12-25)

  • (bluefox) support of de-bounce interval

0.0.7 (2014-11-01)

  • (bluefox) store every change and not only lc != ts

0.0.6 (2014-10-19)

  • (bluefox) add configuration page

License

The MIT License (MIT)

Copyright (c) 2014-2023 Bluefox [email protected], Apollon77

Copyright (c) 2016 Smiling_Jack

Copyright (c) 2014 hobbyquaker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

iobroker.history's People

Contributors

alcalzone avatar aokhrimenko avatar apollon77 avatar bondrogeen avatar crunchip77 avatar deepcoresystem avatar dependabot[bot] avatar foxriver76 avatar fredf63 avatar germanbluefox avatar greenkeeper[bot] avatar hobbyquaker avatar homoran avatar iobrokertranslator avatar jey-cee avatar johnnybyzhang avatar klein0r avatar kohennigs avatar ldittmar81 avatar lgtm-migrator avatar lonsimbt avatar meistertr avatar paul53 avatar petervoronov avatar pmant avatar simone1999 avatar smiling-jack avatar tuxyme avatar unclesamswiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iobroker.history's Issues

Filter and history download do not work as expected

In the history of an object there is a way to filter. One can enter date from to and time from to. The result is unpredictable. With German date format it is not working at all. With american date format it works sometimes.

image

Adapter version is 1.9.10

Konfigseite öffnet nicht mehr

Leider klappt das Menü zum konfigurieren der History-Einstellung nicht mehr auf.

Ich vermute, dass die 3 Storage-Optionen: History, awattar und sourceanalytix sich hier gegenseitig behindern, keiner dieser öffnet sich mehr nach dem drauf klicken.

Screenshot 2020-12-12 at 21 48 36

vielleicht gibt es eine Chance, dass ihr das nachstellen könnt?! Braucht ihr noch weitere Daten von mir?

beste Grüße
Lars

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

Store data of today into a RAM disk

Aufgrund der Tatsache, dass jeden Tag ein neuer Ordner für die Speicherung der aktuellen Daten erzeugt wird, halte ich es für eine gute Idee, den aktuellen Ordner in einer RAM-Disk (tempfs) zu erstellen und den Ordner vom Vortag von der RAM-Disk in den Flash-Speicher zu verschieben. Für den Lesezugriff könnte ein Symlink auf den Ordner der RAM-Disk erzeugt werden.
Grund: Die Schreibbelastung des Flash-Speichers würde dramatisch sinken.

Bei Stop(kill) der History-Instanz müsste der aktuelle Ordner von der RAM-Disk auf den Flash-Speicher kopiert werden, um bei History-Start wieder in die RAM-Disk verschoben zu werden.

RangeError: Maximum call stack size exceeded at tryParse

Systemdata Bitte Ausfüllen
Hardwaresystem: i5-5300U; 8GB RAM; 500GB; Lenovo X250
Arbeitsspeicher: 5GB
Festplattenart: 500GB SSD
Betriebssystem: Windows 10 Pro 1903 aktuell
Node-Version: 10.16.3
Nodejs-Version: v10.16.3
NPM-Version: 6.9.0
Installationsart: Installer @Stabilostick
Image genutzt: Installer
Ort/Name der Imagedatei: Installer 1.5.14

Vorgeschichte:

  • Vor einigen Tagen einige zusätzliche Datenpunkte zu hystory aufgenommen. Lief aber alles
  • Heute wegen update Rechner und damit ioBroker neu gestartet

Problem
Neustart wird unendlich wiederholt.
Irgedwann erscheint im Log die Meldung

admin.0	2019-10-26 08:12:47.241	info	terminating http server on port 8081

Auffälligkeit:

history.0	2019-10-26 08:11:29.571	error	exception by stop: Cannot read property 'push' of undefined
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ0122987.1.STATE.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ01
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ0122987.1.INSTALL_TEST.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ0035264.1.STATE.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ00
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*LEQ0035264.1.INSTALL_TEST.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*IEQ0509515.1.STATE.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0.*IEQ05
history.0	2019-10-26 08:11:29.571	error	Cannot store file c:/ioBroker-data/History/20191026/history.hm-rpc.0.*IEQ0509515.1.INSTALL_TEST.json: Error: ENOENT: no such file or directory, open 'c:/ioBroker-data/History/20191026/history.hm-rpc.0
history.0	2019-10-26 08:11:29.571	error	RangeError: Maximum call stack size exceeded at tryParse (C:\Program Files\iobroker\ioBrMain2\node_modules\socket.io-parser\index.js:336:12) at decodeString (C:\Program Files\iobroker\ioBrMain
history.0	2019-10-26 08:11:29.570	error	uncaught exception: Maximum call stack size exceeded```
code_text

Die Fehlermeldungen wegen der "*" in den Verknüpfungsnamen der Rauchmelder sind normal. Die hatte ich immer, obwohl ich das Sonderzeichenskript schon habe durchlaufen lassen.
Aber die anderen, insbes Stack overflow sind neu.
Das scheint dann zu einer Restart loop zu führen.
Wenn ich History 1.8.6 disable läuft ioBroker wieder und die Restart-Loop ist beendet.
History 1.8.6
Datenbasis: Objekte: 9052, Zustände: 7094
Was kann ich tun?

See also https://forum.iobroker.net/topic/26103/restart-loop-history-maximum-call-stack-size-exce/2

Question: History Daten im Javascript

Hallo,
ich möchte gerne von einem Datenpunkt den Durchschnitt der History Werte jeden Tag von 0 Uhr bis jetzt in einen weiteren Datenpunkt schreiben.
Mit dem folgenden Skript funktioniert das auch mit einem festen Unix Timestamp als Startpunkt. Dieser müsste aber variabel "Heute 0 Uhr" sein und ich konnte nicht herausfinden wie sich das umsetzen lässt.
Ich hoffe mir kann hier jemand helfen.

`//Autarkie Heute
var end = Date.now();

createState('0_userdata.0.Solar.AutarkieHeute');
sendTo('history.0', 'getHistory', {
id: '0_userdata.0.Solar.Autarkie',
options: {
start: 1614556801,
end: end,
aggregate: 'average',
}
}, function (result) {
for (var i = 0; i < result.result.length; i++) {
setState('0_userdata.0.Solar.AutarkieHeute', (result.result[i].val), true);
}
});`

history2db.js does not find the "common adapter utils"

Hello,
I try write the history to influx.

My actual path is

/opt/iobroker/node_modules/iobroker.history/converter

The following error occurs

root@tessa:/opt/iobroker/node_modules/iobroker.history/converter# nodejs history2db.js influxdb.0 20161001 /history
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/opt/iobroker/node_modules/iobroker.history/converter/../lib/utils'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.history/converter/history2db.js:9:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
root@tessa:/opt/iobroker/node_modules/iobroker.history/converter# 

This is the same error as described in
https://www.forum.iobroker.net/topic/3609/history2db-converter/38

Problem mit "sendTo ("history.0", "storeState"," im Jave script in History Version 1.84

Hallo,
die send to History methode funktioniert in meinen Java Scripten nicht mehr seit dem Update auf Version 1.84.
Go back zu Version 1.74 behob das Problem

Hier der Code im JAvascript:
sendTo ("history.0", "storeState", {id: ObjEinspeisung5min, state: {
"val": mytempVar,
"ack": 1,
"ts": new Date(JahrAkt + "." + MonatAkt + "." + TagAkt + " " + StundeAkt + ":" + MinuteAkt + ":00").getTime(),
"q": 0
}
});

Hier die Logs:

history.0 2018-07-02 18:44:10.282 error message messagebox.system.adapter.history.0 [object Object] Cannot read property 'id' of undefined
history.0 2018-07-02 18:44:10.244 error at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
history.0 2018-07-02 18:44:10.244 error at Manager. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
history.0 2018-07-02 18:44:10.244 error at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:233:12)
history.0 2018-07-02 18:44:10.244 error at Socket.onevent (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:275:10)
history.0 2018-07-02 18:44:10.244 error at Socket.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
history.0 2018-07-02 18:44:10.244 error at Socket. (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:52:30)
history.0 2018-07-02 18:44:10.244 error at Object.change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:3398:41)
history.0 2018-07-02 18:44:10.244 error at Object.message (/opt/iobroker/node_modules/iobroker.history/history.js:146:9)
history.0 2018-07-02 18:44:10.244 error at processMessage (/opt/iobroker/node_modules/iobroker.history/history.js:225:9)
history.0 2018-07-02 18:44:10.244 error at storeState (/opt/iobroker/node_modules/iobroker.history/history.js:994:82)
history.0 2018-07-02 18:44:10.244 error TypeError: Cannot read property 'id' of undefined

Only enable logging and print to log if the object has actually changed

See: https://forum.iobroker.net/viewtopic.php?p=156210#p156210

The reason was that the state object was rewritten every time a new measurement came in. The common.history part never actually changed, but history (or in that case sql) picked it up as "enabling" the logging and printed a corresponding output to the log.

I think that can be suppressed by checking if the common.history part of the object in question has changed.

get Timestamp

is it possible to get this timstamp with an function/javascript?
image

Delta Prüfung für Delta kleiner 1

Wenn ich die Einstellungen der Deltaprüfung richtig verstehe sind für Delta nur Werte größer 1 vorgesehen.

Bei meiner Applikation bekomme ich Temperaturmesswerte inklusive zwei Nachkommastellen vom Sensor, die gerade auf der letzten Nachkommastelle stark springen.

Wenn ich die Deltaprüfung richtig verstehe würde eine 1 einem Runden auf Integerwerte gleichkommen.
Die erste Nachkommastelle bzw. 0,5°C Schritte würden mich schon interessieren. Ist es möglich bei der Deltaprüfung auch Delta <1 zu erlauben?

Dankeschön, Jan

[Feature request] Write last data on change

Hi

If I have data that change very fast i,o, Power with a switch I get a crooked line instead a perpendicular line in Flot.
If history write (as option) the last data and the new data on change it works perfekt.

Thanks

So, nochmals auf deutsch da ich annehme das der Entwickler eh deutsch spricht und mein Englisch nicht gut ist.

Ich hätte gerne dass history (auf Wunsch) den letzten Punkt nocheinmal schreibt um in Flot senkrechte Linien zu bekommen.
Augenblicklich kann es dazu kommen das laut Kurve der Strom über eine Stunde ansteigt, statt wie es richtig ist eine Stunde auf 0 bleibt und dann sofort auf 0 springt.

Danke

An in-range update of gulp is breaking the build 🚨

The devDependency gulp was updated from 4.0.1 to 4.0.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

gulp is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Release Notes for v4.0.2

Fix

Docs

  • Add notes about esm support (4091bd3) - Closes #2278
  • Fix the Negative Globs section & examples (3c66d95) - Closes #2297
  • Remove next tag from recipes (1693a11) - Closes #2277
  • Add default task wrappers to Watching Files examples to make runnable (d916276) - Closes #2322
  • Fix syntax error in lastRun API docs (ea52a92) - Closes #2315
  • Fix typo in Explaining Globs (5d81f42) - Closes #2326

Build

  • Add node 12 to Travis & Azure (b4b5a68)
Commits

The new version differs by 9 commits.

  • 069350a Release: 4.0.2
  • b4b5a68 Build: Add node 12 to Travis & Azure
  • 5667666 Fix: Bind src/dest/symlink to the gulp instance to support esm exports (ref standard-things/esm#797)
  • 4091bd3 Docs: Add notes about esm support (closes #2278)
  • 3c66d95 Docs: Fix the Negative Globs section & examples (closes #2297)
  • 1693a11 Docs: Remove next tag from recipes (closes #2277)
  • d916276 Docs: Add default task wrappers to Watching Files examples to make runnable (ref #2322)
  • ea52a92 Docs: Fix syntax error in lastRun API docs (closes #2315)
  • 5d81f42 Docs: Fix typo in Explaining Globs (#2326)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Nur aktueller Tag

v1.9.9

Hallo, ich schaue mir grad die History Tabelle am Leistungsobjekt eines Messsensors an und sehe die Änderungen vom heutigen Tag. Nun hab ich versucht das Datum von gestern einzutragen .. und beim Betätigen des Refresh buttons passierte gar nichts .. die Werte von heute sind nicht mal verschwunden. Fenster verlassen und nochmal rein .. irgendwann stand da "no data". Beim schreiben dieses Textes purzeln Werte von heute ein obwohl im Filter noch immer das Datum von gestern eingetragen ist. Dies nur als Kontext .. wenn das Verhalten grundsätzlich normal ist .. ok.

ABER .. ich warum sehe ich keine Daten von gestern? Hatte das Problem auch schon beim FBpresence-Adapter .. dass dort immer behauptet wurde es gäbe keine historischen Daten. Retention Time steht alles auf Default .. 1 Year.

Help!

minmax liefert falsche Werte

Sollte die Antwort auf eine Auswertung wirklich so aussehen?
Die Optionen sind als Zeitraum genau ein Jahr mit Intervall ein Jahr.
Erster Wert die Temperatur, zweiter Wert der Zeitstempel.

13:44:26.384 | info | javascript.0 script.js.test: 17 2018-07-28T11:44:23.203Z
13:44:26.385 | info | javascript.0 script.js.test: 17 2018-09-12T21:40:00.011Z
13:44:26.386 | info | javascript.0 script.js.test: -6.5 2019-01-22T04:40:04.792Z
13:44:26.386 | info | javascript.0 script.js.test: 39.6 2019-06-30T14:25:08.583Z
13:44:26.387 | info | javascript.0 script.js.test: 30.2 2019-07-28T11:30:43.063Z
13:44:26.388 | info | javascript.0 script.js.test: 30.2 2019-07-28T11:44:23.203Z

bei nur min lautet die Antwort so:

13:47:02.206 | info | javascript.0 script.js.test: -6.5 2018-07-28T11:47:00.837Z
13:47:02.206 | info | javascript.0 script.js.test: -6.5 2019-01-26T23:47:00.837Z
13:47:02.207 | info | javascript.0 script.js.test: -6.5 2019-07-28T11:47:00.837Z

Im Flot wird mir als minmax auch nicht die richtigen Werte angezeigt.

error: this adapter does not allow multiple instances

Something goes wrong. First install of history adapter and error:

$ ./iobroker add history
install adapter history
no node modules to install
got c:\Work\ioBroker.nodejs/adapter/history/admin
upload history.admin c:\Work\ioBroker.nodejs/adapter/history/admin/.gitignore .gitignore application/octet-stream
got c:\Work\ioBroker.nodejs/adapter/history/www
upload history c:\Work\ioBroker.nodejs/adapter/history/www/.gitignore .gitignore application/octet-stream
object system.adapter.history created
object _design/history created
error: this adapter does not allow multiple instances
ERROR: process exited with code 1

getHistory liefert nur daten von heute

aktuelle Installation:
Mein Code
var end = Date.now() - (60 * 1000 * 60 * 13 );
var start = end - ( 60 * 1000 * 3 )
log (""+new Date(start).toUTCString())
log (""+new Date(end).toUTCString())

    sendTo('history.0', 'getHistory', {
      id: id,
      options: {
          start:      start,
          end:        end,
          aggregate: 'none'
      }
    }, function (result) {

liefert nur Daten wenn die Ende Zeit noch heute ist. Sobald das Zeitfenster auf gestern liegt kommt nichts mehr.
Wenn ich die Daten in Flot ansehe sind sie vorhanden.

danke
Andreas

Limit of 500 states if no options.count is defined

Werden nur die Optionen start, end und aggregate: 'none' angegeben, erfolgt eine Begrenzung der Anzahl der Zustände bei "getHistory" auf 500.

Siehe Forum

Versions:

  • Adapter version: 1.9.3
  • JS-Controller version: 3.1.4
  • Node version: 12.18.0
  • Operating system: Ubuntu 18.04

Das gleiche trifft auf den SQL-Adapter zu.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Verify Compact mode for your adapter

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

Please check ioBroker.history with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

An in-range update of @iobroker/adapter-core is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The dependency @iobroker/adapter-core was updated from 2.2.1 to 2.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@iobroker/adapter-core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/appveyor/branch: Waiting for AppVeyor build to complete (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 67 commits.

  • 2fdeeaa Release v2.3.0
  • 3836d11 Merge pull request #211 from ioBroker/dependabot/npm_and_yarn/types/node-13.11.1
  • 5128f3a Merge pull request #209 from ioBroker/dependabot/npm_and_yarn/eslint-plugin-prettier-3.1.3
  • 187669d chore(deps-dev): bump @types/node from 13.11.0 to 13.11.1
  • a7b17c2 chore(deps-dev): bump eslint-plugin-prettier from 3.1.2 to 3.1.3
  • 4cff9e6 Merge pull request #207 from ioBroker/dependabot/npm_and_yarn/types/sinon-chai-3.2.4
  • 65d5a63 Merge pull request #208 from ioBroker/dependabot/npm_and_yarn/types/node-13.11.0
  • d7a13fc Merge pull request #205 from ioBroker/dependabot/npm_and_yarn/ts-node-8.8.2
  • 4a0373b chore(deps-dev): bump @types/node from 13.9.5 to 13.11.0
  • 46b8a9d chore(deps-dev): bump @types/sinon-chai from 3.2.3 to 3.2.4
  • 67bcb28 chore(deps-dev): bump ts-node from 8.8.1 to 8.8.2
  • 5f95ad5 Merge pull request #203 from ioBroker/dependabot/npm_and_yarn/types/node-13.9.5
  • cade7f4 chore(deps-dev): bump @types/node from 13.9.3 to 13.9.5
  • 799b881 Merge pull request #199 from ioBroker/dependabot/npm_and_yarn/types/node-13.9.3
  • c728713 Merge pull request #200 from ioBroker/dependabot/npm_and_yarn/mocha-7.1.1

There are 67 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

History Adapter - NAS Drive smb 3.1.1

Bildschirmfoto 2020-08-05 um 17 41 11

In the past I mounted my network drive via smb1. This worked perfectly and I could write all the history data to the mapped drive.

I changed to smb 3.1.1
I can reach the mapped drive via ssh and for example backup Adapter can write on NAS.
History adapter will not write on NAS. It creates the folder of the day and creates only ZERO byte files. The error log states read/write errors.
Any idea? Is history able to read/write from mounted smb 3 drives?

Mounting via fstab:
//192.168.1.1/Luftiger-SG/4TB_HDD_SG/Smarthome/iobroker/Data /media/Luftiger_iobroker_Data cifs credentials=/home/pi/.smbcredentials,vers=3.1.1,uid=1000,gid=1000,rw,dir_mode=0777,file_mode=0777,x-systemd.automount,x-systemd.requires=network-online.target 0 0

6
5
4
3
2
1

history.0 terminated by request of the instance itself

Hallo zusammen,
ich bekomme jetzt immer mal wieder diese meldungen, leider kann ich damit weniger was anfangen...
kann mir hier jemand helfen ?

host.iobroker 2021-01-13 19:06:26.672 error instance system.adapter.history.0 terminated by request of the instance itself and will not be restarted, before user restarts it.
history.0 2021-01-13 19:06:26.157 warn (2839) Got terminate signal. Checking desired PID: 2854 vs own PID 2839

old files should be deleted automatically

All my history settings have a storage retention of 2 weeks. Files older than 2 weeks should be deleted automatically, but it does not happen.

Annotation:
My history data is stored in /tmp/history (RAM disk).

retrieve all history values

Is your feature request related to a problem? Please describe.
I want to retrieve all history values. Unless I can only get 3 days in the past. I want get all values.

Describe the solution you'd like
Please tell me which start value I have to use 0 or -1 is expected to get all values.
The end value could be empty or both values can be empty. Please consider this case in documentation.

[Enhancement] Do not trigger on obj change if own custom object === before change

Behaviour : Adapter is triggered at every object change, this is needed to catch states added to datalogging.

Problem : If adapters (like corona-statistics or others) update their information in object with extend object (or setObject) the adapter triggers every time.

Usually a unneeded setObject (or extend) should be avoided within the adapter itself
( see issue of discovery as example : DrozmotiX/ioBroker.discovergy#75

But in situation like scheduled adapters, this is almost impossible as we would lose name changes or other relevant items.
Option would be to have an getObject first here in th adapter, based on the situation the developer must decide how to implement.

DrozmotiX/ioBroker.coronavirus-statistics#39

Proposed solution :

  • Load all activated states into an object array with their custom[this.instancename]
  • at object changes, compare this stored custom object with the triggered one
  • Only handle routine for updates in cataloguer if custom object for this namespace is changed.

@Apollon77 please assign to me

Update stable version in repo to 1.8.7

Think about update stable version to 1.8.7

Version: stable=1.8.6 (373 days old) => latest=1.8.7 (183 days old)
Installs: stable=8210 (61.23%), latest=3325 (24.8%), total=13409
Click to edit

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.1.4 to 6.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/appveyor/branch: Waiting for AppVeyor build to complete (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.2.0

6.2.0 / 2019-07-18

🎉 Enhancements

🐛 Fixes

📖 Documentation

🔍 Coverage

🔩 Other

Commits

The new version differs by 39 commits.

  • bd47776 Release v6.2.0
  • cc595af update CHANGELOG.md for v6.2.0 [ci skip]
  • 59d70ee fix: remove duplicate line-height property (#3957)
  • f77cac4 fix: do not redeclare variable (#3956)
  • 6201e42 Hide stacktrace when cli args are missing (#3963)
  • 88f45d5 Don't re-initialize grep option on watch re-run (#3960)
  • 5d4dd98 Fix No Files error when file is passed via --files (#3942)
  • 15b96af Collect test files later (#3953)
  • ccee5f1 Base reporter store ref to console.log (#3725)
  • 47318a7 update @mocha/contributors to v1.0.4 (#3944)
  • c903147 More, improved integration tests for watching (#3929)
  • e341ea4 Update CI config files to use Node-12.x (#3919)
  • 3064d25 update @mocha/docdash to v2.1.1 (#3945)
  • 9ea45e7 do not fork if no node flags present (#3827)
  • d02a096 modify Mocha constructor to accept options.global or options.globals (#3914)

There are 39 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error while migrating to SQL

Hi,

I'm trying to move my history to a newly installed SQL database. But when analyzing the database i get the following:

/opt/iobroker/node_modules/iobroker.history/converter $ nodejs analyzesql.js sql.0 debug
module.js:550
    throw err;
    ^

Error: Cannot find module '/opt/iobroker/node_modules/iobroker.history/converter/../lib/utils'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.history/converter/analyzesql.js:9:14)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

I'm not surprised that he doesn't find the file /lib/utis, cause it's not there. xD
But isn't on github neither?

Thanks for helping!

history2db.js gives lot of errrors in iobroker log

I want to move my history data to influxdb with the converter.

The analyzeinflux.js gives three files earliestDBValues.json, existingDBTypes.json and existingDBValues.json

When I start history2db.js with the --simulate parameter it seems everthing should work. But when I start to convert the data i get only faults in iobroker log like:

`
| history.0 2020-01-25 16:16:18.381 error (1626) storeState called with invalid data
  | history.0 2020-01-25 16:16:18.380 error (1626) storeState called with invalid data
  | history.0 2020-01-25 16:16:18.363 error (1626) storeState called with invalid data
  | influxdb.0 2020-01-25 16:16:19.639 error (8469) storeState called with invalid data
  | influxdb.0 2020-01-25 16:16:19.632 error (8469) storeState called with invalid data
  | influxdb.0 2020-01-25 16:16:19.631 error (8469) storeState called with invalid data

`
In terminal I see no problems after starting ther conversion

I used "2" for the delay parameter. When I use 10 I get the same output in the log.

nodejs 10.17.0
npm 6.11.3
using debian10 with the iobroker system and influxdb, they all are up to date

Thank you

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/ioBroker/ioBroker.history

  • [E151] common.connectionType type has an invalid type none
  • [E506] "admin/jsonCustom.json" not found, but custom support is declared
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2014-2022 hobbyquaker [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2014-2022 hobbyquaker [email protected]" at the start of LICENSE

I have also found warnings that may be fixed if possible.

  • [W801] .npmignore not found

Thanks,
your automatic adapter checker.

Vollständige Anleitung zur Migration von History Daten auf InfluxDB

Man findet in der Readme eine Anleitung zur Umstellung von ioBroker History auf InfluxDB: https://github.com/ioBroker/ioBroker.history/blob/master/docs/de/README.md#history-daten-in-sql-oder-influxdb-%C3%BCbernehmen

Vielen Dank für die detaillierte Anleitung. Leider fehlen mir für mein Verständnis ein paar Infos: Kann man hier noch genauer ergänzen, welche Schritte nötig sind, um ein System mit bestehender History (in Files) in die InfluxDB zu migrieren, wenn die InfluxDB gerade neu installiert wurde, aber die History-Files schon bestehen? - Initial ist die neue Influx Datenbank leer, somit werden keine Analysetools benötigt. Es müssten einfach alle Daten in die neue InfluxDB gespielt werden.

Es geht außerdem bei der Anleitung nicht klar hervor, ob man die Instanzen (History, InfluxDB) beim Ausführen des Scripts zum Migrieren deaktivieren muss oder ob man vl sogar den gesamten ioBroker Dienst deaktivieren soll?

Des weiteren frage ich mich, ob ich nach dem Migrieren alle History-Objekte einzeln öffnen und für History deaktivieren und für InfluxDB aktivieren muss oder ob es hier auch eine Möglichkeit gibt, jedes History-Objekt von File-basierter Speicherung auf InfluxDB umzustellen.

Vielen Dank

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.