From 808d91b2df9196d2812fcc720917423123b7682d Mon Sep 17 00:00:00 2001 From: John Cocula Date: Wed, 23 Nov 2016 22:14:37 +0000 Subject: [PATCH] Add UPB binding to OH2, Fixes #4811 Signed-off-by: John Cocula --- .../ESH-INF/binding/binding.xml | 30 +++++++++++++++++++ .../configurations/openhab_default.cfg | 16 ++++++++-- features/openhab-addons-external/pom.xml | 1 + .../src/main/resources/conf/upb.cfg | 9 ++++++ .../src/main/feature/feature.xml | 8 +++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 bundles/binding/org.openhab.binding.upb/ESH-INF/binding/binding.xml create mode 100644 features/openhab-addons-external/src/main/resources/conf/upb.cfg diff --git a/bundles/binding/org.openhab.binding.upb/ESH-INF/binding/binding.xml b/bundles/binding/org.openhab.binding.upb/ESH-INF/binding/binding.xml new file mode 100644 index 00000000000..434edc19e2b --- /dev/null +++ b/bundles/binding/org.openhab.binding.upb/ESH-INF/binding/binding.xml @@ -0,0 +1,30 @@ + + + + UPB Binding + The Universal Powerline Bus (UPB) binding reads and writes messages to and from a UPB modem + Chris Van Orman + + org.openhab.upb + + + + + Data refresh interval in milliseconds. + 3600000 + + + + Serial port to which the UPB modem is connected. + true + + + + Every UPB device is assigned a single 8-bit Network ID. + true + + + diff --git a/distribution/openhabhome/configurations/openhab_default.cfg b/distribution/openhabhome/configurations/openhab_default.cfg index 02e342ec488..dba15a70789 100644 --- a/distribution/openhabhome/configurations/openhab_default.cfg +++ b/distribution/openhabhome/configurations/openhab_default.cfg @@ -2571,7 +2571,19 @@ tcp:refreshinterval=250 # # the refresh interval in milliseconds which is used to poll values from the Fatek PLC # (optional, defaults to 60000ms / 60 seconds) -# fatekplc:refresh=60000 +#fatekplc:refresh=60000 # # fatek connection uri, support tcp and udp -# fatekplc:plc1.connectionUri=udp://192.168.1.100?plcId=1 +#fatekplc:plc1.connectionUri=udp://192.168.1.100?plcId=1 + +###################################### UPB Binding ########################################## +# +# The refresh frequency, in milliseconds (optional, defaults to 3600000) +#upb:refresh= +# +# The UPB modem port. Valid values are e.g. COM1 for Windows and /dev/ttyS0 or +# /dev/ttyUSB0 for Linux (required) +#upb:port= +# +# UPB Netword ID (required, must be a value between 0 and 255, inclusive) +#upb:network= diff --git a/features/openhab-addons-external/pom.xml b/features/openhab-addons-external/pom.xml index aacb5dda224..ed80dad02bd 100644 --- a/features/openhab-addons-external/pom.xml +++ b/features/openhab-addons-external/pom.xml @@ -113,6 +113,7 @@ src/main/resources/conf/telegram.cfgcfgtelegram src/main/resources/conf/tinkerforge.cfgcfgtinkerforge src/main/resources/conf/twitter.cfgcfgtwitter + src/main/resources/conf/upb.cfgcfgupb src/main/resources/conf/urtsi.cfgcfgurtsi src/main/resources/conf/weather.cfgcfgweather src/main/resources/conf/xbmc.cfgcfgxbmc diff --git a/features/openhab-addons-external/src/main/resources/conf/upb.cfg b/features/openhab-addons-external/src/main/resources/conf/upb.cfg new file mode 100644 index 00000000000..b7eb3566c2e --- /dev/null +++ b/features/openhab-addons-external/src/main/resources/conf/upb.cfg @@ -0,0 +1,9 @@ +# The refresh frequency, in milliseconds (optional, defaults to 3600000) +#refresh= + +# The UPB modem port. Valid values are e.g. COM1 for Windows and /dev/ttyS0 or +# /dev/ttyUSB0 for Linux (required) +#port= + +# UPB Netword ID (required, must be a value between 0 and 255, inclusive) +#network= diff --git a/features/openhab-addons/src/main/feature/feature.xml b/features/openhab-addons/src/main/feature/feature.xml index 82be571662e..80fd4e69e2a 100644 --- a/features/openhab-addons/src/main/feature/feature.xml +++ b/features/openhab-addons/src/main/feature/feature.xml @@ -598,6 +598,14 @@ mvn:${project.groupId}/openhab-addons-external/${project.version}/cfg/tinkerforge + + openhab-runtime-base + openhab-runtime-compat1x + openhab-transport-serial + mvn:org.openhab.binding/org.openhab.binding.upb/${project.version} + mvn:${project.groupId}/openhab-addons-external/${project.version}/cfg/upb + + openhab-runtime-base openhab-runtime-compat1x