Code Monkey home page Code Monkey logo

node-red-contrib-smartmeter's People

Contributors

coolchip avatar dependabot[bot] avatar juggledad avatar kickouille avatar klein0r avatar mode2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-red-contrib-smartmeter's Issues

extremly large log file

Hello,
I'm using this node to read my easymeter, but after two day I could'nt boot my raspberry anymore, cause I was out of space on the sd card. After I managed to open the files on my sd card on other linux machine, I saw the huge deamon.log files that filled my raspberry.

The log file is full with this information. Like 1000 entrys for 1 sec.

Mar 13 00:00:02 raspberrypi Node-RED[351]: NEW DATA Mar 13 00:00:02 raspberrypi Node-RED[351]: CURRENT PROCESS STEP 4 IN CHECKMESSAGE Mar 13 00:00:02 raspberrypi Node-RED[351]: MATCH-RESULT DATA: "\r\n1-0:0.0.0*255(0273260481404)\r\n1-0:1.8.0*255(00012911.0592 550*kWh)\r\n1-0:21.7.0*255(000093.80*W)\r\n1-0:41.7.0*255(000014.45*W)\r\n1-0:61.7.0*255(000012.70*W)\r\n1-0:1.7.0*255(000120. 95*W)\r\n1-0:96.5.5*255(80)\r\n0" -> null Mar 13 00:00:02 raspberrypi Node-RED[351]: NEW DATA Mar 13 00:00:02 raspberrypi Node-RED[351]: CURRENT PROCESS STEP 4 IN CHECKMESSAGE Mar 13 00:00:02 raspberrypi Node-RED[351]: MATCH-RESULT DATA: "\r\n1-0:0.0.0*255(0273260481404)\r\n1-0:1.8.0*255(00012911.0592 550*kWh)\r\n1-0:21.7.0*255(000093.80*W)\r\n1-0:41.7.0*255(000014.45*W)\r\n1-0:61.7.0*255(000012.70*W)\r\n1-0:1.7.0*255(000120. 95*W)\r\n1-0:96.5.5*255(80)\r\n0-" -> null

how to stop this writing into log files?

my node is configured like this:

image

when I use the request interval with "1" does it means that I request every millisecond?

Current power with sign?

Hello!
In object objName 1-0:15.7.0*255 the current power is shown.
If I generate more power with my PV than I use, I cannot tell.
How can I manage to show the current power with a sign?

Error while parsing SML message: Error: Wrong TL-Field 0x65 for Choice!

Hello!
I get the Error Wrong TL-Field 0x65.

For me the message looks good.
Could you please verify:

1b1b1b1b010101017604000001620062007265000001017601010700000052fcd90b0a01484c59020002015a0101630d990076040000026200620072650000070177010b0a01484c59020002015a01017777070100603201010101010104484c590177070100600100ff010101010b0a01484c59020002015a0177070100010800ff65001ca904650052fcd9621e52ff65002f213c0177070100020800ff65001ca904650052fcd9621e52ff65000dd4b70177070100000200000101010109312e30322e3030370177070100605a02010101010105413031410177070100600500ff0101010165001ca90401010163a3d200760400000362006200726500000201710163e82300001b1b1b1b1a016868

CRC Fehler

Moin,

ist es möglich im Smartmeter Plugin die CRC checksum zu ignorieren?
Eventuell in der Konfiguration mit einer Checkbox?
Bei meinem Zähler (Holley DTZ541) gibt es Bekannterweise CRC Fehler.

Mit freundlichen Grüßen

error installing on latest nodered in docker environment

this is the error message when installing on latest nodered

-----------------------------------------------------------
2023-05-31T19:40:36.386Z Install : node-red-contrib-smartmeter 0.6.3

2023-05-31T19:40:37.714Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2023-05-31T19:40:40.962Z [err] npm
2023-05-31T19:40:40.966Z [err]  
2023-05-31T19:40:40.967Z [err] WARN
2023-05-31T19:40:40.969Z [err]  
2023-05-31T19:40:40.969Z [err] config
2023-05-31T19:40:40.970Z [err]  production Use `--omit=dev` instead.
2023-05-31T19:41:06.084Z [err] npm WARN deprecated [email protected]: this library is no longer supported
2023-05-31T19:41:06.084Z [err] npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2023-05-31T19:41:06.980Z [err] npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

what can be done?

SMLprotocol: "1-0:1.8.x" will be not read

Hi,

great work and thanks for the project. Do you know why the Parameter 1-0:1.8.1 and 1-0:1.8.2 will be not sorted out from your tool?
Value from -0:1.8.0*255 works without problems!

Smartmeter is Iskra MT631

regards
martin

Iskra me 371

Hallo,

ich habe einen Iskra me 371.

damit ich auslesen kann muss ich über serial folgendes schicken:
echo -n -e '\x2F\x3F\x21\x0D\x0A' > /dev/ttyUSB0
Antwort (cat /dev/ttyUSB0):
/?!
/ISK5\2ME371-2105
dann muss ich folgendes innerhalb von 2 sek schicken:
echo -n -e '\x06\x30\x30\x30\x0D\x0A' > /dev/ttyUSB0
Antwort (cat /dev/ttyUSB0):
000
0.0.0(xxxxxxxx)
C.1.0(xxxxxxxx)
0.9.1(xxxxxxx)
0.9.2(xxxxxxxx
.....usw.... bis
F.97.0(00000000)
!
h

wie kann ich diese werte in deinem smartmeter node red einstellen?

Installation Error Home Assistant

the following error occurs during installation


2022-12-11T19:54:05.213Z Installieren : node-red-contrib-smartmeter 0.6.3

2022-12-11T19:54:05.342Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-12-11T19:54:08.853Z [err] npm
2022-12-11T19:54:08.855Z [err] WARN
2022-12-11T19:54:08.855Z [err] config production Use --omit=dev instead.
2022-12-11T19:54:31.857Z [err] npm
2022-12-11T19:54:31.858Z [err] ERR! code 1
2022-12-11T19:54:31.859Z [err] npm ERR!
2022-12-11T19:54:31.859Z [err] path /config/node-red/node_modules/@serialport/bindings
2022-12-11T19:54:31.865Z [err] npm ERR! command failed
2022-12-11T19:54:31.865Z [err] npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-12-11T19:54:31.866Z [err] npm ERR!
2022-12-11T19:54:31.866Z [err] prebuild-install warn install No prebuilt binaries found (target=16.17.1 runtime=node arch=arm64 libc=musl platform=linux)
2022-12-11T19:54:31.866Z [err] npm ERR! gyp info it worked if it ends with ok
2022-12-11T19:54:31.866Z [err] npm
2022-12-11T19:54:31.867Z [err] ERR! gyp info using [email protected]
2022-12-11T19:54:31.867Z [err] npm ERR!
2022-12-11T19:54:31.867Z [err] gyp info using [email protected] | linux | arm64
2022-12-11T19:54:31.867Z [err] npm ERR! gyp ERR! configure error
2022-12-11T19:54:31.867Z [err] npm ERR! gyp ERR! stack Error: Can't find Python executable "/usr/bin/python3", you can set the PYTHON env variable.
2022-12-11T19:54:31.867Z [err] npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/config/node-red/node_modules/node-gyp/lib/configure.js:484:19)
2022-12-11T19:54:31.867Z [err] npm ERR!
2022-12-11T19:54:31.868Z [err] gyp ERR! stack at PythonFinder. (/config/node-red/node_modules/node-gyp/lib/configure.js:406:16)
2022-12-11T19:54:31.868Z [err] npm ERR! gyp ERR! stack at F (/config/node-red/node_modules/node-gyp/node_modules/which/which.js:68:16)
2022-12-11T19:54:31.868Z [err] npm ERR! gyp ERR! stack at E (/config/node-red/node_modules/node-gyp/node_modules/which/which.js:80:29)
2022-12-11T19:54:31.868Z [err] npm ERR! gyp ERR! stack at /config/node-red/node_modules/node-gyp/node_modules/which/which.js:89:16
2022-12-11T19:54:31.868Z [err] npm ERR!
2022-12-11T19:54:31.868Z [err] gyp ERR! stack at /config/node-red/node_modules/isexe/index.js:42:5
2022-12-11T19:54:31.868Z [err] npm ERR! gyp ERR! stack at /config/node-red/node_modules/isexe/mode.js:8:5
2022-12-11T19:54:31.868Z [err] npm
2022-12-11T19:54:31.868Z [err] ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:206:21)
2022-12-11T19:54:31.868Z [err] npm ERR! gyp ERR! System Linux 5.15.61-v8
2022-12-11T19:54:31.868Z [err] npm ERR!
2022-12-11T19:54:31.869Z [err] gyp ERR! command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-gyp" "rebuild"
2022-12-11T19:54:31.869Z [err] npm ERR! gyp ERR! cwd /config/node-red/node_modules/@serialport/bindings
2022-12-11T19:54:31.869Z [err] npm
2022-12-11T19:54:31.869Z [err] ERR! gyp ERR! node -v v16.17.1
2022-12-11T19:54:31.869Z [err] npm ERR! gyp ERR! node-gyp -v v3.8.0
2022-12-11T19:54:31.869Z [err] npm ERR! gyp ERR! not ok
2022-12-11T19:54:31.875Z [err]
2022-12-11T19:54:31.876Z [err] npm ERR!
2022-12-11T19:54:31.876Z [err] A complete log of this run can be found in:
2022-12-11T19:54:31.876Z [err] npm ERR! /root/.npm/_logs/2022-12-11T19_54_08_687Z-debug-0.log
2022-12-11T19:54:31.923Z rc=1

