Skip to content

Commit

Permalink
Incorporate review feedback #1
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolter committed Nov 30, 2020
1 parent dcdb243 commit 73b34d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
5 changes: 2 additions & 3 deletions bundles/org.openhab.binding.modbus.sbc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ This binding does not support discovery.

## Thing Configuration

The following configuration parameters apply to `ald1Unidirectional` and `ald1Bidirectional`.
The following configuration parameter applys to `ald1Unidirectional` and `ald1Bidirectional`.

| Name | Description | Type | Required |
|---------------|------------------------------------------|---------|----------|
| address | Modbus slave address of the energy meter | Integer | yes |
| pollIntervall | Time between polling the data in ms | Integer | yes |
| pollInterval | Time between polling the data in ms | Integer | yes |

The Thing needs a Modbus serial slave Bridge to operate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void initialize() {
return;
}

ModbusReadRequestBlueprint localBlueprint = blueprint = new ModbusReadRequestBlueprint(config.address,
ModbusReadRequestBlueprint localBlueprint = blueprint = new ModbusReadRequestBlueprint(getSlaveId(),
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, FIRST_READ_ADDRESS - 1, READ_LENGTH, TRIES);

updateStatus(ThingStatus.UNKNOWN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
@NonNullByDefault
public enum ALD1Registers {
TOTAL_ENERGY(0.01f, 28, UINT32, SmartHomeUnits.KILOWATT_HOUR),
PARTIAL_ENERGY(0.01f, 30, UINT32, SmartHomeUnits.KILOWATT_HOUR),
FEEDING_BACK_ENERGY(0.01f, 30, UINT32, SmartHomeUnits.KILOWATT_HOUR),
PARTIAL_ENERGY(0.01f, 30, UINT32, SmartHomeUnits.KILOWATT_HOUR), // only unidirectional meters
FEEDING_BACK_ENERGY(0.01f, 30, UINT32, SmartHomeUnits.KILOWATT_HOUR), // only bidirectional meters
VOLTAGE(1, 36, UINT16, SmartHomeUnits.VOLT),
CURRENT(0.1f, 37, UINT16, SmartHomeUnits.AMPERE),
ACTIVE_POWER(10, 38, INT16, SmartHomeUnits.WATT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd">

<config-description uri="thing-type:modbus-sbc:ald1">
<parameter name="address" type="integer" required="true" min="1" max="247">
<label>Modbus Address</label>
<description>Modbus slave address of the energy meter.</description>
<default>1</default>
</parameter>

<parameter name="pollInterval" type="integer" required="true" min="100" unit="ms">
<label>Poll Interval</label>
<description>Time between polling the data.</description>
<description>Time between polling the data in ms.</description>
<default>5000</default>
</parameter>
</config-description>
Expand Down

0 comments on commit 73b34d5

Please sign in to comment.