gianfrdp / SDM120C

sdm120c ModBus Mini Smart Meter
GNU General Public License v2.0
72 stars 37 forks source link

How to change the "Pulse output rate" and things related to it #11

Closed TMHEINE closed 5 years ago

TMHEINE commented 5 years ago

Hi,

on the Eastron SDM120 Modbus the "Pulse Output 1" is configurable:

it can be set to represent total/Import/Export kWh or kVarh. The pulse constant can be set to gernerate 1 pulse per: 0,001(Default)/0,01/0,1/1 kWh/kVarh The pulse with can be set to 200/100/60ms

How can these settings be done with "sdm120c"? see: SDM120CT-Modbus.pdf

gianfrdp commented 5 years ago

You have to change code, adding support for register 0xF910, adding a new command-line parameter to input new pulse value, adding a block of code where to invoke changeConfigHex(ctx, '0xF910', new_value, RESTART_FALSE);

gianfrdp commented 5 years ago

Added new parameter -O for this issue, see https://github.com/gianfrdp/SDM120C/commit/2c3d88d6ee85927ca2139170fb0a443e272a33e2