Error while parsing SML message

Hello, i recieved this error. It ran fine for days. Maybe this helps improving.

EDIT: Same Error here #1 . I just think maybe a crash could be prevent, when getting a false reading?

Jul 19 08:59:34 raspberrypi Node-RED[5224]: 19 Jul 08:59:34 - [error] smartmeter-obis error: Error: Error while parsing SML message: Error: Unknown TL-Field for SmlList!: Message: 1b1b1b1b010101017607000900f064236200620072630101760101070009003b21610b0901454d48000067e964010163334d007607000900f06424620062007263070177010b0901454d48000067e964070100620affff72620165003b27ce480177070100000009ff010101010b0901454d48000067e9640177070100020800ff640100a201621e52ff560000e484c30177070100020801ff0101621e52ff560000e484c30177070100020802ff0101621e52ff5600000000000177070100100700ff0101621b52ff55ffffd1450177078181c78205ff0101010183020a13d540a9ef7dc2d6c22214b64d79f3f33c3455ac67606c638e7e038c8cf34a2b616740fa813ff0c5bc2710ab5c3d730101016338e7007607000900f06427620062007263020171016367760000001b1b1b1b1a02fed0
Jul 19 08:59:34 raspberrypi Node-RED[5224]: 19 Jul 08:59:34 - [red] Uncaught Exception:
Jul 19 08:59:34 raspberrypi Node-RED[5224]: 19 Jul 08:59:34 - TypeError: Cannot read property 'logger' of undefined
Jul 19 08:59:34 raspberrypi Node-RED[5224]: at SerialPort. (/home/username/.node-red/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:223:30)
Jul 19 08:59:34 raspberrypi Node-RED[5224]: at SerialPort._error (/home/username/.node-red/node_modules/serialport/lib/serialport.js:199:14)
Jul 19 08:59:34 raspberrypi Node-RED[5224]: at process.nextTick (/home/username/.node-red/node_modules/serialport/lib/serialport.js:206:31)
Jul 19 08:59:34 raspberrypi Node-RED[5224]: at _combinedTickCallback (internal/process/next_tick.js:131:7)
Jul 19 08:59:34 raspberrypi Node-RED[5224]: at process._tickCallback (internal/process/next_tick.js:180:9)
Jul 19 08:59:34 raspberrypi systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE
Jul 19 08:59:34 raspberrypi systemd[1]: nodered.service: Unit entered failed state.
Jul 19 08:59:34 raspberrypi systemd[1]: nodered.service: Failed with result 'exit-code'.
Jul 19 08:59:34 raspberrypi systemd[1]: nodered.service: Service hold-off time over, scheduling restart.
Jul 19 08:59:34 raspberrypi systemd[1]: Stopped Node-RED graphical event wiring tool..
Jul 19 08:59:34 raspberrypi systemd[1]: Started Node-RED graphical event wiring tool..
Jul 19 08:59:36 raspberrypi Node-RED[29895]: 19 Jul 08:59:36 - [info]
Jul 19 08:59:36 raspberrypi Node-RED[29895]: Welcome to Node-RED
Jul 19 08:59:36 raspberrypi Node-RED[29895]: ===================
Jul 19 08:59:36 raspberrypi Node-RED[29895]: 19 Jul 08:59:36 - [info] Node-RED version: v0.18.4
Jul 19 08:59:36 raspberrypi Node-RED[29895]: 19 Jul 08:59:36 - [info] Node.js version: v8.11.2
Jul 19 08:59:36 raspberrypi Node-RED[29895]: 19 Jul 08:59:36 - [info] Linux 4.14.34-v7+ arm LE
Jul 19 08:59:37 raspberrypi Node-RED[29895]: 19 Jul 08:59:37 - [info] Loading palette nodes

More than one smartmeter node possible?

Hello,

I have two smartmeters installed and would like to write data of both meters into tables of a database.
This works fine for one smartmeter. But when I drop two smartmeter nodes into a node-red flow and change the settings of one (USB0/1) also the settings of the other one changes. The same happens when using two seperate node-red-flows.
Is it possible to use two smartmeter nodes and how does it work?

Thank you very much in advance!

Stopped working after restart

Hello,

I have been using this module for quite some time now and it was always working great, thanks for developing! However, today I had to restart the Raspberry Pi it is running on and it suddenly stopped working, I don't get any data anymore.

I am using the following configuration:
smartmeter

I enabled debugging and this is the output, for me it seems like at least the data is coming in (shortened):

-- Journal begins at Mon 2023-10-30 09:20:08 GMT, ends at Tue 2023-11-28 09:19:14 GMT. --
Nov 28 09:19:12 raspberrypi Node-RED[18172]: MATCH-RESULT SIGNON: "8.0*97(00086.9*kWh)\r\n1-0:1.8.0*98(00360.4*kWh)\r\n1-0:1.8.0*99(02770.7*kWh)......
Nov 28 09:19:12 raspberrypi Node-RED[18172]: NEW DATA
Nov 28 09:19:12 raspberrypi Node-RED[18172]: CURRENT PROCESS STEP 2 IN CHECKMESSAGE
Nov 28 09:19:12 raspberrypi Node-RED[18172]: MATCH-RESULT SIGNON: "8.0*97(00086.9*kWh)\r\n1-0:1.8.0*98(00360.4*kWh)\r\n1-0:1.8.0*99(02770.7*kWh)......
Nov 28 09:19:12 raspberrypi Node-RED[18172]: NEW DATA
Nov 28 09:19:12 raspberrypi Node-RED[18172]: CURRENT PROCESS STEP 2 IN CHECKMESSAGE
Nov 28 09:19:12 raspberrypi Node-RED[18172]: MATCH-RESULT SIGNON: "8.0*97(00086.9*kWh)\r\n1-0:1.8.0*98(00360.4*kWh)\r\n1-0:1.8.0*99(02770.7*kWh).........

To my knowledge nothing happened to the system other than the simple restart. Any idea what could be causing this issue or how I can debug it further?

Also, I'm not sure if this is a problem with the NodeRED part or the library itself (or on my side), please tell my if I should open an issue at the core library.

Thanks in advance,
Andy

How to keep connection?

I'm trying out Smartmeter. I have a SlimmeLezer+ flashed with ESP-link connected to my Landis Gyr E360 LTE, using the following config in Smartmeter. The Landis Gyr sends data every 10s.
image

I do get data, but after 12-24 hrs I stop receiving data and have to restart the flow.

How can I keep the connection alive?

Fehler bei node-red-node-serialport nach Install von Smartmeter

