ruudverheijden / node-p1-reader

Node.js package for reading and parsing data from the P1 port of a Dutch or Belgian Smart Meter.
MIT License
25 stars 25 forks source link

No gas readings from Belgian Fluvius meter #23

Closed timverm-ikdoeict closed 2 years ago

timverm-ikdoeict commented 2 years ago

Hi!

First of all thanks for creating this great library. I'm using it in the nodered p1reader node.

I have however a problem reading gas meter values. Electrical values are fine. I have a combination of a digital electrical meter (T211) and gas meter (UNIFLO,G4SRTV,S4) from Fluvius. Both meters are wireless connected so i can read my gas meter values from my electrical meter. When i read out my serial port, it looks like this:

/FLU5\25xx_A

0-0:96.1.4(5xx6) 0-0:96.1.1(31xxx30) 0-0:1.0.0(2xx3W) 1-0:1.8.1(000878.849kWh) 1-0:1.8.2(000893.529kWh) 1-0:2.8.1(000163.600kWh) 1-0:2.8.2(000040.128kWh) 0-0:96.14.0(0002) 1-0:1.7.0(00.267kW) 1-0:2.7.0(00.000kW) 1-0:21.7.0(00.000kW) 1-0:41.7.0(00.111kW) 1-0:61.7.0(00.318kW) 1-0:22.7.0(00.162kW) 1-0:42.7.0(00.000kW) 1-0:62.7.0(00.000kW) 1-0:32.7.0(233.7V) 1-0:52.7.0(235.9V) 1-0:72.7.0(232.6V) 1-0:31.7.0(001.24A) 1-0:51.7.0(000.53A) 1-0:71.7.0(001.54A) 0-0:96.3.10(1) 0-0:17.0.0(999.9kW) 1-0:31.4.0(999A) 0-0:96.13.0() 0-1:24.1.0(003) 0-1:96.1.1(37xx37) 0-1:24.4.0(1) 0-1:24.2.3(22xx05W)(00273.519*m3) !A463

(I replaced everything that remotely looked like an ID. I hope i didn't remove too much.)

I get the above output from python3 -m serial.tools.miniterm /dev/ttyUSB2 115200 So the configuration i use is 115200,8,N,1

The json i get in nodered however has null values for al the fields, except deviceType and valvePosition. { "deviceType":"003", "equipmentId":null, "timestamp":null, "reading":null, "unit":null, "valvePosition":"1" } Do you see any difference in the format your library support that can cause this problem?

Thanks! Tim

timverm-ikdoeict commented 2 years ago

Ok, sorry i was too quick. After comparing the source code here, i've found a difference in the parsePacket.js code in my installation. In the latest version, extra codes are added for converting gas values. These are not in my version. The nodered node (https://github.com/onokje/node-red-contrib-p1reader) is referencing p1-reader@^2.0.4, but for some reason it is not using the latest version of your code. Unless you have any idea why, i guess i will have to look there for a solution. I temporary fixed the problem by manually editing the code in parsePacket.js. It is working now.

Thanks anyway!

ruudverheijden commented 2 years ago

Hi, yes the library should support Belgian gas readings, although I cannot test it myself since I live in the netherlands. I've never used the NodeRed lib you are referring to, so cannot help you there. Hopefully its owner can help you out :)