Skip to content

Commit

Permalink
Applied feedback from fwolter
Browse files Browse the repository at this point in the history
Signed-off-by: Giovanni Mirulla <[email protected]>
  • Loading branch information
giovannimirulla committed Jul 25, 2020
1 parent 0fec996 commit ea603a8
Show file tree
Hide file tree
Showing 18 changed files with 226 additions and 279 deletions.
2 changes: 0 additions & 2 deletions bundles/org.openhab.binding.modbus.studer/.gitignore

This file was deleted.

22 changes: 11 additions & 11 deletions bundles/org.openhab.binding.modbus.studer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ For a list of certified products see this page: https://www.studer-innotec.com/
This bundle adds the following thing type to the Modbus binding.
Note, that the things will show up under the Modbus binding.

| Thing Type | Description |Picture |
| Thing Type IDs | Description |Picture |
| --- | --- | --- |
| BSP | For BSP that offer a highly precise measuring for Xtender, VarioTrack and VarioString systems | ![BSP](doc/bsp.png) |
| Xtender | For the Xtender models for system capacities from 0.5kVA to 72kVA that allow for the optimal use of available energy | ![Xtender](doc/xtender.png) |
| VarioTrack | For the VarioTrack models of MPPT solar charge controllers for systems with solar PV capacity from 1 - 75kWp | ![VarioTrack](doc/variotrack.png) |
| VarioString | For the VarioString models of MPPT solar charge controllers for systems with solar PV capacity from 4 | ![VarioString](doc/variostring.png) |
| bsp | For BSP that offer a highly precise measuring for Xtender, VarioTrack and VarioString systems | ![BSP](doc/bsp.png) |
| xtender | For the Xtender models for system capacities from 0.5kVA to 72kVA that allow for the optimal use of available energy | ![Xtender](doc/xtender.png) |
| variotrack | For the VarioTrack models of MPPT solar charge controllers for systems with solar PV capacity from 1 - 75kWp | ![VarioTrack](doc/variotrack.png) |
| variostring | For the VarioString models of MPPT solar charge controllers for systems with solar PV capacity from 4 | ![VarioString](doc/variostring.png) |


## Thing Configuration
Expand All @@ -41,7 +41,7 @@ The following Channels, and their associated channel types are shown below divid

#### BSP

All channels readed for a BSP device
All channels read for a BSP device

| Channel | Type | Description |
| ------------------ | ------------------------ | --------------------- |
Expand All @@ -53,7 +53,7 @@ All channels readed for a BSP device

#### Xtender

All channels readed for a Xtender device
All channels read for a Xtender device

| Channel | Type | Description |
| ----------------- | ------------------------ | ----------------------- |
Expand All @@ -70,7 +70,7 @@ All channels readed for a Xtender device

#### VarioTrack

All channels readed for a VarioTrack device
All channels read for a VarioTrack device

| Channel | Type | Description |
| -------------------- | ------------------------ | ----------------------------------------- |
Expand All @@ -85,7 +85,7 @@ All channels readed for a VarioTrack device

#### VarioString

All channels readed for a VarioString device
All channels read for a VarioString device

| Channel | Type | Description |
| ----------------------- | ------------------------ | --------------------------------------------- |
Expand Down Expand Up @@ -122,10 +122,10 @@ Note: Make sure that refresh and slave address are numerical, without quotes.
### Item Configuration

```
Number XtenderStuderThing_InputVoltage "Input Voltage [%.2f V]"
Number XtenderStuderThing_InputVoltage "Input Voltage [%.2f %unit%]"
{channel="modbus:xtender:bridge:xtenderdevice:inputVoltage"}
Number XtenderStuderThing_InputCurrent "Input Current [%.2f A]" {channel="modbus:xtender:bridge:xtenderdevice:inputCurrent"}
Number XtenderStuderThing_InputCurrent "Input Current [%.2f %unit%]" {channel="modbus:xtender:bridge:xtenderdevice:inputCurrent"}
String XtenderStuderThing_StateInverter "State: [%s]" {channel="modbus:xtender:bridge:xtenderdevice:stateInverter"}
```
Expand Down
Binary file modified bundles/org.openhab.binding.modbus.studer/doc/bsp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bundles/org.openhab.binding.modbus.studer/doc/variostring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bundles/org.openhab.binding.modbus.studer/doc/variotrack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bundles/org.openhab.binding.modbus.studer/doc/xtender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions bundles/org.openhab.binding.modbus.studer/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand All @@ -12,7 +13,7 @@
<artifactId>org.openhab.binding.modbus.studer</artifactId>

<name>openHAB Add-ons :: Bundles :: Studer Binding</name>
<dependencies>
<dependencies>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.modbus</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.modbus.studer-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>file:${basedirRoot}/bundles/org.openhab.io.transport.modbus/target/feature/feature.xml</repository>
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<repository>file:${basedirRoot}/bundles/org.openhab.io.transport.modbus/target/feature/feature.xml</repository>
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-bindings-modbus-studer" description="Studer Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-modbus</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus/${project.version}</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus.studer/${project.version}</bundle>
</feature>
<feature name="openhab-bindings-modbus-studer" description="Studer Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature>openhab-transport-modbus</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus/${project.version}</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus.studer/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,16 @@
*/
@NonNullByDefault
public class StuderConfiguration {

/**
* Address of slave device
*/
public int slaveAddress = 0;
/**
* Refresh interval in seconds
*/
private static int refresh = 5;

public int refreshSec = 5;
/**
* Max tries for one register
*/
public int maxTries = 3;

/**
* Get refresh period
*/
public static int getRefresh() {
return refresh;
}

/**
* Set refresh period
*/
public void setRefresh(int refresh) {
StuderConfiguration.refresh = refresh;
}

}
Loading

0 comments on commit ea603a8

Please sign in to comment.