Hallo Coolchip,
die node-red-contrib-smartmeter erscheint mir sehr nützlich. Kann die sicher in meinem Projekt gut einsetzen.
Leider bekomme ich aber Probleme im Zusammenspiel mit:
node-red-node-serialport 0.14.1
In dieser Node ist die Suche nach einem Port nicht mehr möglich. Auch die Eingabe eines Ports ohne Suche ließ diese Node nicht weiterarbeiten.
Ich weiß nicht, ob eine Suche des seriellen Ports bei der Smartmeter Node vorgesehen ist; funktioniert jedenfalls auch nicht.
Ich möchte mit einem Adpter meinen Zähler über die Infrarotschnittstelle lesen. Der Adapter liefert ein TTL Signal mit dem SML-Protokoll. Damit sollte doch eine Anbindung an die Smartmeter-Node seriell möglich sein.
Die serielle Schnittstelle wird in meinem Projekt zwingend für andere Anbindungen benötigt.
Gruß
günter49xx

'read data from TCP a socket' issue

Hi,

I'm tying to read IEC smartmeter over TCP. Using D0Protocol and data source tcp.
I've connected optical head with usb interface to serial to TCP gateway.
The same head connected directly to Raspberry Pi is working OK.

O'm onnly getting "[error] smartmeter-obis error: Error: No or too long answer from Socket after last request."

any suggestions what I'm doing wrong?

Not working on Raspi in container (Home Assistant Addon) anymore, node-serialport upstream bug

Hello, after updating, node red isn't working any more for me. If i start with all flows disabled it works. With only the smartmeter node enabled it stops working.
I think it is because of the new version of node-serialport (bb63ab6)

I downgraded to 0.5.3 and everything is ok again.

I am using Home Assistant with the node red addon. For downgrade i added

npm_packages:
  - [email protected]

in the config. Maybe this helps someone.

see
hassio-addons/addon-node-red#1312
serialport/node-serialport#2438

No data from sml smartmeter to nodered

Hello,

I am running noderd on a raspberry pi 4 as docker container (as well as mosquitto, timescaledb and grafana). But I fail to get data from a smartmeter (sml) into nodered. The raspi is connected to an optical sensor via usb cable and I get data on the raspi (sudo cat /dev/ttyUSB0 | od -tx1).

I do not find any parameter configuration for the smartmeter node to get any data into nodered. Below you see the 2 nodes flow as well as the properties of the smartmeter node (connection details: 9600 Baud rate, 8N1 - should be fine since it is from the manual and already worked before).

Thank you very much in advance!

nodered_smartmeter
smartmeter-node_properties
smartmeter-node_connection-properties

smartmeter-obis error: Error: No or too long answer from Serial Device...

I've tried to read my electrical smart meter with node red via the contrib-smartmeter node. The node outputs the following error massage:
"smartmeter-obis error: Error: No or too long answer from Serial Device after last request."

I've checked the IR interface with Minicom and got some cryptic inputs (see attached screen shot)
Minicom
Serial_Settings

, so my assumption is that the interface works fine. I've also attached the settings of the node, node red version, etc.
NodeRed_Version
Smartmeter-Node-Settings

I use following HW:

  • Raspberry PI 1B
  • IR phototransistor connected to RXD (Pin 10) with pull up
  • eHZ Generation K smartmeter (EMH metering GmbH & Co. KG)

Can anybody help here.

Node-RED v2.1.4 Home Assistant Add-On error

Hello, I get the following error messages when installing. Node-Red is integrated into Home Assistant via an add-on.
Can someone help me?

Node-RED v2.1.4

`2021-12-19T12:20:58.897Z Installieren : node-red-contrib-smartmeter 0.6.0

2021-12-19T12:20:58.997Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2021-12-19T12:21:10.110Z [err] npm
2021-12-19T12:21:10.110Z [err] WARN deprecated [email protected]: this library is no longer supported
2021-12-19T12:21:10.748Z [err] npm
2021-12-19T12:21:10.748Z [err] WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2021-12-19T12:21:10.850Z [err] npm WARN
2021-12-19T12:21:10.850Z [err] deprecated [email protected]: request has been deprecated, see request/request#3142
2021-12-19T12:21:14.588Z [err] npm ERR!
2021-12-19T12:21:14.589Z [err] code 1
2021-12-19T12:21:14.589Z [err] npm ERR! path /config/node-red/node_modules/@serialport/bindings
2021-12-19T12:21:14.597Z [err] npm ERR! command failed
2021-12-19T12:21:14.597Z [err] npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-12-19T12:21:14.597Z [err] npm ERR! prebuild-install WARN install No prebuilt binaries found (target=16.13.1 runtime=node arch=arm64 libc=musl platform=linux)
2021-12-19T12:21:14.598Z [err] npm ERR! gyp info it worked if it ends with ok
2021-12-19T12:21:14.598Z [err] npm ERR!
2021-12-19T12:21:14.598Z [err] gyp info using [email protected]
2021-12-19T12:21:14.598Z [err] npm ERR! gyp info using [email protected] | linux | arm64
2021-12-19T12:21:14.598Z [err] npm
2021-12-19T12:21:14.598Z [err] ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3"
2021-12-19T12:21:14.598Z [err] npm ERR! gyp info spawn /usr/bin/python3
2021-12-19T12:21:14.598Z [err] npm
2021-12-19T12:21:14.598Z [err] ERR! gyp info spawn args [
2021-12-19T12:21:14.598Z [err] npm ERR!
2021-12-19T12:21:14.598Z [err] gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2021-12-19T12:21:14.598Z [err] npm ERR! gyp info spawn args 'binding.gyp',
2021-12-19T12:21:14.598Z [err] npm
2021-12-19T12:21:14.599Z [err] ERR! gyp info spawn args '-f',
2021-12-19T12:21:14.599Z [err] npm ERR! gyp info spawn args 'make',
2021-12-19T12:21:14.599Z [err] npm
2021-12-19T12:21:14.599Z [err] ERR! gyp info spawn args '-I',
2021-12-19T12:21:14.599Z [err] npm ERR! gyp info spawn args '/config/node-red/node_modules/@serialport/bindings/build/config.gypi',
2021-12-19T12:21:14.599Z [err] npm ERR! gyp info spawn args '-I',
2021-12-19T12:21:14.599Z [err] npm ERR!
2021-12-19T12:21:14.599Z [err] gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2021-12-19T12:21:14.599Z [err] npm ERR! gyp info spawn args '-I',
2021-12-19T12:21:14.599Z [err] npm
2021-12-19T12:21:14.599Z [err] ERR! gyp info spawn args '/root/.cache/node-gyp/16.13.1/include/node/common.gypi',
2021-12-19T12:21:14.599Z [err] npm ERR!
2021-12-19T12:21:14.600Z [err] gyp info spawn args '-Dlibrary=shared_library',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '-Dvisibility=default',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.13.1',
2021-12-19T12:21:14.600Z [err] npm ERR!
2021-12-19T12:21:14.600Z [err] gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=/config/node-red/node_modules/@serialport/bindings',
2021-12-19T12:21:14.600Z [err] npm
2021-12-19T12:21:14.600Z [err] ERR! gyp info spawn args '-Dnode_engine=v8',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '--depth=.',
2021-12-19T12:21:14.600Z [err] npm
2021-12-19T12:21:14.600Z [err] ERR! gyp info spawn args '--no-parallel',
2021-12-19T12:21:14.600Z [err] npm ERR! gyp info spawn args '--generator-output',
2021-12-19T12:21:14.600Z [err] npm
2021-12-19T12:21:14.601Z [err] ERR! gyp info spawn args 'build',
2021-12-19T12:21:14.601Z [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
2021-12-19T12:21:14.601Z [err] npm ERR! gyp info spawn args ]
2021-12-19T12:21:14.601Z [err] npm ERR! gyp ERR! build error
2021-12-19T12:21:14.601Z [err] npm ERR! gyp ERR! stack Error: not found: make
2021-12-19T12:21:14.601Z [err] npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
2021-12-19T12:21:14.601Z [err] npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at new Promise ()
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
2021-12-19T12:21:14.602Z [err] npm ERR!
2021-12-19T12:21:14.602Z [err] gyp ERR! stack at new Promise ()
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
2021-12-19T12:21:14.602Z [err] npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! System Linux 5.10.63-v8
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! cwd /config/node-red/node_modules/@serialport/bindings
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! node -v v16.13.1
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! node-gyp -v v8.3.0
2021-12-19T12:21:14.603Z [err] npm ERR! gyp ERR! not ok
2021-12-19T12:21:14.762Z [err]
2021-12-19T12:21:14.763Z [err] npm ERR! A complete log of this run can be found in:
2021-12-19T12:21:14.763Z [err] npm ERR! /root/.npm/_logs/2021-12-19T12_21_14_611Z-debug.log
2021-12-19T12:21:14.793Z rc=1`

