thats correct.
-
Smartmeter2
-
-
@dennist , i’m also using the smartmeter2 plugin and did some time ago a test on a new version of the plugin (with node v4 an v8 support). I was waiting for updates of the current plugin, but that seems not to happen. Today i checked my test version and it still works. So i published the Smartmeter3 plugin.
I also made de RegEx string per data item configurable. You can use it if a smartmeter version and the data differs from what i tested.
The plugin will probably be visible tomorrow in the plugin section of Pimatic. It would be nice if you could test it. -
Is there a way to get this ir reader working with your script?
https://wiki.volkszaehler.org/hardware/controllers/ir-schreib-lesekopf-usb-ausgang -
Hi, the plugin receives data from any serialport source and converts ascii (human) text to data fields. Smartmeters generate human readable ascii datagrams/records.
Looks like the IR reader you are describing generates binairy data. So depending on what you want to extract from the binaire data, Regex (with my Plugin) could be an option or another type of filter/plugin is needed.
Do you know what the data protocol is? -
SML as I understand
-
I did a short check on SML and Volkszaehler and it seems that my plugin is not able to read the data. Probably you need a plugin with capabilities based on the smartmeter-obis library. I assume you did look already at the pimatic-volkzaehler plugin?
-
@bertreb that would be nice. I will check this in the evening. Thanks for your support.
-
> serialport@6.2.2 install /home/pi/pimatic-app/node_modules/pimatic-smartmeter3/node_modules/serialport > prebuild-install || node-gyp rebuild prebuild-install WARN install No prebuilt binaries found (target=10.16.3 runtime=node arch=arm platform=linux) make: Entering directory '/home/pi/pimatic-app/node_modules/pimatic-smartmeter3/node_modules/serialport/build' CXX(target) Release/obj.target/serialport/src/serialport.o In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’: ../node_modules/nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:41:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] v8::String::Utf8Value path(info[0]->ToString()); ^ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:26, from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:2892:28: note: declared here explicit Utf8Value(Local<v8::Value> obj)); ^~~~~~~~~ /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/serialport.cpp:48:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] v8::Local<v8::Object> options = info[1]->ToObject(); ^ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:10046:15: note: declared here Local<Object> Value::ToObject() const { ^~~~~ ../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen); ^~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterOpen(uv_work_t*)’: ../src/serialport.cpp:95:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:113:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] v8::Local<v8::Object> options = info[1]->ToObject(); ^ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:10046:15: note: declared here Local<Object> Value::ToObject() const { ^~~~~ ../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate); ^~~~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterUpdate(uv_work_t*)’: ../src/serialport.cpp:150:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose); ^~~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterClose(uv_work_t*)’: ../src/serialport.cpp:188:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush); ^~~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterFlush(uv_work_t*)’: ../src/serialport.cpp:231:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:250:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] v8::Local<v8::Object> options = info[1]->ToObject(); ^ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:10046:15: note: declared here Local<Object> Value::ToObject() const { ^~~~~ ../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet); ^~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterSet(uv_work_t*)’: ../src/serialport.cpp:285:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet); ^~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’: ../src/serialport.cpp:336:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate); ^~~~~~~~~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’: ../src/serialport.cpp:383:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain); ^~~~~~~~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterDrain(uv_work_t*)’: ../src/serialport.cpp:424:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ ../src/serialport.cpp: At global scope: ../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses] SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) { ^ ../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses] SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { ^ In file included from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Handle<v8::Object>)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type] (node::addon_register_func) (regfunc), \ ^ /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’ NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) ^~~~~~~~~~~~~ ../src/serialport.cpp:485:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(serialport, init); ^~~~~~~~~~~ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node_object_wrap.h:84:78: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’: ../node_modules/nan/nan_object_wrap.h:65:61: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] CXX(target) Release/obj.target/serialport/src/serialport_unix.o In file included from ../src/serialport.h:6, from ../src/serialport_unix.cpp:2: ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’: ../node_modules/nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/serialport.h:6, from ../src/serialport_unix.cpp:2: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node_object_wrap.h:84:78: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’: ../node_modules/nan/nan_object_wrap.h:65:61: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] ../src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’: ../src/serialport_unix.cpp:176:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=] snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path); ^~~~~~~~~~~~~~~~~~~~~~~~~ ../src/serialport_unix.cpp:176:13: note: ‘snprintf’ output 20 or more bytes (assuming 1043) into a destination of size 1024 snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’: ../src/serialport_unix.cpp:86:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=] snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/serialport_unix.cpp:86:13: note: ‘snprintf’ output 22 or more bytes (assuming 1045) into a destination of size 1024 snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CXX(target) Release/obj.target/serialport/src/poller.o In file included from ../src/poller.cpp:1: ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’: ../node_modules/nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ ../src/poller.cpp: In static member function ‘static void Poller::onData(uv_poll_t*, int, int)’: ../src/poller.cpp:69:29: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations] obj->callback.Call(2, argv); ^ In file included from ../src/poller.cpp:1: ../node_modules/nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local<v8::Value> argv[]) const { ^~~~ In file included from /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node.h:63, from ../node_modules/nan/nan.h:54, from ../src/poller.cpp:1: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’: /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/node_object_wrap.h:84:78: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’: ../node_modules/nan/nan_object_wrap.h:65:61: required from here /home/pi/pimatic-app/.node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] CXX(target) Release/obj.target/serialport/src/serialport_linux.o SOLINK_MODULE(target) Release/obj.target/serialport.node COPY Release/serialport.node make: Leaving directory '/home/pi/pimatic-app/node_modules/pimatic-smartmeter3/node_modules/serialport/build' pimatic-smartmeter3@0.0.2 node_modules/pimatic-smartmeter3 └── serialport@6.2.2 (@serialport/parser-delimiter@1.0.5, @serialport/parser-regex@1.0.5, @serialport/parser-byte-length@1.0.5, @serialport/parser-readline@1.0.5, @serialport/parser-cctalk@1.0.5, @serialport/parser-ready@1.0.5, bindings@1.3.0, promirepl@1.0.1, debug@3.2.6, nan@2.14.0, prebuild-install@4.0.0, prompt-list@3.2.0)
-
@bertreb I can confirm that everything is working. Thanks a lot.
-
@bertreb said in Smartmeter2:
I did a short check on SML and Volkszaehler and it seems that my plugin is not able to read the data. Probably you need a plugin with capabilities based on the smartmeter-obis library. I assume you did look already at the pimatic-volkzaehler plugin?
I am not using the plugin. I have installed VZLogger and read the output via LogWatcher into Pimatic. But I am still watching for a more simple way.
-
@OrTiN, i’m planning an update of my smartmeter3 plugin and will change to the smartmeter-obis library. This library has a lot of functionality for reading smartmeters. It’s should be compatible with node v4 and v8 (v4 still to be tested)
I have already a working DSMR device. Its easy to add also a SML device. I’m not familiair with the OBIS codes used in SML smartmeters. Do you have the OBIS codes you’re using in your setup? -
Upps sorry have overseen this… Would be really nice if you can do this.
I can find this in my vzlogger.log:
[Sep 22 00:01:02][mtr0] Reading: id=1-0:1.8.0*255/ObisIdentifier:1-0:1.8.0*255 value=12538008.60 ts=1569103262156 [Sep 22 00:01:02][mtr0] Reading: id=1-0:1.8.1*255/ObisIdentifier:1-0:1.8.1*255 value=12538008.60 ts=1569103262156 [Sep 22 00:01:02][mtr0] Reading: id=1-0:1.8.2*255/ObisIdentifier:1-0:1.8.2*255 value=0.00 ts=1569103262156 [Sep 22 00:01:02][mtr0] Reading: id=1-0:16.7.0*255/ObisIdentifier:1-0:16.7.0*255 value=805.10 ts=1569103262156
This fits to the first table of Iskraemeco MT175 here.
-
Will test it
-
First test shows this:
-
Unfortunatelly still something wrong. Now this is shown:
Any idea? Today I can only test. Maybe I will find some time in the evening to check the code. I am not a developer, but maybe I can somehow help.
I my vzlogger config I must config the parity with 8n1. Maybe this is the problem here.
In the past I played a little bit around with following shell script. It gives me data, but not the right one.
#!/bin/bash # read and evaluate SML output received from EMH eHZ # set serial device INPUT_DEV="/dev/usb-ir-lesekopf0" #set $INPUT_DEV to 9600 8N1 stty -F $INPUT_DEV 1:0:8bd:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 SML_START_SEQUENCE="1B1B1B1B0101010176" METER_OUTPUT__START_SEQUENCE="" while [ "$METER_OUTPUT__START_SEQUENCE" != "$SML_START_SEQUENCE" ] do METER_OUTPUT=`cat $INPUT_DEV 2>/dev/null | xxd -p -u -l 460` METER_OUTPUT__START_SEQUENCE=$(echo "${METER_OUTPUT:0:18}") if [ $METER_OUTPUT__START_SEQUENCE != $SML_START_SEQUENCE ]; then echo "missed start and trying again..." #exit 1 fi done let METER_180=0x${METER_OUTPUT:390:10} VALUE=$(echo "scale=2; $METER_180 / 10000" |bc) echo "Meter 1.8.0 (from plant): " $VALUE "kWh" let METER_180=0x${METER_OUTPUT:347:10} VALUE=$(echo "scale=2; $METER_180 / 10000" |bc) echo "Meter 2.8.0 (to plant): " $VALUE "kWh" let METER_180=0x${METER_OUTPUT:518:8} VALUE=$(echo "scale=2; $METER_180 / 10" |bc) echo "Total effective power (+/-): " $VALUE "W"
I really have no idea waht is
0x${METER_OUTPUT:390:10}
,0x${METER_OUTPUT:347:10}
or0x${METER_OUTPUT:518:8}
and how I can get to the right value for current usage or total usage. But maybe it helps you to fix the last details.