Updated external content (Jenkins build 1097)

pull/1969/head
openHAB Build Server 2022-08-23 03:34:10 +00:00
parent 22972510c7
commit 7dcd994d7a
7 changed files with 464 additions and 74 deletions

File diff suppressed because one or more lines are too long

View File

@ -90,3 +90,37 @@ JRuby can [import Java classes](https://github.com/jruby/jruby/wiki/CallingJavaF
Depending on the openHAB logging configuration, you may need to prefix logger names with `org.openhab.automation` for them to show up in the log file (or you modify the logging configuration).
**Note**: Installing the [JRuby Scripting Library](https://boc-tothefuture.github.io/openhab-jruby/installation/) will provide enhanced capabilities with simpler rule syntax.
## Transformations
This add-on also provides the necessary infrastructure to use Ruby for writing [transformations](https://www.openhab.org/docs/configuration/transformations.html).
Once the addon is installed, you can create a Ruby file in the `$OPENHAB_CONF/transform` directory, with the extension `.script`.
It's important that the extension is `.script` so that the core `SCRIPT` transform service will recognize it.
When referencing the file, you need to specify the `SCRIPT` transform, with `rb` as the script type: `SCRIPT(rb:mytransform.script):%s`.
You can also specify additional variables to be set in the script using a URI-like query syntax: `SCRIPT(rb:mytransform.script?a=1b=c):%s` in order to share a single script with slightly different parameters for different items.
**Note**: Due to an [issue](https://github.com/jruby/jruby/issues/5876) in the current version of JRuby, you will need to begin your script with `input ||= nil` (and `a ||= nil` etc. for additional query variables) so that JRuby will recognize the variables as variables--rather than method calls--when it's parsing the script.
Otherwise you will get errors like `(NameError) undefined local variable or method 'input' for main:Object`.
### Example Transformation
#### compass.script
```ruby
input ||= nil
DIRECTIONS = %w[N NE E SE S SW W NW N].freeze
if input.nil? || input == "NULL" || input == "UNDEF"
"-"
else
cardinal = DIRECTIONS[(input.to_f / 45).round]
"#{cardinal} (#{input.to_i}°)"
end
```
#### weather.items
```Xtend
Number:Angle Exterior_WindDirection "Wind Direction [SCRIPT(rb:compass.script):%s]" <wind>
```
Given a state of `82 °`, this will produce a formatted state of `E (82°)`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,181 @@
---
id: nobohub
label: NoboHub
title: NoboHub - Bindings
type: binding
description: "This binding controls the Glen Dimplex Nobø Hub using the <a href='https://www.glendimplex.se/media/15650/nobo-hub-api-v-1-1-integration-for-advanced-users.pdf'>Nobø Hub API v1.1</a>."
since: 3x
install: manual
---
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
{% include base.html %}
# NoboHub Binding
This binding controls the Glen Dimplex Nobø Hub using the <a href="https://www.glendimplex.se/media/15650/nobo-hub-api-v-1-1-integration-for-advanced-users.pdf">Nobø Hub API v1.1</a>.
![Nobo Hub](doc/nobohub.jpg)
It lets you read and change temperature and profile settings for zones, and read and set active overrides to change the global mode of the hub.
This binding is tested with the following devices:
* Thermostats for different electrical panel heaters
* Thermostats for heating in floors
* Nobø Switch SW 4
## Thermostats
Not all thermostats are made equal.
* NCU-1R: Comfort temperature setting on the device overrides values from the Hub, making the setting in the Hub useless.
* NCU-2R: Synchronizes temperature settings to and from the Hub.
## Supported Things
| Thing | Thing Type | Description |
|-----------|------------|-------------------------------------------------------------------------------------------------|
| hub | Bridge | The Nobø Hub provides a gateway between your components, with the ability to organise in zones. |
| component | Thing | A component is a device, i.e. panel heater or switch. |
| zone | Thing | A zone can hold one or more components. |
## Discovery
The hub will be automatically discovered.
Before it can be used, you will have to update the configuration with the last three digits of its serial number.
When the hub is configured with the correct serial number, it will autodetect zones and components (thermostats and switches).
## Thing Configuration
```
# Configuration for Nobø Hub
#
# Serial number of the Nobø hub to communicate with, 12 digits.
serialNumber=103000xxxxxx
# Host name or IP address of the Nobø hub
hostName=10.0.0.10
```
## Channels
### Hub
| channel | type | description |
|---------------------|--------|-----------------------------------------------------|
| activeOverrideName | String | The name of the active override |
### Zone
| channel | type | description |
|------------------------------|--------------------|--------------------------------------------|
| activeWeekProfileName | String | The name of the active week profile |
| activeWeekProfile | Number | The active week profile id |
| comfortTemperature | Number:Temperature | The configured comfort temperature |
| ecoTemperature | Number:Temperature | The configured eco temparature |
| currentTemperature | Number:Temperature | The current temperature in the zone |
| calculatedWeekProfileStatus | String | The current override based on week profile |
CurrentTemperature only works if the zone has a device that reports it (e.g. a switch).
### Component
| channel | type | description |
|---------------------|--------------------|------------------------------------------|
| currentTemperature | Number:Temperature | The current temperature of the component |
Not all devices report this.
## Full Example
### nobo.things
```
Bridge nobohub:nobohub:controller "Nobø Hub" [ hostName="192.168.1.10", serialNumber="103000000000" ] {
Thing zone 1 "Zone - Kitchen" [ id=1 ]
Thing component 184000000000 "Heater - Kitchen" [ serialNumber="184000000000" ]
}
```
### nobo.items
```
// Hub
String Nobo_Hub_GlobalOverride "Global Override %s" <heating> {channel="nobohub:nobohub:controller:activeOverrideName"}
// Panel Heater
Number:Temperature PanelHeater_CurrentTemperature "Setpoint [%.1f °C]" <temperature> {channel="nobohub:component:controller:184000000000:currentTemperature"}
// Zone
String Zone_ActiveWeekProfileName "Active week profile name [%s]" <calendar> {channel="nobohub:zone:controller:1:activeWeekProfileName"}
Number Zone_ActiveWeekProfile "Active week profile [%d]" <calendar> {channel="nobohub:zone:controller:1:activeWeekProfile"}
String Zone_ActiveStatus "Active status %s]" <heating> {channel="nobohub:zone:controller:1:calculatedWeekProfileStatus"}
Number:Temperature Zone_ComfortTemperature "Comfort temperature [%.1f °C]" <temperature> {channel="nobohub:zone:controller:1:comfortTemperature"}
Number:Temperature Zone_EcoTemperatur "Eco temperature [%.1f °C]" <temperature> {channel="nobohub:zone:controller:1:ecoTemperature"}
Number:Temperature Zone_CurrentTemperature "Current temperature [%.1f °C]" <temperature> {channel="nobohub:zone:controller:1:currentTemperature"}
```
### nobo.sitemap
```
sitemap nobo label="Nobø " {
Frame label="Hub"{
Switch item=Nobo_Hub_GlobalOverride
}
Frame label="Main Bedroom"{
Switch item=Zone_ActiveStatus
Text item=Zone_ActiveWeekProfileName
Text item=Zone_ActiveWeekProfile
Selection item=Zone_ActiveWeekProfile
Setpoint item=Zone_ComfortTemperatur minValue=7 maxValue=30 step=1 icon="temperature"
Setpoint item=Zone_EcoTemperatur minValue=7 maxValue=30 step=1 icon="temperature"
Text item=Zone_CurrentTemperatur
Text item=PanelHeater_CurrentTemperatur
}
}
```
## Organize your setup
Nobø Hub uses a combination of status types (Normal, Comfort, Eco, Away), profiles types (Comfort, Eco, Away, Off), predefined temperature types (Comfort, Eco, Away), zones and override settings to organize and enable different features.
This makes it possible to control the heaters in many different scenarios and combinations.
The following is a suggested way of organizing the binding with the Hub for a good level of control and flexibility.
If you own panels with a physical Comfort temperature override, you need to use the Eco temperature type for setting level used by the day based profiles.
If not, you can use either Comfort or Eco to set wanted level.
Start by creating the following profiles in the Nobø Hub App:
OFF Set to status off all day, every day.
ON Set to status [Comfort|Eco] all day, every day
Eco Set to status Eco all day, every day
Away Set to status Away all way, every day
Weekday 06->16 Set to status [Comfort|Eco] between 06->16 every weekday, otherwise set to [Away|Off]
Weekday 06->23 Set to status [Comfort|Eco] between 06->23 every weekday, otherwise set to [Away|Off]
Weekend 06->16 Set to status [Comfort|Eco] between 06->16 in the weekend, otherwise set to [Away|Off]
Weekend 06->23 Set to status [Comfort|Eco] between 06->23 in the weekend, otherwise set to [Away|Off]
Every day 06->16 Set to status [Comfort|Eco] between 06->16 every day, otherwise set to [Away|Off]
Every day 06->23 Set to status [Comfort|Eco] between 06->23 every day, otherwise set to [Away|Off]
Next set [Comfort|Eco] level for each zone to your requirements.
For a more advanced setup, you can create a rule which both sets temperature level and profile.
Then create a sitemap with a Selection pointing to the Week Profile item.
The binding will now automatically update all available week profile options in the selection button:
### nobo.sitemap
```
sitemap nobo label="Nobø " {
Frame label="Main Bedroom"{
Selection item=MainBedroom_Zone_WeekProfile
}
}
```

View File

@ -32,12 +32,12 @@ This binding does not support automatic discovery.
The forecast thing needs to be configured with the latitude and longitude for the location of the forecast.
You can also choose for which hours and which days you would like to get forecasts.
| Parameter | Description | Required |
|-----------|-------------|----------|
| Latitude | Latitude of the forecast | Yes |
| Longitute | Longitude of the forecast | Yes |
| Hourly forecasts | The hourly forecasts to display | No |
| Daily forecasts | The daily forecasts to display | No |
| Parameter | Description | Required |
|------------------|---------------------------------|----------|
| Latitude | Latitude of the forecast | Yes |
| Longitude | Longitude of the forecast | Yes |
| Hourly forecasts | The hourly forecasts to display | No |
| Daily forecasts | The daily forecasts to display | No |
## Channels
@ -54,81 +54,81 @@ Examples:
#### Basic channels
| channel | type | channel id | description |
|----------|--------|------------|------------------------------|
| Temperature | Number:Temperature | t | Temperature in Celsius |
| Max Temperature | Number:Temperature | tmax | Highest temperature of the day (daily forecast only) |
| Min Temperature | Number:Temperature | tmin | Lowest temperature of the day (daily forecast only) |
| Wind direction | Number:Angle | wd | Wind direction in degrees |
| Wind Speed | Number:Speed | ws | Wind speed in m/s |
| Max Wind Speed | Number:Speed | wsmax | Highest wind speed of the day (daily forecast only) |
| Min Wind Speed | Number:Speed | wsmin | Lowest wind speed of the day (daily forecast only) |
| Wind gust speed | Number:Speed | gust | Wind gust speed in m/s |
| Minimum precipitation | Number:Speed | pmin | Minimum precipitation intensity in mm/h |
| Maximum precipitation | Number:Speed | pmax | Maximum precipitation intensity in mm/h |
| Total precipitation | Number:Length | ptotal | Total amount of precipitation during the day, in mm (daily forecast only) |
| Precipitation category* | Number | pcat | Type of precipitation |
| Air pressure | Number:Pressure | msl | Air pressure in hPa |
| Relative humidity | Number:Dimensionless | r | Relative humidity in percent |
| Total cloud cover | Number:Dimensionless | tcc_mean | Mean value of total cloud cover in percent |
| Weather condition** | Number | wsymb2 | Short description of the weather conditions |
| channel | type | channel id | description |
|-------------------------|----------------------|------------|---------------------------------------------------------------------------|
| Temperature | Number:Temperature | t | Temperature in Celsius |
| Max Temperature | Number:Temperature | tmax | Highest temperature of the day (daily forecast only) |
| Min Temperature | Number:Temperature | tmin | Lowest temperature of the day (daily forecast only) |
| Wind direction | Number:Angle | wd | Wind direction in degrees |
| Wind Speed | Number:Speed | ws | Wind speed in m/s |
| Max Wind Speed | Number:Speed | wsmax | Highest wind speed of the day (daily forecast only) |
| Min Wind Speed | Number:Speed | wsmin | Lowest wind speed of the day (daily forecast only) |
| Wind gust speed | Number:Speed | gust | Wind gust speed in m/s |
| Minimum precipitation | Number:Speed | pmin | Minimum precipitation intensity in mm/h |
| Maximum precipitation | Number:Speed | pmax | Maximum precipitation intensity in mm/h |
| Total precipitation | Number:Length | ptotal | Total amount of precipitation during the day, in mm (daily forecast only) |
| Precipitation category* | Number | pcat | Type of precipitation |
| Air pressure | Number:Pressure | msl | Air pressure in hPa |
| Relative humidity | Number:Dimensionless | r | Relative humidity in percent |
| Total cloud cover | Number:Dimensionless | tcc_mean | Mean value of total cloud cover in percent |
| Weather condition** | Number | wsymb2 | Short description of the weather conditions |
#### Advanced channels
| channel | type | channel id | description |
|----------|--------|------------|------------------------------|
| Visibility | Number:Length | vis | Horizontal visibility in km |
| Thunder probability | Number:Dimensionless | tstm | Probability of thunder in percent |
| Frozen precipitation | Number:Dimensionless | spp | Percent of precipitation in frozen form (will be set to UNDEF if there's no precipitation) |
| Low level cloud cover | Number:Dimensionless | lcc_mean | Mean value of low level cloud cover (0-2500 m) in percent |
| Medium level cloud cover | Number:Dimensionless | mcc_mean | Mean value of medium level cloud cover (2500-6000 m) in percent |
| High level cloud cover | Number:Dimensionless | hcc_mean | Mean value of high level cloud cover (> 6000 m) in percent |
| Mean precipitation | Number:Speed | pmean | Mean precipitation intensity in mm/h |
| Median precipitation | Number:Speed | pmedian | Median precipitation intensity in mm/h |
| channel | type | channel id | description |
|--------------------------|----------------------|------------|--------------------------------------------------------------------------------------------|
| Visibility | Number:Length | vis | Horizontal visibility in km |
| Thunder probability | Number:Dimensionless | tstm | Probability of thunder in percent |
| Frozen precipitation | Number:Dimensionless | spp | Percent of precipitation in frozen form (will be set to UNDEF if there's no precipitation) |
| Low level cloud cover | Number:Dimensionless | lcc_mean | Mean value of low level cloud cover (0-2500 m) in percent |
| Medium level cloud cover | Number:Dimensionless | mcc_mean | Mean value of medium level cloud cover (2500-6000 m) in percent |
| High level cloud cover | Number:Dimensionless | hcc_mean | Mean value of high level cloud cover (> 6000 m) in percent |
| Mean precipitation | Number:Speed | pmean | Mean precipitation intensity in mm/h |
| Median precipitation | Number:Speed | pmedian | Median precipitation intensity in mm/h |
\* The precipitation category can have a value from 0-6, representing different types of precipitaion:
\* The precipitation category can have a value from 0-6, representing different types of precipitation:
| Value | Meaning |
|-------|---------|
| 0 | No precipitation|
| 1 | Snow |
| 2 | Snow and rain |
| 3 | Rain |
| 4 | Drizzle |
| 5 | Freezing rain |
| 6 | Freezing drizzle |
| Value | Meaning |
|-------|------------------|
| 0 | No precipitation |
| 1 | Snow |
| 2 | Snow and rain |
| 3 | Rain |
| 4 | Drizzle |
| 5 | Freezing rain |
| 6 | Freezing drizzle |
\** The weather condition channel can take values from 1-27, each corresponding to a different weather condition:
| Value | Condition |
|-------|-----------|
| 1 | Clear sky |
| 2 | Nearly clear sky |
| 3 | Variable cloudiness |
| 4 | Halfclear sky |
| 5 | Cloudy sky |
| 6 | Overcast |
| 7 | Fog |
| 8 | Light rain showers |
| 9 | Moderate rain showers |
| 10 | Heavy rain showers |
| 11 | Thunderstorm |
| 12 | Light sleet showers |
| 13 | Moderate sleet showers |
| 14 | Heavy sleet showers |
| 15 | Light snow showers |
| 16 | Moderate snow showers |
| 17 | Heavy snow showers |
| 18 | Light rain |
| 19 | Moderate rain |
| 20 | Heavy rain |
| 21 | Thunder |
| 22 | Light sleet |
| 23 | Moderate sleet |
| 24 | Heavy sleet |
| 25 | Light snowfall |
| 26 | Moderate snowfall |
| 27 | Heavy snowfall |
| Value | Condition |
|-------|------------------------|
| 1 | Clear sky |
| 2 | Nearly clear sky |
| 3 | Variable cloudiness |
| 4 | Half clear sky |
| 5 | Cloudy sky |
| 6 | Overcast |
| 7 | Fog |
| 8 | Light rain showers |
| 9 | Moderate rain showers |
| 10 | Heavy rain showers |
| 11 | Thunderstorm |
| 12 | Light sleet showers |
| 13 | Moderate sleet showers |
| 14 | Heavy sleet showers |
| 15 | Light snow showers |
| 16 | Moderate snow showers |
| 17 | Heavy snow showers |
| 18 | Light rain |
| 19 | Moderate rain |
| 20 | Heavy rain |
| 21 | Thunder |
| 22 | Light sleet |
| 23 | Moderate sleet |
| 24 | Heavy sleet |
| 25 | Light snowfall |
| 26 | Moderate snowfall |
| 27 | Heavy snowfall |
## Full Example

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nobohub"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<bridge-type id="nobohub">
<label>Nobo Hub</label>
<description>Nobo Hub Bridge Binding</description>
<channels>
<channel id="activeOverrideName" typeId="activeOverrideName-channel-type"/>
<channel id="weekProfiles" typeId="weekProfiles-channel-type"/>
</channels>
<properties>
<property name="vendor">Glen Dimplex Nobo</property>
</properties>
<representation-property>serialNumber</representation-property>
<config-description>
<parameter name="serialNumber" type="text" required="true">
<label>Serial Number</label>
<description>Serial number of the Nobo hub (12 numbers, no spaces)</description>
</parameter>
<parameter name="hostName" type="text" required="true">
<label>Host Name</label>
<description>Host Name/IP address of the Nobo Hub</description>
</parameter>
<parameter name="keepaliveInterval" type="integer" required="false" min="5">
<label>Polling interval</label>
<description>Polling interval (seconds). Default: 14</description>
<default>14</default>
</parameter>
</config-description>
</bridge-type>
</thing:thing-descriptions>

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nobohub"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<thing-type id="zone">
<supported-bridge-type-refs>
<bridge-type-ref id="nobohub"/>
</supported-bridge-type-refs>
<label>Zone</label>
<description>A zone can contain several Nobo devices</description>
<channels>
<channel id="activeWeekProfileName" typeId="activeWeekProfileName-channel-type"/>
<channel id="activeWeekProfile" typeId="activeWeekProfile-channel-type"/>
<channel id="comfortTemperature" typeId="comfort-temperature-channel-type"/>
<channel id="ecoTemperature" typeId="eco-temperature-channel-type"/>
<channel id="currentTemperature" typeId="temperature-channel-type"/>
<channel id="calculatedWeekProfileStatus" typeId="activeOverrideName-channel-type"/>
</channels>
<properties>
<property name="vendor">Glen Dimplex Nobo</property>
</properties>
<representation-property>name</representation-property>
<config-description>
<parameter name="id" type="integer" required="true">
<label>Id</label>
<description>Id of the Zone</description>
</parameter>
</config-description>
</thing-type>
<thing-type id="component">
<supported-bridge-type-refs>
<bridge-type-ref id="nobohub"/>
</supported-bridge-type-refs>
<label>Component</label>
<description>A component is an oven, a switch or a floor thermostat</description>
<channels>
<channel id="currentTemperature" typeId="temperature-channel-type"/>
</channels>
<properties>
<property name="vendor">Glen Dimplex Nobo</property>
</properties>
<representation-property>serialNumber</representation-property>
<config-description>
<parameter name="serialNumber" type="text" required="true">
<label>Serial Number</label>
<description>Serial number of the component (12 digits)</description>
</parameter>
</config-description>
</thing-type>
<channel-type id="activeOverrideName-channel-type">
<item-type>String</item-type>
<label>Active Override</label>
<description>Name of active override, using one of the predefined states supported</description>
<category>Heating</category>
<state readOnly="false">
<options>
<option value="NORMAL">Normal</option>
<option value="COMFORT">Comfort</option>
<option value="ECO">Eco</option>
<option value="Away">Away</option>
</options>
</state>
</channel-type>
<channel-type id="eco-temperature-channel-type">
<item-type>Number:Temperature</item-type>
<label>Eco Temperature</label>
<description>The preferred Eco temperature level set on the heater or in the binding</description>
<category>Temperature</category>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="7" max="30" step="1" pattern="%d °C" readOnly="false"/>
</channel-type>
<channel-type id="comfort-temperature-channel-type">
<item-type>Number:Temperature</item-type>
<label>Comfort Temperature</label>
<description>The preferred Comfort temperature level set on the heater or in the binding</description>
<category>Temperature</category>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="7" max="30" step="1" pattern="%d °C" readOnly="false"/>
</channel-type>
<channel-type id="temperature-channel-type">
<item-type>Number:Temperature</item-type>
<label>Current Temperature</label>
<description>The current temperature from a device that supports reporting temperatures</description>
<category>Temperature</category>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state pattern="%.3f °C" readOnly="true"/>
</channel-type>
<channel-type id="activeWeekProfileName-channel-type">
<item-type>String</item-type>
<label>Active Week Profile Name</label>
<description>Name of the active week profile, set via the Nobo app</description>
<category>Heating</category>
<state readOnly="true"/>
</channel-type>
<channel-type id="activeWeekProfile-channel-type">
<item-type>Number</item-type>
<label>Active Week Profile Id</label>
<description>Id of the active week profile, set via the Nobo app</description>
<category>Heating</category>
<state min="0" readOnly="false"/>
</channel-type>
<channel-type id="weekProfiles-channel-type">
<item-type>String</item-type>
<label>Week Profiles</label>
<description>List of active week profiles, set via the Nobo app</description>
<category>Heating</category>
<state readOnly="true"/>
</channel-type>
</thing:thing-descriptions>