Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[omnikinverter] Add refreshInterval parameter #17523

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions bundles/org.openhab.binding.omnikinverter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ No autodiscovery available

## Thing Configuration

| Config | Description | type | Default |
| :------- | :------------ | :----- | :-------- |
| hostname | The hostname or ip through which the inverter can be accessed | string | n/a |
| port | TCP port through which the inverter listens on for incoming connections | integer | 8899 |
| serial | The serial of the wifi module. The Wifi module's SSID contains the number. This is the numerical part only, i.e. without _AP__ | integer | n/a |
| Config | Description | type | Default |
|:----------------|:-------------------------------------------------------------------------------------------------------------------------------|:--------|:--------|
| hostname | The hostname or ip through which the inverter can be accessed | string | n/a |
| port | TCP port through which the inverter listens on for incoming connections | integer | 8899 |
| serial | The serial of the wifi module. The Wifi module's SSID contains the number. This is the numerical part only, i.e. without _AP__ | integer | n/a |
| refreshInterval | Interval the device is polled in seconds. | integer | 10 |

## Channels

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ public class OmnikInverterConfiguration {
public String hostname = "";
public int port;
public int serial;
public int refreshInterval = 10;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void initialize() {

inverter = new OmnikInverter(config.hostname, config.port, config.serial);
updateStatus(ThingStatus.UNKNOWN);
pollJob = scheduler.scheduleWithFixedDelay(this::updateData, 0, 10, TimeUnit.SECONDS);
pollJob = scheduler.scheduleWithFixedDelay(this::updateData, 0, config.refreshInterval, TimeUnit.SECONDS);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ thing-type.config.omnikinverter.omnik.hostname.label = Hostname
thing-type.config.omnikinverter.omnik.hostname.description = The hostname or IP of the Omnik Inverter
thing-type.config.omnikinverter.omnik.port.label = Port
thing-type.config.omnikinverter.omnik.port.description = The TCP port of the Omnik inverter, usually 8899
thing-type.config.omnikinverter.omnik.refreshInterval.label = Refresh Interval
thing-type.config.omnikinverter.omnik.refreshInterval.description = Interval the device is polled in seconds.
thing-type.config.omnikinverter.omnik.serial.label = Serial
thing-type.config.omnikinverter.omnik.serial.description = The serial of the Omnik inverter's Wifi module. This the number part only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
<label>Serial</label>
<description>The serial of the Omnik inverter's Wifi module. This the number part only.</description>
</parameter>
<parameter name="refreshInterval" type="integer" unit="s" min="5">
<label>Refresh Interval</label>
<description>Interval the device is polled in seconds.</description>
<default>10</default>
<advanced>true</advanced>
</parameter>
</config-description>
</thing-type>

Expand Down