Power in Watt from 1-0:15.7.0*255

I have an ehz-edl from Iskra, I get the the actual meter in 1-0:1.8.0255 so connection is right, but I do not get the actual power... it shoud be in 1-0:15.7.0255.

Can I get it somehow?

Thank you!

Installation not possible

Hello,
since upgrading Node Red, I have an issue with Smartmeter. After uninstall is no new installation possible. As I understand, there is an issue with the version of Python. But I cannot resolve the problem. Could somebody help me to get Smartmeter again in my Node Red?

Thanks
Kunstflieger

2022-09-14T06_01_48_022Z-debug-0.log

Trigger input

Hello, thank you for that node, its very nice.

I would like to propose a small feature: An input to trigger the reading. Currently, the only trigger is the request interval inside the node. I would like to use an external trigger.

Background: I want to trigger the smartmeter and my pv inverter modbus reading at the same time, to get close (in terms of time) values for consistent calculations (to calculate self use of pv power for example). Currently i use the smartmeter node as trigger for the modbus readings. Thats not good in case the smartmeter node has problems, as it happened some weeks ago. In this case also my modbus readings weren't triggered. Thats why i want to use an external trigger/tick generator.

node does not show up

Hi,
I installed your package and it shows up in the "manage palette", but the nodes in the left menu aren't there. What went wrong?
node-red was ofc restarted.

Internal error message prompting

Using the nodes I get the following error within log.
"smartmeter-obis error: Error: Error on Baudrate changeover: Error: Port is not open".
The error is sent every request (tried several intervals).

Anyhow, an error should not be sent as internal (without node reference, instead encapsuled in the outer node).

Installation Error

Hi I get this Error in Node Red

2020-12-15T06:50:47.869Z installieren : node-red-contrib-smartmeter 0.3.1 2020-12-15T06:50:48.128Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected] 2020-12-15T06:51:02.379Z [err] npm 2020-12-15T06:51:02.379Z [err] WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 2020-12-15T06:51:04.173Z [err] npm 2020-12-15T06:51:04.173Z [err] WARN deprecated [email protected]: this library is no longer supported 2020-12-15T06:51:07.844Z [out] 2020-12-15T06:51:07.844Z [out] > @serialport/[email protected] install /config/node-red/node_modules/@serialport/bindings 2020-12-15T06:51:07.844Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild 2020-12-15T06:51:07.844Z [out] 2020-12-15T06:51:08.891Z [err] prebuild-install 2020-12-15T06:51:08.891Z [err] 2020-12-15T06:51:08.892Z [err] WARN 2020-12-15T06:51:08.892Z [err] 2020-12-15T06:51:08.892Z [err] install 2020-12-15T06:51:08.893Z [err] No prebuilt binaries found (target=12.18.4 runtime=node arch=arm libc=musl platform=linux) 2020-12-15T06:51:10.794Z [err] gyp 2020-12-15T06:51:10.795Z [err] 2020-12-15T06:51:10.795Z [err] ERR! build error 2020-12-15T06:51:10.797Z [err] gyp 2020-12-15T06:51:10.797Z [err] ERR! 2020-12-15T06:51:10.797Z [err] stack 2020-12-15T06:51:10.797Z [err] Error: not found: make 2020-12-15T06:51:10.797Z [err] gyp 2020-12-15T06:51:10.797Z [err] ERR! 2020-12-15T06:51:10.798Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12) 2020-12-15T06:51:10.798Z [err] gyp 2020-12-15T06:51:10.798Z [err] ERR! 2020-12-15T06:51:10.798Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19) 2020-12-15T06:51:10.798Z [err] gyp ERR! 2020-12-15T06:51:10.798Z [err] stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29) 2020-12-15T06:51:10.798Z [err] gyp ERR! 2020-12-15T06:51:10.799Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 2020-12-15T06:51:10.799Z [err] gyp 2020-12-15T06:51:10.799Z [err] ERR! stack 2020-12-15T06:51:10.799Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 2020-12-15T06:51:10.799Z [err] gyp 2020-12-15T06:51:10.799Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 2020-12-15T06:51:10.799Z [err] gyp ERR! 2020-12-15T06:51:10.799Z [err] stack at FSReqCallback.oncomplete (fs.js:168:21) 2020-12-15T06:51:10.800Z [err] gyp 2020-12-15T06:51:10.800Z [err] ERR! System Linux 5.4.79-v7l 2020-12-15T06:51:10.801Z [err] gyp ERR! 2020-12-15T06:51:10.801Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 2020-12-15T06:51:10.801Z [err] gyp 2020-12-15T06:51:10.801Z [err] ERR! cwd /config/node-red/node_modules/@serialport/bindings 2020-12-15T06:51:10.801Z [err] gyp ERR! node -v 2020-12-15T06:51:10.801Z [err] v12.18.4 2020-12-15T06:51:10.801Z [err] gyp 2020-12-15T06:51:10.801Z [err] ERR! node-gyp -v v5.1.0 2020-12-15T06:51:10.802Z [err] gyp ERR! not ok 2020-12-15T06:51:10.802Z [err] 2020-12-15T06:51:11.499Z [err] npm 2020-12-15T06:51:11.499Z [err] ERR! code ELIFECYCLE 2020-12-15T06:51:11.499Z [err] npm ERR! 2020-12-15T06:51:11.499Z [err] errno 1 2020-12-15T06:51:11.510Z [err] npm 2020-12-15T06:51:11.510Z [err] ERR! @serialport/[email protected] install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild 2020-12-15T06:51:11.510Z [err] npm ERR! 2020-12-15T06:51:11.510Z [err] Exit status 1 2020-12-15T06:51:11.510Z [err] npm 2020-12-15T06:51:11.511Z [err] ERR! 2020-12-15T06:51:11.511Z [err] npm ERR! 2020-12-15T06:51:11.511Z [err] Failed at the @serialport/[email protected] install script. 2020-12-15T06:51:11.511Z [err] npm 2020-12-15T06:51:11.511Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above. 2020-12-15T06:51:11.542Z [err] 2020-12-15T06:51:11.542Z [err] npm ERR! A complete log of this run can be found in: 2020-12-15T06:51:11.542Z [err] npm ERR! 2020-12-15T06:51:11.542Z [err] /root/.npm/_logs/2020-12-15T06_51_11_523Z-debug.log

Unhandled promise rejection: addData (processData)

I've been using the "OBIS" module in FHEM for many years and it works fine. I'm now migrating to Node-Red and this library has worked quite well for the first hours today.

But suddenly it no longer works as the code constantly crashes at the same spot and stops:

