@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?
-
Smartmeter2
-
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. -
Hi, i will make an update with the nr-of-bits, parity and nr-of-stopbits configurable. That will help customizing specific serial communications.
Did you add only the 2 values that gave an error?
-
Yes, only this two are added.
EDIT:
One error shows 1-0:1.7.0 for actualusage, but i I have config 1-0:16.7.0 -
Hi, a new version for testing v0.0.11
- added the communications settings for parity, stopbits and databits
- probably corrected the configuration error
- added an INFO dump of the received smartmeter message, in debuglevel 2. This can be used to decode your OBIS values
-
Here the outcome:
info [pimatic-smartmeter-obis]: Your smartmeter does't support OBIS value: 1-0:1.8.0 = totalusage 17:23:55info [pimatic-smartmeter-obis]: Your smartmeter does't support OBIS value: 1-0:16.7.0 = actualusage 17:23:55info [pimatic-smartmeter-obis]: { '129-129:199.130.3*255': ObisMeasurement { medium: 129, channel: 129, measurement: 199, measureType: 130, tariffRate: 3, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '1-0:0.0.9*255': ObisMeasurement { medium: 1, channel: 0, measurement: 0, measureType: 0, tariffRate: 9, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '1-0:1.8.0*255': ObisMeasurement { medium: 1, channel: 0, measurement: 1, measureType: 8, tariffRate: 0, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '1-0:1.8.1*255': ObisMeasurement { medium: 1, channel: 0, measurement: 1, measureType: 8, tariffRate: 1, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '1-0:1.8.2*255': ObisMeasurement { medium: 1, channel: 0, measurement: 1, measureType: 8, tariffRate: 2, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '1-0:16.7.0*255': ObisMeasurement { medium: 1, channel: 0, measurement: 16, measureType: 7, tariffRate: 0, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] }, '129-129:199.130.5*255': ObisMeasurement { medium: 129, channel: 129, measurement: 199, measureType: 130, tariffRate: 5, previousMeasurement: 255, rawValue: undefined, values: [ [Object] ] } }
-
You are right the *255 was missing.
Will you put it into the code or should it be part of the config?
One small request, could you add the acronym option for each obisValue?
-
Very nice!
The *255 needs to be added in the config, because not all smartmeters use it.
The acronym and unit should be configurable per value in the next version (v0.0.12).Your actual power consumption seems a little high. I think the unit of actual should be Watt. You can change that in v0.0.12
-
@bertreb said in Smartmeter2:
Hi, i will make an update with the nr-of-bits, parity and nr-of-stopbits configurable. That will help customizing specific serial communications.
Did you add only the 2 values that gave an error?No this is due to my bitcoin mining servers…
Seems the configured unit does not take place in the UI. -
Hmm, even when I try incognito mode it doesn’t change.
-
I tried several changes of unit and acronym on my pimatic setup (raspberrypi 3 with node v4 and macbook with node v8). I used safari and firefox. No problems detected. So i can’t reproduce the problem.
Did you try to clear the browser cache?If you got extra debug info please send it. Tomorrow i will look into this further.