NEWS
Stromzähler auslesen per SML/Volkszähler und so …
-
Soooo … für alle IR-Nutzer die beim testen helfen wollen hier bräuchte ich nochmal support. Die Library mit der ich alles auslesen kann ist fertig (die wird die Basis für den Adapter).
Bitte auf dem Rechner wo das USB-IR-Ding dran ist folgendes machen:
-
Verzeichnis anlegen (irgendwo)
-
npm install smartmeter-obis
-
Testfile anlegen:
var SmartmeterObis = require('smartmeter-obis'); var options = { 'protocol': "SmlProtocol", 'transport': "SerialResponseTransport", 'transportSerialPort': "/dev/ir-usb0", 'transportSerialBaudrate': 9600, 'requestInterval': 10, 'obisNameLanguage': 'en' }; function displayData(obisResult) { //console.log("Received data: " + Object.keys(obisResult)); //console.log(JSON.stringify(obisResult,null,2)); for (var obisId in obisResult) { console.log(obisResult[obisId].idToString() + ": " + SmartmeterObis.ObisNames.resolveObisName(obisResult[obisId], options.obisNameLanguage).obisName + ' = ' + obisResult[obisId].valueToString()); } } var smTransport = SmartmeterObis.init(options, displayData); smTransport.process(); setTimeout(process.exit, 60000);
Dann gibts eine Ausgabe ala
129-129:199.130.3*255: Manufacturer ID = EMH 1-0:0.0.9*255: Device ID = 0901454d48000041f045 1-0:1.8.0*255: Time integral 1 Sum active power + (Total) = 15622.63 kWh 1-0:1.8.1*255: Time integral 1 Sum active power + (T1) = 15622.63 kWh 1-0:1.8.2*255: Time integral 1 Sum active power + (T2) = 0 kWh 1-0:16.7.0*255: Instantaneous value Total active power (Total) = 491.8 W
Dann bitte mal Feedback geben :-))
Ansonsten gehen die Files auch
-
-
Soooo … für alle IR-Nutzer die beim testen helfen wollen hier bräuchte ich nochmal support. Die Library mit der ich alles auslesen kann ist fertig (die wird die Basis für den Adapter).
Bitte auf dem Rechner wo das USB-IR-Ding dran ist folgendes machen:
-
Verzeichnis anlegen (irgendwo)
-
npm install smartmeter-obis
-
Testfile anlegen:
var SmartmeterObis = require('smartmeter-obis'); var options = { 'protocol': "SmlProtocol", 'transport': "SerialResponseTransport", 'transportSerialPort': "/dev/ir-usb0", 'transportSerialBaudrate': 9600, 'requestInterval': 10, 'obisNameLanguage': 'en' }; function displayData(obisResult) { //console.log("Received data: " + Object.keys(obisResult)); //console.log(JSON.stringify(obisResult,null,2)); for (var obisId in obisResult) { console.log(obisResult[obisId].idToString() + ": " + SmartmeterObis.ObisNames.resolveObisName(obisResult[obisId], options.obisNameLanguage).obisName + ' = ' + obisResult[obisId].valueToString()); } } var smTransport = SmartmeterObis.init(options, displayData); smTransport.process(); setTimeout(process.exit, 60000);
Dann gibts eine Ausgabe ala
129-129:199.130.3*255: Manufacturer ID = EMH 1-0:0.0.9*255: Device ID = 0901454d48000041f045 1-0:1.8.0*255: Time integral 1 Sum active power + (Total) = 15622.63 kWh 1-0:1.8.1*255: Time integral 1 Sum active power + (T1) = 15622.63 kWh 1-0:1.8.2*255: Time integral 1 Sum active power + (T2) = 0 kWh 1-0:16.7.0*255: Instantaneous value Total active power (Total) = 491.8 W
Dann bitte mal Feedback geben :-))
Ansonsten gehen die Files auch
`
Ist das ein Script das ich in den iobroker einfügen muss? Denn bei mir ist es ein separater PI auf dem der Volkszähler momentan läuft, aber ich habe jetzt dort in einen separaten Ordner das NPM Paket Smartmeter-Obis installiert…. aber wo füge ich das Script jetzt ein?
Gruß
Adrian
-
-
Hi,
ist erstmal nur zum testen ob das alles klappt (und nicht nur bei mir). Das kannst Du (sobald der Adapter da ist) alles wieder löschen … aber das IR-Device muss dann an den ioBroker-Rechner oder ein ioBroker-Slave auf den Raspi wo das heute dran hängt.
Zur Frage: Wenn du ein verzeichnis angelegt hast (nehmen wir mal an /opt/test-sml) und dort die Lib installiert hast, hast Du dann indem Verzeichnis ein Unterverzeichnis namens node_modules. korrekt? Dann hat das mit der installation geklappt.
Das testskript legst du jetzt in dem ersten verzeichnis z.B als "opt/test-sml/test.js" an.
Und starten kannst Du es dann in dem verzeichnis per "node test.js".
Das Skript läuft aktuell eine Minuten und gibt aus was er gelesen hat. Danach beendet es sich ... ist ja nur test
Kommst Du mit der Anleitung klar?
Ich weiss nicht ob Du ggf vzlogger stoppen musst weil der ja auch das Serielle Device offen hat... könnte sich beissen
-
Kommst Du mit der Anleitung klar? `
Ei sicher komme ich mit der Anleitung klar….
und bekomme auch schon Daten geliefert...
raspberrypi:/opt/smartmeter# node test.js 129-129:199.130.3*255: Manufacturer ID = EMH 1-0:0.0.9*255: Device ID = xxx 1-0:1.8.0*255: Time integral 1 Sum active power + (Total) = 5743.9201 kWh 1-0:1.8.1*255: Time integral 1 Sum active power + (T1) = 5743.9201 kWh 1-0:1.8.2*255: Time integral 1 Sum active power + (T2) = 0 kWh 1-0:16.7.0*255: Instantaneous value Total active power (Total) = 969.5 W 129-129:199.130.5*255: Forename/Public Key = xxx
Sieht schon mal sehr gut aus… ist sogar mein momentaner Verbrauch :lol:
Gruß
Adrian
-
Na super :-))
Kannst auch in dem "options" die Sprache auf "de" stellen, dann müsste es deutsch rauskommen was die Namen angeht
Plan ist das der Adapter die "obis-ID" (mit "_" anstelle der Punkte) als States anlegt den textuellen Namen als Namen nimmt und den Wert halt mit der Einheit als Einheit.
Dann kann man selbst bestimmen ob man alles lesen will oder nur alle x Sekunden (dann halt ggf Datensätze ignoriert) …
-
Ja Sprache habe ich dann auch mal umgestellt und siehe da er kann auch deutsch
node test.js 129-129:199.130.3*255: Manufacturer ID = EMH 1-0:0.0.9*255: Device ID = xxx 1-0:1.8.0*255: Zählerstand 1 Summe Wirkarbeit Bezug + (Total) = 5744.208100000001 kWh 1-0:1.8.1*255: Zählerstand 1 Summe Wirkarbeit Bezug + (T1) = 5744.208100000001 kWh 1-0:1.8.2*255: Zählerstand 1 Summe Wirkarbeit Bezug + (T2) = 0 kWh 1-0:16.7.0*255: Momentanwert Gesamtwirkleistung (Total) = 879.4000000000001 W 129-129:199.130.5*255: Forename/Public Key =
Gruß
Adrian
-
Teilweise zumindestens
Ob ich das vor Release noch geradebiege weiss ich noch nicht. Diese "Fachbegriffe" zu übersetzen ist ein echter sch**** .. vllt ist ja jemand hier aus dem Fach und kann da helfen
Ansonsten bliebts wohl erstmal bei nem Mischmasch
-
Ich erwarte sehnsüchtig den Adapter! Dann kann ich wieder einen Pi für andere Sachen nutzen [emoji6]
Und ich hätte die Daten direkt ohne Umwege in ioBroker das wäre ein Traum [emoji7]
Gesendet von iPhone mit Tapatalk Pro
-
Diese "Fachbegriffe" zu übersetzen ist ein echter sch**** .. vllt ist ja jemand hier aus dem Fach und kann da helfen
Ansonsten bliebts wohl erstmal bei nem Mischmasch `
Was willst du genau übersetzt haben!? Vielleicht kann ich dir behilflich sein!?
Gruß
Adrian
Gesendet von iPhone mit Tapatalk Pro
-
Das ist alles hier drin:
https://github.com/Apollon77/smartmeter … isNames.js
Ich hab gefühlt die letzten 2 Tage nur diese Texte aus verschiedenen Quellen dort gesammelt und einiges in Deutsch und einiges in englisch. Deswegen hab ich das jetzt für mich erstmal unter "offenes Todo" abgehakt ;-)) Grad keinen Bock mehr auf Texte
Will jetzt noch Basisdoku und noch fehlendes Fehlerhandling für die Library und dann den Adapter bauen ...
"Man"
müsste jetzt pro Unterstruktur (siehst dann was ich meine) immer die Nummern abgleichen nicht das in einer Sprache welche Fehlen die bei der anderen da sind. Und da wo keine Übersetzung ist oder falsche Sprache ist halt übersetzen
Jede Hilfe wird dankend angenommen!!
Änderungen mir gerne als Pull-Request oder E-Mail oder PN schicken
-
Leider kein Erfolg
Installation:
! ````
root@miniyou:/opt/test-sml# npm install smartmeter-obis
npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.12.6","npm":"2.11.2"})
serialport@4.0.7 install /opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport
node-pre-gyp install --fallback-to-build
! node-pre-gyp ERR! Tried to download(404): https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v14-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for serialport@4.0.7 and node@0.12.6 (node-v14 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from /root/.node-gyp/0.12.6/deps/v8/include/v8stdint.h:13:0,
from /root/.node-gyp/0.12.6/deps/v8/include/v8.h:18,
from /root/.node-gyp/0.12.6/src/node.h:61,
from ../node_modules/nan/nan.h:47,
from ../src/./serialport.h:7,
from ../src/serialport.cpp:1:
/root/.node-gyp/0.12.6/src/node.h: In function ‘void node::FatalException(const v8::TryCatch&)’:
/root/.node-gyp/0.12.6/src/node.h:275:61: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
return FatalException(v8::Isolate::GetCurrent(), try_catch);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:273:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use FatalException(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘v8::Local v8::valuenode::Encode(const void*, size_t, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:287:62: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
return Encode(v8::Isolate::GetCurrent(), buf, len, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:282:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Encode(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeBytes(v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:298:62: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:294:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:312:75: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:307:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(v8::Handlev8::string, node::encoding)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:58:52: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, v8::Handlev8::string, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:52): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), string, enc);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:55:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(const char*, size_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:67:50: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:65:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:80:69: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, length, callback, hint);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:75:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::Use(char*, uint32_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:90:50: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return Use(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:88:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Use(isolate, ...)",
^
In file included from ../src/./serialport.h:7:0,
from ../src/serialport.cpp:1:
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, size_t, node::smalloc::FreeCallback, void*)’:
../node_modules/nan/nan.h:692:34: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
hint);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::CopyBuffer(const char*, uint32_t)’:
../node_modules/nan/nan.h:707:67: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, uint32_t)’:
../node_modules/nan/nan.h:733:67: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘void Nan::FatalException(const Nan::TryCatch&)’:
../node_modules/nan/nan.h:868:73: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
^
../node_modules/nan/nan.h: In function ‘v8::Local v8::valueNan::Encode(const void*, size_t, Nan::Encoding)’:
../node_modules/nan/nan.h:1786:44: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeBytes(v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1802:44: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeWrite(char*, size_t, v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1824:44: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
In file included from /root/.node-gyp/0.12.6/deps/v8/include/v8stdint.h:13:0,
from /root/.node-gyp/0.12.6/deps/v8/include/v8.h:18,
from /root/.node-gyp/0.12.6/src/node.h:61,
from ../node_modules/nan/nan.h:47,
from ../src/./serialport.h:7,
from ../src/serialport_unix.cpp:1:
/root/.node-gyp/0.12.6/src/node.h: In function ‘void node::FatalException(const v8::TryCatch&)’:
/root/.node-gyp/0.12.6/src/node.h:275:61: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
return FatalException(v8::Isolate::GetCurrent(), try_catch);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:273:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use FatalException(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘v8::Local v8::valuenode::Encode(const void*, size_t, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:287:62: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
return Encode(v8::Isolate::GetCurrent(), buf, len, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:282:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Encode(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeBytes(v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:298:62: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:294:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:312:75: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:307:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(v8::Handlev8::string, node::encoding)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:58:52: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, v8::Handlev8::string, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:52): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), string, enc);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:55:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(const char*, size_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:67:50: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:65:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:80:69: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, length, callback, hint);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:75:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::Use(char*, uint32_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:90:50: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return Use(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:88:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Use(isolate, ...)",
^
In file included from ../src/./serialport.h:7:0,
from ../src/serialport_unix.cpp:1:
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, size_t, node::smalloc::FreeCallback, void*)’:
../node_modules/nan/nan.h:692:34: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
hint);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::CopyBuffer(const char*, uint32_t)’:
../node_modules/nan/nan.h:707:67: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, uint32_t)’:
../node_modules/nan/nan.h:733:67: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘void Nan::FatalException(const Nan::TryCatch&)’:
../node_modules/nan/nan.h:868:73: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
^
../node_modules/nan/nan.h: In function ‘v8::Local v8::valueNan::Encode(const void*, size_t, Nan::Encoding)’:
../node_modules/nan/nan.h:1786:44: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeBytes(v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1802:44: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeWrite(char*, size_t, v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1824:44: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
CXX(target) Release/obj.target/serialport/src/serialport_poller.o
In file included from /root/.node-gyp/0.12.6/deps/v8/include/v8stdint.h:13:0,
from /root/.node-gyp/0.12.6/deps/v8/include/v8.h:18,
from /root/.node-gyp/0.12.6/src/node.h:61,
from ../node_modules/nan/nan.h:47,
from ../src/serialport_poller.cpp:5:
/root/.node-gyp/0.12.6/src/node.h: In function ‘void node::FatalException(const v8::TryCatch&)’:
/root/.node-gyp/0.12.6/src/node.h:275:61: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
return FatalException(v8::Isolate::GetCurrent(), try_catch);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:273:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use FatalException(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘v8::Local v8::valuenode::Encode(const void*, size_t, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:287:62: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
return Encode(v8::Isolate::GetCurrent(), buf, len, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:282:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Encode(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeBytes(v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:298:62: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:294:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handlev8::value, node::encoding)’:
/root/.node-gyp/0.12.6/src/node.h:312:75: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node.h:307:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(v8::Handlev8::string, node::encoding)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:58:52: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, v8::Handlev8::string, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:52): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), string, enc);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:55:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(const char*, size_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:67:50: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:65:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:80:69: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, length, callback, hint);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:75:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/root/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local v8::objectnode::Buffer::Use(char*, uint32_t)’:
/root/.node-gyp/0.12.6/src/node_buffer.h:90:50: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return Use(v8::Isolate::GetCurrent(), data, len);
^
/root/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
/root/.node-gyp/0.12.6/src/node_buffer.h:88:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Use(isolate, ...)",
^
In file included from ../src/serialport_poller.cpp:5:0:
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, size_t, node::smalloc::FreeCallback, void*)’:
../node_modules/nan/nan.h:692:34: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
hint);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::CopyBuffer(const char*, uint32_t)’:
../node_modules/nan/nan.h:707:67: warning: ‘v8::Local v8::objectnode::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘Nan::MaybeLocal v8::objectNan::NewBuffer(char*, uint32_t)’:
../node_modules/nan/nan.h:733:67: warning: ‘v8::Local v8::objectnode::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘void Nan::FatalException(const Nan::TryCatch&)’:
../node_modules/nan/nan.h:868:73: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
^
../node_modules/nan/nan.h: In function ‘v8::Local v8::valueNan::Encode(const void*, size_t, Nan::Encoding)’:
../node_modules/nan/nan.h:1786:44: warning: ‘v8::Local v8::valuenode::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeBytes(v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1802:44: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
../node_modules/nan/nan.h: In function ‘ssize_t Nan::DecodeWrite(char*, size_t, v8::Localv8::value, Nan::Encoding)’:
../node_modules/nan/nan.h:1824:44: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handlev8::value, node::encoding)’ is deprecated (declared at /root/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
, static_castnode::encoding(encoding));
^
SOLINK_MODULE(target) Release/obj.target/serialport.node
COPY Release/serialport.node
make: Leaving directory '/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/build'
smartmeter-obis@0.1.7 node_modules/smartmeter-obis
├── open-sml@0.3.1 (int64-buffer@0.1.9)
├── request@2.79.0 (is-typedarray@1.0.0, forever-agent@0.6.1, aws-sign2@0.6.0, oauth-sign@0.8.2, tunnel-agent@0.4.3, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, aws4@1.5.0, uuid@3.0.1, combined-stream@1.0.5, qs@6.3.0, form-data@2.1.2, mime-types@2.1.14, tough-cookie@2.3.2, har-validator@2.0.6, http-signature@1.1.1, hawk@3.1.3)
└── serialport@4.0.7 (bindings@1.2.1, commander@2.9.0, lie@3.1.0, debug@2.6.0, nan@2.5.1, object.assign@4.0.4)</node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::string></v8::object></v8::string></v8::object></v8::value></v8::value></v8::value></v8::value></v8::value></v8::value></node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::string></v8::object></v8::string></v8::object></v8::value></v8::value></v8::value></v8::value></v8::value></v8::value></node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></node::encoding></v8::value></v8::value></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::object></v8::string></v8::object></v8::string></v8::object></v8::value></v8::value></v8::value></v8::value></v8::value></v8::value>Apassungen: >! ```` var options = { 'protocol': "SmlProtocol", 'transport': "SerialResponseTransport", 'transportSerialPort': "/dev/ttyUSB0", 'transportSerialBaudrate': 9600, 'requestInterval': 10, 'obisNameLanguage': 'en' }; >! ```` Aufruf: >! ```` root@miniyou:/opt/test-sml# node test-sml.js /opt/test-sml/node_modules/smartmeter-obis/lib/protocols/SmlProtocol.js:57 if (smlFile.messages[msg].isValid()) Object.assign(result, thi ^ TypeError: undefined is not a function at SmlProtocol.handleMessage (/opt/test-sml/node_modules/smartmeter-obis/lib/protocols/SmlProtocol.js:57:61) at SerialPort. <anonymous>(/opt/test-sml/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:29:50) at SerialPort.emit (events.js:107:17) at SerialPort.module.exports.raw (/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/lib/parsers.js:7:13) at SerialPort._emitData (/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:313:18) at SerialPort. <anonymous>(/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:293:14) at SerialPort. <anonymous>(/opt/test-sml/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:306:7) at FSReqWrap.wrapper [as oncomplete] (fs.js:527:17)</anonymous></anonymous></anonymous>
und nun? bringt dich das weiter?
Gruß,
a200
-
Die allllllererste Zeile sagt es schon:
> npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.12.6","npm":"2.11.2"})
Das ganze (und auch der Adapter später) geht erst ab node 4.x … liegt daran das die Library die ich nutze um SML zu parsen nur 4.x+ unterstützt.
Ist bestimmt ein Wheezy-basiertes Raspbian im Einsatz oder ?! Fürchte da hilft dann doch nur ein Systemupdate...
Kennst Du den Thread hier: http://forum.iobroker.net/viewtopic.php?p=49525#p49525
-
Ja ich habe auf dem Testsystem beim mir Version 6 installiert
läuft tadellos [emoji6]
Gesendet von iPhone mit Tapatalk Pro
-
Die allllllererste Zeile sagt es schon:
> npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.12.6","npm":"2.11.2"})
Das ganze (und auch der Adapter später) geht erst ab node 4.x … liegt daran das die Library die ich nutze um SML zu parsen nur 4.x+ unterstützt.
Ist bestimmt ein Wheezy-basiertes Raspbian im Einsatz oder ?! Fürchte da hilft dann doch nur ein Systemupdate...
Kennst Du den Thread hier: http://forum.iobroker.net/viewtopic.php?p=49525#p49525 `
war auf dem falschen system.
jetzt gehts
129-129:199.130.3*255: Manufacturer ID = HAG
1-0:0.0.9*255: Device ID = xxxxxxxx
1-0:1.8.0*255: Time integral 1 Sum active power + (Total) = 5308.7916000000005 kWh
1-0:1.8.1*255: Time integral 1 Sum active power + (T1) = 5307.7916000000005 kWh
1-0:1.8.2*255: Time integral 1 Sum active power + (T2) = 1 kWh
1-0:16.7.0*255: Instantaneous value Total active power (Total) = 382 W
129-129:199.130.5*255: Forename/Public Key =xxxxxx
Danke.
-
Cool, was hattet Ihr für Geräte? Dann weiss ich das das kompatibel ist
Achja: Ich übverlege die kWh-Werte noch zu runden um so komische Werte wie 5308.7916000000005 nicht zu haben (die passieren beim rechnen bzw umrechnen von Wh in kWh (im SML stehen eigentlich Wh, aber ich denke kWh ist sinnvoller). 4 nachkommastellen? 6? meinungen?
-
Also ich würde 4 nachkommastellen vorschlagen, den der Zähler selbst zeigt ja auch 4 Stellen hinter Komma an [emoji6]
Ich habe einen EMH Zähler mit den IR Lesekopf von Udo [emoji3]
Werden in deinem Adapter auch andere Sachen ausgerechnet wie Tages/ Wochen/ Monatsverbrauch!? [emoji848]
Gesendet von iPhone mit Tapatalk Pro
-
Werden in deinem Adapter auch andere Sachen ausgerechnet wie Tages/ Wochen/ Monatsverbrauch!? [emoji848] `
Es gibt Zähler die solche Werte zurückgeben … von daher wollte ich es aktuell nicht ausrechnen sondern die Werte erstmal so darstellen Wie sie reinkommen ... Wäre vllt eine später Erweiterungsidee, aber geht nicht für alle Datenpunkte also muss man konfigurierbar haben und so ... hm ...
-
Achso meiner zeigt die Werte im Display an, aber in den Daten die ich logge sind die nIcht dabei oder wie bekomme ich die denn raus!? [emoji848]
Gesendet von iPhone mit Tapatalk Pro
-
Frag mal bei deinen Stadtwerken?! Oder man müsste mal ne Detail-Doku zu dem Gerät haben, vllt steht da was drin. Vllt geht es per D0-Protokoll (also eins was man aktiv anfragt … die Library kann das auch grins
Ich weiss das man die Anzeige im Display freischalten kann ... hatte angenommen das das dann auch im SML mitkommt ... hm ...
-
Cool, was hattet Ihr für Geräte? Dann weiss ich das das kompatibel ist
Achja: Ich übverlege die kWh-Werte noch zu runden um so komische Werte wie 5308.7916000000005 nicht zu haben (die passieren beim rechnen bzw umrechnen von Wh in kWh (im SML stehen eigentlich Wh, aber ich denke kWh ist sinnvoller). 4 nachkommastellen? 6? meinungen? `
Gerät: HAGER EHZ363W5
Die Nachkommastellen sind auf parseFloat() zurückzuführen. Dafür gibt es verschiedene Lösungen:
newValue = parseFloat(value.replace(',', '.')).toFixed(2);
oder
Math.round(number * 100) / 100
Variante 1 würde gleich den Punkt in ein Komma umwandeln. Wie auch immer, ich denke, dass 4 Stellen ausreichend sein sollten.
Danke für deine Mühe,
a200.