at SerialResponseTransport.processData (/home/bjoern/.node-red/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:149:37)
at SerialPort. (/home/bjoern/.node-red/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:83:25)
at SerialPort.emit (events.js:315:20)
at SerialPort.EventEmitter.emit (domain.js:483:12)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at SerialPort.Readable.push (_stream_readable.js:212:10)
at /home/bjoern/.node-red/node_modules/@serialport/stream/lib/index.js:385:12
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which w
[DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js

Temporary fix from my side:
var addData;

try { addData = self.protocol.handleMessage(self.currentData.slice(0, self.currentDataOffset));
} catch (e) {
}

Now at least I see "SCHEDULE NEXT RUN IN ..." - but no data is ever collected...

Installation 0.5.1

node-red-contrib-smartmeter lässt sich nicht von 0.3.1 auf 0.5.1 updaten.
Version 0.3.1 hatte ich ohne Probleme lange in Verwendung.
Auch ein entfernen und erneutes installieren von node-red-contrib-smartmeter 0.5.1 funktioniert nicht.
Woran kann das liegen?

A3BC1B69-5638-465E-9617-731AEAA1ED8D

6421AFAE-CFE7-4F66-A71A-4F76C322DB17

Node-red blocks Python script

Hello!

We use a Raspberry Pi (3B), a P1 cable, and a python script from this repo.
The script works fine, and outputs the data as, what looks like, JSON form.

The problem is, when setting up the smartmeter node, choosing the protocol, transport etc., it crashes, apparently the serial port, since the python (decrypt) script sends the following error ERROR, expected 0x82 separator byte not found, dropping frame.

Our first guess was maybe some serial issues, but we tried different settings in the node, without much success.

No installation unter Node-Red 2.1.3

I get reproducable errors, when I try to install your nodes under a new Node-Red installation.

Your Node is so cool und usefull and I really, really hope that you can fix that.

Here is the log from installation:

27 Nov 11:00:54 - [info] Installing module: node-red-contrib-smartmeter, version: 0.5.1
27 Nov 11:01:17 - [warn] Installation of module node-red-contrib-smartmeter failed:
27 Nov 11:01:17 - [warn] ------------------------------------------
27 Nov 11:01:17 - [warn] npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm ERR! code 1
npm ERR! path /config/node-red/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=14.18.1 runtime=node arch=arm64 libc=musl platform=linux)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/config/node-red/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/14.18.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/14.18.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/14.18.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/config/node-red/node_modules/@serialport/bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.10.17-v8
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /config/node-red/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v14.18.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-27T10_01_17_125Z-debug.log
27 Nov 11:01:17 - [warn] ------------------------------------------
Error: Install failed

Connecting to Serial -> Ethernet Converters

Hi,
i have a SML Meter connected to a serial -> ethernet converter. Is there a possiblity to connect to this?

For simulating a serial -> ethernet you can use
./remserial -p 22000 -s "9600 raw" /dev/ttyUSB_1
on a computer physicaly connected to the smartmeter on /dev/ttyUSB_1. The data is available on TCP 22000.

BR

mode

Holley DTZ541 interpretation der Phasenwinkel

Moin,
wie sind unten genannten Phasenwinkel zu interpretieren?
1-0:81.7.4255 -> Phasenwinkel I L1 zu U L1 -> 324°
1-0:81.7.15
255 -> Phasenwinkel I L2 zu U L2 -> 306°
1-0:81.7.26*255 -> Phasenwinkel I L3 zu U L3 -> 306°

Mein Ansatz mit den gemessenen Werten:
Phasenwinkel I L1 zu U L1 -> 324° = -36°
Phasenwinkel I L2 zu U L2 -> 306° = -54°
Phasenwinkel I L3 zu U L3 -> 306° = -54°

Die Phasenverschiebungen kommen mir allerdings arg hoch vor.

lack of error handling causes node-red crash

I recently installed node-red-contrib-smartmeter on a system with:
Node-RED version: v3.0.2
Node.js version: v18.12.1
Linux 5.15.74-1-pve x64 LE
node-red-contrib-smartmeter: v0.6.3

Unfortunately there seems to be an issue with both of my smart meters (Hager eHZ and Iskra MT681) and/or the serial connection and/or permissions or lxc device pass-through. I still have to figure out what the actual problem is, but whatever it is, it brings down the entire module and node-red as result (resulting in a restart loop until I disconnect the device):

error messages from log:

Jan 11 17:41:15 node-red node-red[582]: 11 Jan 17:41:15 - [red] Uncaught Exception:
Jan 11 17:41:15 node-red node-red[582]: 11 Jan 17:41:15 - [error] TypeError: smlFile.messages[msg].getMessageTag is not a function
Jan 11 17:41:15 node-red node-red[582]:     at SmlProtocol.handleMessage (/opt/nodered/node_modules/smartmeter-obis/lib/protocols/SmlProtocol.js:98:39)
Jan 11 17:41:15 node-red node-red[582]:     at SerialResponseTransport.processData (/opt/nodered/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:148:37)
Jan 11 17:41:15 node-red node-red[582]:     at SerialPort.<anonymous> (/opt/nodered/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:83:25)
Jan 11 17:41:15 node-red node-red[582]:     at SerialPort.emit (node:events:513:28)
Jan 11 17:41:15 node-red node-red[582]:     at SerialPort.emit (node:domain:489:12)
Jan 11 17:41:15 node-red node-red[582]:     at addChunk (node:internal/streams/readable:324:12)
Jan 11 17:41:15 node-red node-red[582]:     at readableAddChunk (node:internal/streams/readable:297:9)
Jan 11 17:41:15 node-red node-red[582]:     at SerialPort.Readable.push (node:internal/streams/readable:234:10)
Jan 11 17:41:15 node-red node-red[582]:     at /opt/nodered/node_modules/@serialport/stream/lib/index.js:385:12

At this point I'm not looking for help to troubleshoot the issue (I'm sure it's something I can easily find out), but want to report the issue that an error in processing a message / making a connection (this really only happens when a meter is connected on the serial port) may bring down the module, causing an availability issue.

Let me know if you need any additional information.

Installation failing in nodered 3.x

hi there! Had to remove smartmeter in nodered 3.0 because it failed to run, now trying to reinstall and getting these errors:

-----------------------------------------------------------
2022-07-16T10:54:22.551Z Install : node-red-contrib-smartmeter 0.6.3

2022-07-16T10:54:22.777Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-07-16T10:54:24.073Z [err] npm
2022-07-16T10:54:24.074Z [err]  WARN 
2022-07-16T10:54:24.074Z [err] config production Use `--omit=dev` instead.
2022-07-16T10:54:31.696Z [err] npm
2022-07-16T10:54:31.697Z [err]  ERR! code
2022-07-16T10:54:31.697Z [err]  1
2022-07-16T10:54:31.697Z [err] npm ERR! path
2022-07-16T10:54:31.698Z [err]  /data/node_modules/@serialport/bindings
2022-07-16T10:54:31.702Z [err] npm ERR! command failed
2022-07-16T10:54:31.702Z [err] npm ERR! command
2022-07-16T10:54:31.703Z [err]  sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-07-16T10:54:31.703Z [err] npm ERR!
2022-07-16T10:54:31.703Z [err]  prebuild-install warn install No prebuilt binaries found (target=16.16.0 runtime=node arch=arm libc=musl platform=linux)
2022-07-16T10:54:31.703Z [err] npm ERR! gyp info it worked if it ends with ok
2022-07-16T10:54:31.703Z [err] npm 
2022-07-16T10:54:31.703Z [err] ERR! gyp info using [email protected]
2022-07-16T10:54:31.703Z [err] npm ERR! gyp info using [email protected] | linux | arm
2022-07-16T10:54:31.703Z [err] npm ERR! gyp ERR! configure error 
2022-07-16T10:54:31.703Z [err] npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
2022-07-16T10:54:31.703Z [err] npm ERR!
2022-07-16T10:54:31.703Z [err]  gyp ERR! stack     at PythonFinder.failNoPython (/data/node_modules/node-gyp/lib/configure.js:484:19)
2022-07-16T10:54:31.703Z [err] npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/data/node_modules/node-gyp/lib/configure.js:406:16)
2022-07-16T10:54:31.703Z [err] npm
2022-07-16T10:54:31.704Z [err]  ERR! gyp ERR! stack     at F (/data/node_modules/which/which.js:68:16)
2022-07-16T10:54:31.704Z [err] npm ERR!
2022-07-16T10:54:31.704Z [err]  gyp ERR! stack     at E (/data/node_modules/which/which.js:80:29)
2022-07-16T10:54:31.704Z [err] npm ERR! gyp ERR! stack     at /data/node_modules/which/which.js:89:16
2022-07-16T10:54:31.704Z [err] npm 
2022-07-16T10:54:31.704Z [err] ERR! gyp ERR! stack     at /data/node_modules/isexe/index.js:42:5
2022-07-16T10:54:31.704Z [err] npm ERR! gyp ERR! stack     at /data/node_modules/isexe/mode.js:8:5
2022-07-16T10:54:31.704Z [err] npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
2022-07-16T10:54:31.704Z [err] npm ERR!
2022-07-16T10:54:31.704Z [err]  gyp ERR! System Linux 5.10.103-v7l+
2022-07-16T10:54:31.704Z [err] npm ERR! gyp ERR! command "/usr/local/bin/node" "/data/node_modules/.bin/node-gyp" "rebuild"
2022-07-16T10:54:31.704Z [err] npm 
2022-07-16T10:54:31.704Z [err] ERR! gyp ERR! cwd /data/node_modules/@serialport/bindings
2022-07-16T10:54:31.704Z [err] npm ERR! gyp ERR! node -v v16.16.0
2022-07-16T10:54:31.704Z [err] npm
2022-07-16T10:54:31.704Z [err]  ERR! gyp ERR! node-gyp -v v3.8.0
2022-07-16T10:54:31.704Z [err] npm ERR!
2022-07-16T10:54:31.705Z [err]  gyp ERR! not ok
2022-07-16T10:54:31.709Z [err] 
2022-07-16T10:54:31.710Z [err] npm ERR! A complete log of this run can be found in:
2022-07-16T10:54:31.710Z [err] npm ERR!     /data/.npm/_logs/2022-07-16T10_54_23_982Z-debug-0.log
2022-07-16T10:54:31.733Z rc=1

I assume this has something to do with the removal of python2 from nodered, but not sure 😉

Installation error - serialport/bindings

I get the following error during installation. Any clue?
npm 8.5.5
node v16.15.0

(Then I installed node-red-node-serialport seperately without any problem. But this didn't solve the problem.)

`2022-10-20T18:52:46.036Z Installieren : node-red-contrib-smartmeter 0.6.3

2022-10-20T18:52:46.051Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-10-20T18:53:14.982Z [err] npm
2022-10-20T18:53:14.983Z [err]
2022-10-20T18:53:14.984Z [err] ERR! code 1
2022-10-20T18:53:14.985Z [err] npm
2022-10-20T18:53:14.986Z [err]
2022-10-20T18:53:14.986Z [err] ERR!
2022-10-20T18:53:14.986Z [err]
2022-10-20T18:53:14.987Z [err] path /mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings
2022-10-20T18:53:15.003Z [err] npm
2022-10-20T18:53:15.003Z [err]
2022-10-20T18:53:15.004Z [err] ERR!
2022-10-20T18:53:15.005Z [err] command failed
2022-10-20T18:53:15.005Z [err] npm
2022-10-20T18:53:15.006Z [err] ERR! command
2022-10-20T18:53:15.007Z [err] sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2022-10-20T18:53:15.008Z [err] npm
2022-10-20T18:53:15.008Z [err] ERR! make: Entering directory '/mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings/build'
2022-10-20T18:53:15.008Z [err] npm
2022-10-20T18:53:15.008Z [err] ERR! CXX(target) Release/obj.target/bindings/src/serialport.o
2022-10-20T18:53:15.008Z [err] npm ERR!
2022-10-20T18:53:15.010Z [err] make: Leaving directory '/mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings/build'
2022-10-20T18:53:15.011Z [err] npm
2022-10-20T18:53:15.011Z [err] ERR! prebuild-install warn install No prebuilt binaries found (target=16.15.0 runtime=node arch=arm libc= platform=linux)
2022-10-20T18:53:15.011Z [err] npm ERR! gyp info it worked if it ends with ok
2022-10-20T18:53:15.012Z [err] npm ERR! gyp info using [email protected]
2022-10-20T18:53:15.012Z [err] npm ERR! gyp info using [email protected] | linux | arm
2022-10-20T18:53:15.012Z [err] npm
2022-10-20T18:53:15.012Z [err] ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
2022-10-20T18:53:15.012Z [err] npm
2022-10-20T18:53:15.013Z [err] ERR! gyp info spawn /usr/bin/python3
2022-10-20T18:53:15.013Z [err] npm
2022-10-20T18:53:15.013Z [err] ERR! gyp info spawn args [
2022-10-20T18:53:15.013Z [err] npm ERR!
2022-10-20T18:53:15.013Z [err] gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2022-10-20T18:53:15.013Z [err] npm ERR!
2022-10-20T18:53:15.014Z [err] gyp info spawn args 'binding.gyp',
2022-10-20T18:53:15.014Z [err] npm ERR!
2022-10-20T18:53:15.014Z [err] gyp info spawn args '-f',
2022-10-20T18:53:15.014Z [err] npm ERR!
2022-10-20T18:53:15.014Z [err] gyp info spawn args 'make',
2022-10-20T18:53:15.014Z [err] npm ERR!
2022-10-20T18:53:15.015Z [err] gyp info spawn args '-I',
2022-10-20T18:53:15.015Z [err] npm
2022-10-20T18:53:15.015Z [err] ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings/build/config.gypi',
2022-10-20T18:53:15.015Z [err] npm ERR!
2022-10-20T18:53:15.015Z [err] gyp info spawn args '-I',
2022-10-20T18:53:15.015Z [err] npm ERR!
2022-10-20T18:53:15.015Z [err] gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2022-10-20T18:53:15.015Z [err] npm ERR! gyp info spawn args '-I',
2022-10-20T18:53:15.016Z [err] npm ERR! gyp info spawn args '/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.15.0/include/node/common.gypi',
2022-10-20T18:53:15.016Z [err] npm
2022-10-20T18:53:15.016Z [err] ERR! gyp info spawn args '-Dlibrary=shared_library',
2022-10-20T18:53:15.016Z [err] npm
2022-10-20T18:53:15.016Z [err] ERR! gyp info spawn args '-Dvisibility=default',
2022-10-20T18:53:15.016Z [err] npm ERR!
2022-10-20T18:53:15.017Z [err] gyp info spawn args '-Dnode_root_dir=/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.15.0',
2022-10-20T18:53:15.017Z [err] npm ERR!
2022-10-20T18:53:15.017Z [err] gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
2022-10-20T18:53:15.017Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.15.0/<(target_arch)/node.lib',
2022-10-20T18:53:15.017Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=/mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings',
2022-10-20T18:53:15.017Z [err] npm
2022-10-20T18:53:15.018Z [err] ERR! gyp info spawn args '-Dnode_engine=v8',
2022-10-20T18:53:15.018Z [err] npm
2022-10-20T18:53:15.018Z [err] ERR! gyp info spawn args '--depth=.',
2022-10-20T18:53:15.018Z [err] npm ERR!
2022-10-20T18:53:15.018Z [err] gyp info spawn args '--no-parallel',
2022-10-20T18:53:15.018Z [err] npm ERR!
2022-10-20T18:53:15.019Z [err] gyp info spawn args '--generator-output',
2022-10-20T18:53:15.019Z [err] npm ERR!
2022-10-20T18:53:15.019Z [err] gyp info spawn args 'build',
2022-10-20T18:53:15.019Z [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
2022-10-20T18:53:15.019Z [err] npm ERR! gyp info spawn args ]
2022-10-20T18:53:15.020Z [err] npm ERR! gyp info spawn make
2022-10-20T18:53:15.020Z [err] npm
2022-10-20T18:53:15.020Z [err] ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
2022-10-20T18:53:15.020Z [err] npm
2022-10-20T18:53:15.020Z [err] ERR! In file included from /usr/include/errno.h:28,
2022-10-20T18:53:15.020Z [err] npm
2022-10-20T18:53:15.020Z [err] ERR! from /mnt/dietpi_userdata/node-red/.cache/node-gyp/16.15.0/include/node/uv/errno.h:25,
2022-10-20T18:53:15.020Z [err] npm ERR!
2022-10-20T18:53:15.021Z [err] from /mnt/dietpi_userdata/node-red/.cache/node-gyp/16.15.0/include/node/uv.h:54,
2022-10-20T18:53:15.021Z [err] npm ERR!
2022-10-20T18:53:15.021Z [err] from ../../../nan/nan.h:59,
2022-10-20T18:53:15.021Z [err] npm ERR!
2022-10-20T18:53:15.021Z [err] from ../src/./serialport.h:13,
2022-10-20T18:53:15.021Z [err] npm ERR! from ../src/serialport.cpp:1:
2022-10-20T18:53:15.022Z [err] npm ERR! /usr/include/arm-linux-gnueabihf/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
2022-10-20T18:53:15.022Z [err] npm
2022-10-20T18:53:15.022Z [err] ERR! # include <linux/errno.h>
2022-10-20T18:53:15.022Z [err] npm
2022-10-20T18:53:15.022Z [err] ERR! ^~~~~~~~~~~~~~~
2022-10-20T18:53:15.022Z [err] npm
2022-10-20T18:53:15.023Z [err] ERR! compilation terminated.
2022-10-20T18:53:15.023Z [err] npm ERR!
2022-10-20T18:53:15.023Z [err] make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/serialport.o] Error 1
2022-10-20T18:53:15.023Z [err] npm ERR!
2022-10-20T18:53:15.023Z [err] gyp ERR! build error
2022-10-20T18:53:15.023Z [err] npm ERR! gyp ERR! stack Error: make failed with exit code: 2
2022-10-20T18:53:15.023Z [err] npm
2022-10-20T18:53:15.024Z [err] ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2022-10-20T18:53:15.024Z [err] npm ERR!
2022-10-20T18:53:15.024Z [err] gyp ERR! stack at ChildProcess.emit (node:events:527:28)
2022-10-20T18:53:15.024Z [err] npm ERR!
2022-10-20T18:53:15.025Z [err] gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
2022-10-20T18:53:15.025Z [err] npm ERR! gyp ERR! System Linux 5.10.103-v7+
2022-10-20T18:53:15.025Z [err] npm ERR!
2022-10-20T18:53:15.025Z [err] gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-10-20T18:53:15.025Z [err] npm ERR! gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/@serialport/bindings
2022-10-20T18:53:15.025Z [err] npm
2022-10-20T18:53:15.025Z [err] ERR! gyp ERR! node -v v16.15.0
2022-10-20T18:53:15.025Z [err] npm ERR!
2022-10-20T18:53:15.026Z [err] gyp ERR! node-gyp -v v9.0.0
2022-10-20T18:53:15.026Z [err] npm ERR! gyp ERR! not ok
2022-10-20T18:53:15.040Z [err]
2022-10-20T18:53:15.042Z [err] npm
2022-10-20T18:53:15.043Z [err] ERR! A complete log of this run can be found in:
2022-10-20T18:53:15.043Z [err] npm ERR! /mnt/dietpi_userdata/node-red/.npm/_logs/2022-10-20T18_52_48_204Z-debug-0.log
2022-10-20T18:53:15.116Z rc=1`

Transport Parameter

Hallo,

sobald ich die Transport Parameter einstelle und per deploy Button die Einstellungen aktivieren möchte ist der Node-Red Server nicht mehr erreichbar. Ich muss dann die kompletten Flows über die Console löschen damit ich Node-Red wieder starten kann. Ist so ein Problem bekannt? Ich nutzte Node-Red v0.20.7 und Node.js v8.16.0 auf einem IoT2040 von Siemens.

Danke!

Gruß Peter

Optional input from Node

Thanks a lot for your work!
I have a request for a feature that i did not find yet.
An input directly into the node where you can feed binary or hex data directly into the node.
That would be convenient.

HTTP Host and Port field not maching

In smartmeter-connection.html the fields for HTTP Connection are named httphost and httpport
In smartmeter-connection.js the are named hostname and hostport.

Installation not working with NodeJS 20.

I can't install the Plugin with NodeJS20. Using Alpine Linux 3.19. It works with NodeJS18.

NRTest:~# node -v v20.10.0

NRTest:~# npm install node-red-contrib-smartmeter npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! code 1 npm ERR! path /root/node_modules/@serialport/bindings npm ERR! command failed npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild npm ERR! make: Entering directory '/root/node_modules/@serialport/bindings/build' npm ERR! CXX(target) Release/obj.target/bindings/src/serialport.o npm ERR! CXX(target) Release/obj.target/bindings/src/serialport_unix.o npm ERR! make: Leaving directory '/root/node_modules/@serialport/bindings/build' npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.10.0 runtime=node arch=x64 libc=musl platform=linux) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | linux | x64 npm ERR! gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/node_modules/@serialport/bindings/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/20.10.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.10.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.10.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/root/node_modules/@serialport/bindings', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../src/./serialport.h:13, npm ERR! from ../src/serialport.cpp:1: npm ERR! ../../../nan/nan.h: In function 'bool Nan::IdleNotification(int)': npm ERR! ../../../nan/nan.h:688:63: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations] npm ERR! 688 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline( npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! 689 | idle_time_in_ms * 0.001); npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! In file included from /root/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/v8.h:34, npm ERR! from /root/.cache/node-gyp/20.10.0/include/node/node.h:73, npm ERR! from ../../../nan/nan.h:62: npm ERR! /root/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here npm ERR! 1293 | bool IdleNotificationDeadline(double deadline_in_seconds); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:78:51: 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] npm ERR! 78 | uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:135:53: 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] npm ERR! 135 | uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:175:52: 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] npm ERR! 175 | uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:215:52: 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] npm ERR! 215 | uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:271:50: 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] npm ERR! 271 | uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:316:50: 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] npm ERR! 316 | uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:366:58: 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] npm ERR! 366 | uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)': npm ERR! ../src/serialport.cpp:412:52: 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] npm ERR! 412 | uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain); npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp: At global scope: npm ERR! ../src/serialport.cpp:433:28: warning: unnecessary parentheses in declaration of 'ToParityEnum' [-Wparentheses] npm ERR! 433 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp:433:28: note: remove parentheses npm ERR! 433 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! | - - npm ERR! ../src/serialport.cpp:452:30: warning: unnecessary parentheses in declaration of 'ToStopBitEnum' [-Wparentheses] npm ERR! 452 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp:452:30: note: remove parentheses npm ERR! 452 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) { npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! | - - npm ERR! /root/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {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] npm ERR! 1172 | (node::addon_register_func) (regfunc), \ npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ npm ERR! /root/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X' npm ERR! 1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) npm ERR! | ^~~~~~~~~~~~~ npm ERR! ../src/serialport.cpp:486:1: note: in expansion of macro 'NODE_MODULE' npm ERR! 486 | NODE_MODULE(serialport, init); npm ERR! | ^~~~~~~~~~~ npm ERR! ../src/serialport_unix.cpp:27:10: fatal error: linux/serial.h: No such file or directory npm ERR! 27 | #include <linux/serial.h> npm ERR! | ^~~~~~~~~~~~~~~~ npm ERR! compilation terminated. npm ERR! make: *** [bindings.target.mk:113: Release/obj.target/bindings/src/serialport_unix.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.5.11-7-pve
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /root/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v20.10.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-19T08_05_09_007Z-debug-0.log`

Process Data from Stdin / Incoming Message?

Is it possible to process the data from a node-red message (coming in via mqtt publish)? Maybe with stdin Transport?

My data flow is:

  • Tibber Pulse sending MQTT message with binary SML Data.
  • MQTT In Node in Node-Red
  • Route binary data to SmartMeter and decode SML data
  • Use decoded response

DD3 eBZ Protokoll wird nicht unterstützt?

Hi,
ich möchte gerne meinen neuen Zweirichtungszähler (DD3 ebz gmbh) per Node-Red und USB-Interface auslesen. Leider kommt im Debug node nichts an bzw. die Fehlermeldung:
smartmeter-obis error: Error: No or too long answer from Serial Device after last request.

Per Serial Node kommt folgender Binärcode an (in Dezimaldarstellung):
...

Ist das eine neue Version vom SML Protokoll? Warum kann der Input nicht interpretiert werden? Binärcode Teilweise gekürzt.
Danke und Gruß
Valentin

Invalid protocol

I am trying to query a Tibber pulse. I have created the http host, entered the port, selected sml as the protocol and http request as the transport
But I don't get any data. According to the network trace, there is also no request from NodeRed to the host.
In the console of Nodered I see the following message

ERROR ON HTTP REQUEST: : Error: Invalid protocol:

Errors are not catched by catch node

My Smartmeter throws sporadicly a message which do not match the SML protocol. I want to catch this error with the error catch node in node red. This is not possible, since the error handling of the smartmeter node seems to be not correct implemented.

This is filling my debug panel in seconds.

Bildschirmfoto 2024-01-05 um 08 40 13

Uncaught Exception

31 Aug 09:21:09 - [red] Uncaught Exception:
31 Aug 09:21:09 - Error: Error while parsing SML message: Error: Unknown TL-Field 0x10 for OctetString [Offset: 81]!: Message: 1b1b1b1b01010101760700090a29729c620062007263010176010107000908ba26340b06454d480104c56bc655010163baa700760700090a29729d620062007263070177010b06454d4801048104010010824a4800091b0109760a6b810b0172291b1b01001b1b1b01010101760700090a2972ae620062c60772085200010745750a01011b1b1b1b01010101
at SmlProtocol.handleMessage (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/lib/protocols/SmlProtocol.js:50:15)
at SerialPort. (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/lib/transports/SerialResponseTransport.js:63:41)
at emitOne (events.js:96:13)
at SerialPort.emit (events.js:188:7)
at SerialPort.module.exports.raw (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/node_modules/serialport/lib/parsers.js:7:13)
at SerialPort._emitData (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:313:18)
at SerialPort. (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:293:14)
at SerialPort. (/usr/lib/node_modules/node-red-contrib-smartmeter/node_modules/smartmeter-obis/node_modules/serialport/lib/serialport.js:306:7)
at FSReqWrap.wrapper [as oncomplete] (fs.js:681:17)

Engelmann SensoStar U meter support?

Hi,
my "district heating provider" has replaced the current meter with an Engelmann SensoStar U. Unfortunately, I can not manage to read the data from the meter. Is this supported or does anyone have experience with it? Thank you.

Regards Markus

Hardware for the node

First of all, thank you for your excellent work.
I have a question about the hardware setup. Currently I am working on a university project and here I have to build my own smart meter for only one component, which writes the consumption data into a CSV file. Thereby I came across your nodes. I have already received an electricity meter from my university https://www.amazon.de/Tech-SDM230Modbus-Wechselstromz%C3%A4hler-Stromz%C3%A4hler-Schnittstelle/dp/B01N8XMS2J. Now I wanted to ask if this is suitable for the node. The communication with the Raspberry Pi I would do via an RS485 adapter https://www.amazon.de/USB-RS485-Adapter-mit-Geh%C3%A4use/dp/B00I9H5J02.

Is the setup possible or do I have to rethink and possibly look for another electricity meter?

Best regards,
maru2648

Error while installation on Raspberry Pi 3 with Hassio

Hi!

I keep getting the errors below while installation on a raspberry pi running HASSIO and the latest NodeRed Version (7.0.0). --> I have no clue what to do. Any advice?

Thanks a lot!

Christian

`2020-07-17T19:44:41.981Z installieren : node-red-contrib-smartmeter 0.3.1

2020-07-17T19:44:43.629Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production [email protected]
2020-07-17T19:45:11.793Z [err] npm
2020-07-17T19:45:11.794Z [err] WARN deprecated [email protected]: request has been deprecated, see request/request#3142
2020-07-17T19:45:31.492Z [out]
2020-07-17T19:45:31.492Z [out] > @serialport/[email protected] install /config/node-red/node_modules/@serialport/bindings
2020-07-17T19:45:31.492Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2020-07-17T19:45:31.492Z [out]
2020-07-17T19:45:33.263Z [err] prebuild-install
2020-07-17T19:45:33.264Z [err]
2020-07-17T19:45:33.264Z [err] WARN install No prebuilt binaries found (target=12.17.0 runtime=node arch=arm libc=musl platform=linux)
2020-07-17T19:45:39.035Z [err] gyp
2020-07-17T19:45:39.036Z [err]
2020-07-17T19:45:39.036Z [err] ERR! build error
2020-07-17T19:45:39.036Z [err]
2020-07-17T19:45:39.039Z [err] gyp
2020-07-17T19:45:39.040Z [err] ERR!
2020-07-17T19:45:39.040Z [err] stack
2020-07-17T19:45:39.040Z [err] Error: not found: make
2020-07-17T19:45:39.040Z [err] gyp ERR!
2020-07-17T19:45:39.040Z [err] stack
2020-07-17T19:45:39.040Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-07-17T19:45:39.040Z [err] gyp
2020-07-17T19:45:39.040Z [err]
2020-07-17T19:45:39.041Z [err] ERR!
2020-07-17T19:45:39.041Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-07-17T19:45:39.041Z [err] gyp
2020-07-17T19:45:39.041Z [err] ERR!
2020-07-17T19:45:39.041Z [err] stack
2020-07-17T19:45:39.041Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-07-17T19:45:39.041Z [err] gyp
2020-07-17T19:45:39.041Z [err] ERR!
2020-07-17T19:45:39.041Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2020-07-17T19:45:39.042Z [err] gyp
2020-07-17T19:45:39.042Z [err] ERR!
2020-07-17T19:45:39.042Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-07-17T19:45:39.042Z [err] gyp
2020-07-17T19:45:39.042Z [err] ERR!
2020-07-17T19:45:39.042Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-07-17T19:45:39.042Z [err] gyp
2020-07-17T19:45:39.042Z [err] ERR!
2020-07-17T19:45:39.042Z [err] stack at FSReqCallback.oncomplete (fs.js:167:21)
2020-07-17T19:45:39.044Z [err] gyp
2020-07-17T19:45:39.044Z [err] ERR! System Linux 4.19.106-v7
2020-07-17T19:45:39.044Z [err] gyp
2020-07-17T19:45:39.044Z [err] ERR! command
2020-07-17T19:45:39.044Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-07-17T19:45:39.045Z [err] gyp ERR!
2020-07-17T19:45:39.045Z [err] cwd /config/node-red/node_modules/@serialport/bindings
2020-07-17T19:45:39.045Z [err] gyp
2020-07-17T19:45:39.045Z [err] ERR!
2020-07-17T19:45:39.045Z [err] node -v v12.17.0
2020-07-17T19:45:39.045Z [err] gyp
2020-07-17T19:45:39.045Z [err] ERR!
2020-07-17T19:45:39.045Z [err] node-gyp -v v5.1.0
2020-07-17T19:45:39.046Z [err] gyp
2020-07-17T19:45:39.046Z [err] ERR!
2020-07-17T19:45:39.046Z [err] not ok
2020-07-17T19:45:41.616Z [err] npm
2020-07-17T19:45:41.616Z [err] ERR! code ELIFECYCLE
2020-07-17T19:45:41.616Z [err] npm
2020-07-17T19:45:41.616Z [err] ERR! errno 1
2020-07-17T19:45:41.621Z [err] npm
2020-07-17T19:45:41.621Z [err] ERR! @serialport/[email protected] install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2020-07-17T19:45:41.621Z [err] npm ERR!
2020-07-17T19:45:41.621Z [err] Exit status 1
2020-07-17T19:45:41.621Z [err] npm
2020-07-17T19:45:41.622Z [err] ERR!
2020-07-17T19:45:41.622Z [err]
2020-07-17T19:45:41.622Z [err] npm
2020-07-17T19:45:41.622Z [err] ERR! Failed at the @serialport/[email protected] install script.
2020-07-17T19:45:41.622Z [err] npm
2020-07-17T19:45:41.622Z [err] ERR!
2020-07-17T19:45:41.622Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2020-07-17T19:45:41.759Z [err]
2020-07-17T19:45:41.760Z [err] npm ERR!
2020-07-17T19:45:41.760Z [err] A complete log of this run can be found in:
2020-07-17T19:45:41.760Z [err] npm
2020-07-17T19:45:41.760Z [err] ERR!
2020-07-17T19:45:41.761Z [err] /root/.npm/_logs/2020-07-17T19_45_41_705Z-debug.log
2020-07-17T19:45:41.795Z rc=1`

compatibility issue with node-red v3.1.0

There is an issue with the node-red-contrib-smartmeter (v0.6.3) module in combination with node-red (v3.1.0).

Inside the "Palette" view the module can be installed, but has a warning displayed.

📦 node-red-contrib-smartmeter
🏷️ 0.6.3
   [object Object]
⚠️ [object Object]

I'm currently unsure how to extract more information out of node-red to identify the issue.

Any help would be appreciated...

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.