Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-BRIDGE_TYPE |
-"klf200" |
-
-
-public static final java.lang.String |
-CHANNEL_SCENE_ACTION |
-"ACTION" |
-
-
-public static final java.lang.String |
-THING_VELUX_SCENE |
-"scene" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-DEFAULT_IDENTIFY_TIME |
-50 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-SUBSEPARATUR |
-"#" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-BRIDGE_PASSWORD |
-"bridgePassword" |
-
-
-public static final java.lang.String |
-BRIDGE_RETRIES |
-"retries" |
-
-
-public static final java.lang.String |
-BRIDGE_TIMEOUT_MSECS |
-"timeoutMsecs" |
-
-
-public static final java.lang.String |
-BRIDGE_URL |
-"bridgeURL" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-THING_REFRESH_SECS |
-"refreshSecs" |
-
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Each annotation type has its own separate page with the following sections:
-Each enum has its own separate page with the following sections:
-Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-These links take you to the next or previous class, interface, package, or related page.
-These links show and hide the HTML frames. All pages are available with or without frames.
-The All Classes link shows all classes and interfaces except non-static nested types.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-The Constant Field Values page lists the static final fields and their values.
-VeluxBridge
for serializing:
-
- Resulting JSON:
-
-
- {"action":"get","params":{}}
- VeluxBridge
for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "pESIc/9zDWa1CJR6hCDzLw==",
- "result": true,
- "deviceStatus": "IDLE",
- "data": [
- { "name": "Bad",
- "category": "Window opener",
- "id": 0,
- "typeId": 4,
- "subtype": 1,
- "scenes": [
- "V_DG_Window_Mitte_000",
- "V_DG_Window_Mitte_100"
- ]
- },
- ],
- "errors": []
- }
- VeluxBridge
for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"identify","params":{"id":23,"time":254}}
- VeluxBridge
for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "NkR/AA5xXj7iL6NiIW8keA==",
- "result": false,
- "deviceStatus": "IDLE",
- "data": {},
- "errors": [ 104 ]
- }
- VeluxBridge
for serializing:
-
- Resulting JSON:
-
-
- {"action":"login","params":{"password":"PASSWORD"}}
- VeluxBridge
for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- VeluxBridge
for serializing:
-
- Resulting JSON:
-
-
- {"action":"logout","params":{}}
- VeluxBridge
for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- VeluxBridge
for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"run","params":{"id":9}}
- VeluxBridge
for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token":"RHIKGlJyZhidI/JSK0a2RQ==",
- "result":true,
- "deviceStatus":"IDLE",
- "data":{},
- "errors":[]
- }
- VeluxBridge
and parameters
- passed as arguments (see below) and provided by VeluxBridgeConfiguration
.VeluxBridgeHandler
.VeluxHandler
.VeluxBindingConstants
class defines common constants, which are
- used across the whole binding.VeluxBridgeConfiguration
is a wrapper for
- configuration settings needed to access the VeluxBridgeHandler
- device.VeluxBridgeDiscovery
is responsible for handling commands, which are
- sent to one of the channels.VeluxBridgeExecute
is responsible for handling commands, which are
- sent to one of the channels.VeluxBridgeHandler
is responsible for handling of the communication,
- which is sent via the bridge to support the different channels.VeluxBridgeHandlerTester
is a quick approach to verify all functions
- provided by the VeluxBridgeHandler
like querying for scenes and products.VeluxChannel
is responsible for handling commands, which are
- sent via VeluxBridgeHandler
to one of the channels.VeluxHandler
is responsible for handling commands, which are
- sent via VeluxBridgeHandler
to one of the channels.VeluxHandlerFactory
is responsible for creating things and thing
- handlers.VeluxThingConfiguration
is a wrapper for
- configuration settings needed to access the Velux device to be used for method
- VeluxHandler.initialize()
.Velux bridge
.Velux bridge
.VeluxBridge
- for interacting with the Velux bridge
.public class VeluxBindingConstants
-extends java.lang.Object
-VeluxBindingConstants
class defines common constants, which are
- used across the whole binding.Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-BRIDGE_TYPE |
-
static java.lang.String |
-CHANNEL_SCENE_ACTION |
-
static org.eclipse.smarthome.core.thing.ThingTypeUID |
-THING_TYPE_BRIDGE |
-
static org.eclipse.smarthome.core.thing.ThingTypeUID |
-THING_TYPE_VELUX_SCENE |
-
static java.lang.String |
-THING_VELUX_SCENE |
-
Constructor and Description | -
---|
VeluxBindingConstants() |
-
public static final java.lang.String BRIDGE_TYPE-
public static final java.lang.String THING_VELUX_SCENE-
public static final org.eclipse.smarthome.core.thing.ThingTypeUID THING_TYPE_BRIDGE-
public static final org.eclipse.smarthome.core.thing.ThingTypeUID THING_TYPE_VELUX_SCENE-
public static final java.lang.String CHANNEL_SCENE_ACTION-
public class VeluxBridge
-extends java.lang.Object
-
- It provides two methods for interaction,
-
- communicateAuthenticated
and
- communicateUnauthenticated
as well
- as an utility method for customizing the
- behaviour communicationSetup
.
Modifier and Type | -Method and Description | -
---|---|
static <T> T |
-communicateAuthenticated(java.lang.String url,
- java.lang.String authentication,
- java.lang.Object Request,
- java.lang.Class<T> classOfResponse)
-Initializes an authenticated communication with the
-Velux bridge . |
-
static <T> T |
-communicateUnauthenticated(java.lang.String url,
- java.lang.Object Request,
- java.lang.Class<T> classOfResponse)
-Initializes an unauthenticated communication with the
-Velux bridge . |
-
static void |
-communicationSetup(int retries,
- long waitIntervalInMSecs)
-Initializes the communication parameters of
-VeluxBridge
- for interacting with the Velux bridge . |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static <T> T communicateAuthenticated(java.lang.String url, - java.lang.String authentication, - java.lang.Object Request, - java.lang.Class<T> classOfResponse) - throws com.google.gson.JsonSyntaxException, - java.io.IOException-
Velux bridge
.T
- generic response based on classOfResponse.url
- as String describing the Service Access Point location i.e. http://localhost/api .authentication
- as String providing the Authentication token to be passed with the request header.Request
- as Object representing the structure of the message request body to be converted into JSON.classOfResponse
- as Class representing the expected structure of the message response body to be converted from JSON.java.io.IOException
- in case of continuous communication I/O failures.com.google.gson.JsonSyntaxException
- in case of unusual communication failures.public static <T> T communicateUnauthenticated(java.lang.String url, - java.lang.Object Request, - java.lang.Class<T> classOfResponse) - throws com.google.gson.JsonSyntaxException, - java.io.IOException-
Velux bridge
.T
- generic response based on classOfResponse.url
- as String describing the Service Access Point location i.e. http://localhost/api .Request
- as Object representing the structure of the message request body to be converted into JSON.classOfResponse
- as Class representing the expected structure of the message response body to be converted from JSON.java.io.IOException
- in case of continuous communication I/O failures.com.google.gson.JsonSyntaxException
- in case of unusual communication failures.public static void communicationSetup(int retries, - long waitIntervalInMSecs)-
VeluxBridge
- for interacting with the Velux bridge
.retries
- as int defining the number of retries before throwing an I/O error.waitIntervalInMSecs
- as long defining the initial time wait interval in milliseconds for the Binary Exponential Backoff
- (BEB) Algorithm for handling of I/O failures.public static class BCgetProducts.Request
-extends java.lang.Object
-VeluxBridge
for serializing:
- - Resulting JSON: - -
- {"action":"get","params":{}} -
public static class BCgetProducts.Response
-extends java.lang.Object
-VeluxBridge
for deserializing with including component access methods
- - Expected JSON (sample): - -
- { - "token": "pESIc/9zDWa1CJR6hCDzLw==", - "result": true, - "deviceStatus": "IDLE", - "data": [ - { "name": "Bad", - "category": "Window opener", - "id": 0, - "typeId": 4, - "subtype": 1, - "scenes": [ - "V_DG_Window_Mitte_000", - "V_DG_Window_Mitte_100" - ] - }, - ], - "errors": [] - } -
Modifier and Type | -Method and Description | -
---|---|
BCproduct[] |
-getDevices() |
-
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String getToken()-
public boolean getResult()-
public java.lang.String getDeviceStatus()-
public BCproduct[] getDevices()-
public java.lang.String[] getErrors()-
public class BCgetProducts -extends java.lang.Object -implements BridgeCommunicationProtocol<BCgetProducts.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BCgetProducts.Request
-Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"get","params":{}}
- |
-
static class |
-BCgetProducts.Response
-Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "pESIc/9zDWa1CJR6hCDzLw==",
- "result": true,
- "deviceStatus": "IDLE",
- "data": [
- { "name": "Bad",
- "category": "Window opener",
- "id": 0,
- "typeId": 4,
- "subtype": 1,
- "scenes": [
- "V_DG_Window_Mitte_000",
- "V_DG_Window_Mitte_100"
- ]
- },
- ],
- "errors": []
- }
- |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-url |
-
Constructor and Description | -
---|
BCgetProducts() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BCgetProducts.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BCgetProducts.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BCgetProducts.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BCgetProducts.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BCgetProducts.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
public boolean isCommunicationSuccessful(BCgetProducts.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BCgetProducts.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
public java.lang.String getAuthToken(BCgetProducts.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BCgetProducts.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BCgetProducts.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BCgetProducts.Response>
response
- From the bridge returned message to be examined.public static class BCgetScenes.BCproductState
-extends java.lang.Object
-- Therefore it includes the typeId and name identifying the product, as well as actuator and status. -
- Used within structure BCgetScenes.BCscene
to describe the final states of the products belonging to this scene.
Constructor and Description | -
---|
BCproductState() |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getActuator() |
-
java.lang.String |
-getName() |
-
int |
-getStatus() |
-
int |
-getTypeId() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static class BCgetScenes.BCscene
-extends java.lang.Object
-- Therefore it includes the name and id identifying the scene, a flag about silence-mode, as well as the different - states. -
- These states are defined by an array of BCgetScenes.BCproductState
as part of this structure.
Modifier and Type | -Method and Description | -
---|---|
int |
-getId() |
-
java.lang.String |
-getName() |
-
BCgetScenes.BCproductState[] |
-getProductStates() |
-
boolean |
-getSilent() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static class BCgetScenes.Request
-extends java.lang.Object
-public static class BCgetScenes.Response
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
BCgetScenes.BCscene[] |
-getScenes() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String getToken()-
public boolean getResult()-
public java.lang.String getDeviceStatus()-
public BCgetScenes.BCscene[] getScenes()-
public java.lang.String[] getErrors()-
public class BCgetScenes -extends java.lang.Object -implements BridgeCommunicationProtocol<BCgetScenes.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BCgetScenes.BCproductState
-Bridge Communication Structure containing the state of a product.
- |
-
static class |
-BCgetScenes.BCscene
-Bridge Communication Structure containing a scene especially with different states of products.
- |
-
static class |
-BCgetScenes.Request
-Bridge Communication Structure containing a request to be sent to the Velux Bridge.
- |
-
static class |
-BCgetScenes.Response
-Bridge Communication Structure describing a response to be received from the Velux Bridge.
- |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-url |
-
Constructor and Description | -
---|
BCgetScenes() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BCgetScenes.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BCgetScenes.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BCgetScenes.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BCgetScenes.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BCgetScenes.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
public boolean isCommunicationSuccessful(BCgetScenes.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BCgetScenes.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
public java.lang.String getAuthToken(BCgetScenes.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BCgetScenes.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BCgetScenes.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BCgetScenes.Response>
response
- From the bridge returned message to be examined.public static class BCidentifyProduct.Request
-extends java.lang.Object
-VeluxBridge
for serializing:
- - Resulting JSON (sample): - -
- {"action":"identify","params":{"id":23,"time":254}} -
public static class BCidentifyProduct.Response
-extends java.lang.Object
-VeluxBridge
for deserializing with including component access methods
- - Expected JSON (sample): - -
- { - "token": "NkR/AA5xXj7iL6NiIW8keA==", - "result": false, - "deviceStatus": "IDLE", - "data": {}, - "errors": [ 104 ] - } -
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class BCidentifyProduct -extends java.lang.Object -implements BridgeCommunicationProtocol<BCidentifyProduct.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BCidentifyProduct.Request
-Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"identify","params":{"id":23,"time":254}}
- |
-
static class |
-BCidentifyProduct.Response
-Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "NkR/AA5xXj7iL6NiIW8keA==",
- "result": false,
- "deviceStatus": "IDLE",
- "data": {},
- "errors": [ 104 ]
- }
- |
-
Modifier and Type | -Field and Description | -
---|---|
static int |
-DEFAULT_IDENTIFY_TIME |
-
Constructor and Description | -
---|
BCidentifyProduct(int id) |
-
BCidentifyProduct(int id,
- int time) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BCidentifyProduct.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BCidentifyProduct.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BCidentifyProduct.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BCidentifyProduct.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BCidentifyProduct.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int DEFAULT_IDENTIFY_TIME-
public BCidentifyProduct(int id, - int time)-
public BCidentifyProduct(int id)-
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
public boolean isCommunicationSuccessful(BCidentifyProduct.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BCidentifyProduct.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
public java.lang.String getAuthToken(BCidentifyProduct.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BCidentifyProduct.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BCidentifyProduct.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BCidentifyProduct.Response>
response
- From the bridge returned message to be examined.public static class BClogin.Request
-extends java.lang.Object
-VeluxBridge
for serializing:
- - Resulting JSON: - -
- {"action":"login","params":{"password":"PASSWORD"}} -
public static class BClogin.Response
-extends java.lang.Object
-VeluxBridge
for deserializing with including component access methods
- - Expected JSON (sample): - -
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }' -
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class BClogin -extends java.lang.Object -implements BridgeCommunicationProtocol<BClogin.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BClogin.Request
-Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"login","params":{"password":"PASSWORD"}}
- |
-
static class |
-BClogin.Response
-Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-url |
-
Constructor and Description | -
---|
BClogin(java.lang.String pw) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BClogin.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BClogin.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BClogin.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BClogin.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BClogin.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BClogin.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BClogin.Response>
public boolean isCommunicationSuccessful(BClogin.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BClogin.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BClogin.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BClogin.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BClogin.Response>
public java.lang.String getAuthToken(BClogin.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BClogin.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BClogin.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BClogin.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BClogin.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BClogin.Response>
response
- From the bridge returned message to be examined.public static class BClogout.Request
-extends java.lang.Object
-VeluxBridge
for serializing:
- - Resulting JSON: - -
- {"action":"logout","params":{}} -
public static class BClogout.Response
-extends java.lang.Object
-VeluxBridge
for deserializing with including component access methods
- - Expected JSON (sample): - -
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }' -
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class BClogout -extends java.lang.Object -implements BridgeCommunicationProtocol<BClogout.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BClogout.Request
-Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"logout","params":{}}
- |
-
static class |
-BClogout.Response
-Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-url |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BClogout.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BClogout.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BClogout.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BClogout.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BClogout.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BClogout.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BClogout.Response>
public boolean isCommunicationSuccessful(BClogout.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BClogout.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BClogout.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BClogout.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BClogout.Response>
public java.lang.String getAuthToken(BClogout.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BClogout.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BClogout.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BClogout.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BClogout.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BClogout.Response>
response
- From the bridge returned message to be examined.public class BCproduct
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getCategory() |
-
int |
-getId() |
-
java.lang.String |
-getName() |
-
java.lang.String[] |
-getScenes() |
-
int |
-getSubtype() |
-
int |
-getTypeId() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String getName()-
public java.lang.String getCategory()-
public int getId()-
public int getTypeId()-
public int getSubtype()-
public java.lang.String[] getScenes()-
public static class BCrunScene.Request
-extends java.lang.Object
-VeluxBridge
for serializing:
- - Resulting JSON (sample): - -
- {"action":"run","params":{"id":9}} -
public static class BCrunScene.Response
-extends java.lang.Object
-VeluxBridge
for deserializing with including component access methods
- - Expected JSON (sample): - -
- { - "token":"RHIKGlJyZhidI/JSK0a2RQ==", - "result":true, - "deviceStatus":"IDLE", - "data":{}, - "errors":[] - } -
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getDeviceStatus() |
-
java.lang.String[] |
-getErrors() |
-
boolean |
-getResult() |
-
java.lang.String |
-getToken() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class BCrunScene -extends java.lang.Object -implements BridgeCommunicationProtocol<BCrunScene.Response>-
VeluxBridgeHandler
.Modifier and Type | -Class and Description | -
---|---|
static class |
-BCrunScene.Request
-Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"run","params":{"id":9}}
- |
-
static class |
-BCrunScene.Response
-Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token":"RHIKGlJyZhidI/JSK0a2RQ==",
- "result":true,
- "deviceStatus":"IDLE",
- "data":{},
- "errors":[]
- }
- |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-url |
-
Constructor and Description | -
---|
BCrunScene(int id) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(BCrunScene.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<BCrunScene.Response> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(BCrunScene.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(BCrunScene.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(BCrunScene.Response response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.String name()-
BridgeCommunicationProtocol
name
in interface BridgeCommunicationProtocol<BCrunScene.Response>
public java.lang.String getURL()-
BridgeCommunicationProtocol
getURL
in interface BridgeCommunicationProtocol<BCrunScene.Response>
public boolean isCommunicationSuccessful(BCrunScene.Response response)-
BridgeCommunicationProtocol
isCommunicationSuccessful
in interface BridgeCommunicationProtocol<BCrunScene.Response>
response
- From the bridge returned message to be examined.public java.lang.Class<BCrunScene.Response> getClassOfResponse()-
BridgeCommunicationProtocol
getClassOfResponse
in interface BridgeCommunicationProtocol<BCrunScene.Response>
public java.lang.Object getObjectOfRequest()-
BridgeCommunicationProtocol
getObjectOfRequest
in interface BridgeCommunicationProtocol<BCrunScene.Response>
public java.lang.String getAuthToken(BCrunScene.Response response)-
BridgeCommunicationProtocol
getAuthToken
in interface BridgeCommunicationProtocol<BCrunScene.Response>
response
- From the bridge returned message to be examined.public java.lang.String getDeviceStatus(BCrunScene.Response response)-
BridgeCommunicationProtocol
getDeviceStatus
in interface BridgeCommunicationProtocol<BCrunScene.Response>
response
- From the bridge returned message to be examined.public java.lang.String[] getErrors(BCrunScene.Response response)-
BridgeCommunicationProtocol
getErrors
in interface BridgeCommunicationProtocol<BCrunScene.Response>
response
- From the bridge returned message to be examined.public interface BridgeCommunicationProtocol<T>
-VeluxBridgeHandler
.Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAuthToken(T response)
-Returning the communication status included within the response message.
- |
-
java.lang.Class<T> |
-getClassOfResponse()
-Returning the class of the object of response message for further JSON deserialization.
- |
-
java.lang.String |
-getDeviceStatus(T response)
-Returning the communication status included within the response message.
- |
-
java.lang.String[] |
-getErrors(T response)
-Returning the communication status included within the response message.
- |
-
java.lang.Object |
-getObjectOfRequest()
-Returning the request object for further JSON serialization.
- |
-
java.lang.String |
-getURL()
-Returning the URL suffix for accessing the specific service access point.
- |
-
boolean |
-isCommunicationSuccessful(T response)
-Returning the communication status included within the response message.
- |
-
java.lang.String |
-name()
-Returning a description of this communication pair.
- |
-
java.lang.String name()-
java.lang.String getURL()-
java.lang.Object getObjectOfRequest()-
java.lang.Class<T> getClassOfResponse()-
boolean isCommunicationSuccessful(T response)-
response
- From the bridge returned message to be examined.java.lang.String getAuthToken(T response)-
response
- From the bridge returned message to be examined.java.lang.String getDeviceStatus(T response)-
response
- From the bridge returned message to be examined.java.lang.String[] getErrors(T response)-
response
- From the bridge returned message to be examined.Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BCgetProducts.Response> |
-BCgetProducts.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BCgetProducts.getAuthToken(BCgetProducts.Response response) |
-
java.lang.String |
-BCgetProducts.getDeviceStatus(BCgetProducts.Response response) |
-
java.lang.String[] |
-BCgetProducts.getErrors(BCgetProducts.Response response) |
-
boolean |
-BCgetProducts.isCommunicationSuccessful(BCgetProducts.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
BCgetScenes.BCproductState[] |
-BCgetScenes.BCscene.getProductStates() |
-
Constructor and Description | -
---|
VeluxProductReference(BCgetScenes.BCproductState productState) |
-
VeluxProductState(BCgetScenes.BCproductState productState) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
BCgetScenes.BCscene[] |
-BCgetScenes.Response.getScenes() |
-
Constructor and Description | -
---|
VeluxScene(BCgetScenes.BCscene sceneDescr) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BCgetScenes.Response> |
-BCgetScenes.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BCgetScenes.getAuthToken(BCgetScenes.Response response) |
-
java.lang.String |
-BCgetScenes.getDeviceStatus(BCgetScenes.Response response) |
-
java.lang.String[] |
-BCgetScenes.getErrors(BCgetScenes.Response response) |
-
boolean |
-BCgetScenes.isCommunicationSuccessful(BCgetScenes.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BCidentifyProduct.Response> |
-BCidentifyProduct.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BCidentifyProduct.getAuthToken(BCidentifyProduct.Response response) |
-
java.lang.String |
-BCidentifyProduct.getDeviceStatus(BCidentifyProduct.Response response) |
-
java.lang.String[] |
-BCidentifyProduct.getErrors(BCidentifyProduct.Response response) |
-
boolean |
-BCidentifyProduct.isCommunicationSuccessful(BCidentifyProduct.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BClogin.Response> |
-BClogin.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BClogin.getAuthToken(BClogin.Response response) |
-
java.lang.String |
-BClogin.getDeviceStatus(BClogin.Response response) |
-
java.lang.String[] |
-BClogin.getErrors(BClogin.Response response) |
-
boolean |
-BClogin.isCommunicationSuccessful(BClogin.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BClogout.Response> |
-BClogout.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BClogout.getAuthToken(BClogout.Response response) |
-
java.lang.String |
-BClogout.getDeviceStatus(BClogout.Response response) |
-
java.lang.String[] |
-BClogout.getErrors(BClogout.Response response) |
-
boolean |
-BClogout.isCommunicationSuccessful(BClogout.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
BCproduct[] |
-BCgetProducts.Response.getDevices() |
-
Constructor and Description | -
---|
VeluxProduct(BCproduct productDescr) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
Modifier and Type | -Method and Description | -
---|---|
java.lang.Class<BCrunScene.Response> |
-BCrunScene.getClassOfResponse() |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-BCrunScene.getAuthToken(BCrunScene.Response response) |
-
java.lang.String |
-BCrunScene.getDeviceStatus(BCrunScene.Response response) |
-
java.lang.String[] |
-BCrunScene.getErrors(BCrunScene.Response response) |
-
boolean |
-BCrunScene.isCommunicationSuccessful(BCrunScene.Response response) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Class and Description | -
---|---|
class |
-BCgetProducts
-I/O messages supported by the Velux bridge.
- |
-
class |
-BCgetScenes
-I/O messages supported by the Velux bridge.
- |
-
class |
-BCidentifyProduct
-I/O messages supported by the Velux bridge.
- |
-
class |
-BClogin
-I/O messages supported by the Velux bridge.
- |
-
class |
-BClogout
-I/O messages supported by the Velux bridge.
- |
-
class |
-BCrunScene
-I/O messages supported by the Velux bridge.
- |
-
Modifier and Type | -Method and Description | -
---|---|
<T> T |
-VeluxBridgeHandler.bridgeCommunicate(BridgeCommunicationProtocol<T> communication)
-Initializes a client/server communication towards Velux bridge
- based on the Basic I/O interface
-VeluxBridge and parameters
- passed as arguments (see below) and provided by VeluxBridgeConfiguration . |
-
Interface | -Description | -
---|---|
BridgeCommunicationProtocol<T> | -
- I/O messages supported by the Velux bridge.
- |
-
Class | -Description | -
---|---|
BCgetProducts | -
- I/O messages supported by the Velux bridge.
- |
-
BCgetProducts.Request | -
- Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"get","params":{}}
- |
-
BCgetProducts.Response | -
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "pESIc/9zDWa1CJR6hCDzLw==",
- "result": true,
- "deviceStatus": "IDLE",
- "data": [
- { "name": "Bad",
- "category": "Window opener",
- "id": 0,
- "typeId": 4,
- "subtype": 1,
- "scenes": [
- "V_DG_Window_Mitte_000",
- "V_DG_Window_Mitte_100"
- ]
- },
- ],
- "errors": []
- }
- |
-
BCgetScenes | -
- I/O messages supported by the Velux bridge.
- |
-
BCgetScenes.BCproductState | -
- Bridge Communication Structure containing the state of a product.
- |
-
BCgetScenes.BCscene | -
- Bridge Communication Structure containing a scene especially with different states of products.
- |
-
BCgetScenes.Request | -
- Bridge Communication Structure containing a request to be sent to the Velux Bridge.
- |
-
BCgetScenes.Response | -
- Bridge Communication Structure describing a response to be received from the Velux Bridge.
- |
-
BCidentifyProduct | -
- I/O messages supported by the Velux bridge.
- |
-
BCidentifyProduct.Request | -
- Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"identify","params":{"id":23,"time":254}}
- |
-
BCidentifyProduct.Response | -
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "NkR/AA5xXj7iL6NiIW8keA==",
- "result": false,
- "deviceStatus": "IDLE",
- "data": {},
- "errors": [ 104 ]
- }
- |
-
BClogin | -
- I/O messages supported by the Velux bridge.
- |
-
BClogin.Request | -
- Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"login","params":{"password":"PASSWORD"}}
- |
-
BClogin.Response | -
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
BClogout | -
- I/O messages supported by the Velux bridge.
- |
-
BClogout.Request | -
- Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON:
-
-
- {"action":"logout","params":{}}
- |
-
BClogout.Response | -
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
BCproduct | -
- Bridge Communication classes.
- |
-
BCrunScene | -
- I/O messages supported by the Velux bridge.
- |
-
BCrunScene.Request | -
- Bridge I/O Request message used by
-VeluxBridge for serializing:
-
- Resulting JSON (sample):
-
-
- {"action":"run","params":{"id":9}}
- |
-
BCrunScene.Response | -
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token":"RHIKGlJyZhidI/JSK0a2RQ==",
- "result":true,
- "deviceStatus":"IDLE",
- "data":{},
- "errors":[]
- }
- |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.handler | -- |
org.openhab.binding.velux.things | -- |
Class and Description | -
---|
BCgetProducts.Response
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "pESIc/9zDWa1CJR6hCDzLw==",
- "result": true,
- "deviceStatus": "IDLE",
- "data": [
- { "name": "Bad",
- "category": "Window opener",
- "id": 0,
- "typeId": 4,
- "subtype": 1,
- "scenes": [
- "V_DG_Window_Mitte_000",
- "V_DG_Window_Mitte_100"
- ]
- },
- ],
- "errors": []
- }
- |
-
BCgetScenes.BCproductState
- Bridge Communication Structure containing the state of a product.
- |
-
BCgetScenes.BCscene
- Bridge Communication Structure containing a scene especially with different states of products.
- |
-
BCgetScenes.Response
- Bridge Communication Structure describing a response to be received from the Velux Bridge.
- |
-
BCidentifyProduct.Response
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token": "NkR/AA5xXj7iL6NiIW8keA==",
- "result": false,
- "deviceStatus": "IDLE",
- "data": {},
- "errors": [ 104 ]
- }
- |
-
BClogin.Response
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
BClogout.Response
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- '{"token": "PHPnfLda71xfGlxoYEOTGQ==", "result": true, "deviceStatus": "IDLE", "data": {}, "errors": [] }'
- |
-
BCproduct
- Bridge Communication classes.
- |
-
BCrunScene.Response
- Bridge I/O Response message used by
-VeluxBridge for deserializing with including component access methods
-
- Expected JSON (sample):
-
-
- {
- "token":"RHIKGlJyZhidI/JSK0a2RQ==",
- "result":true,
- "deviceStatus":"IDLE",
- "data":{},
- "errors":[]
- }
- |
-
BridgeCommunicationProtocol
- I/O messages supported by the Velux bridge.
- |
-
Class and Description | -
---|
BridgeCommunicationProtocol
- I/O messages supported by the Velux bridge.
- |
-
Class and Description | -
---|
BCgetScenes.BCproductState
- Bridge Communication Structure containing the state of a product.
- |
-
BCgetScenes.BCscene
- Bridge Communication Structure containing a scene especially with different states of products.
- |
-
BCproduct
- Bridge Communication classes.
- |
-
Class | -Description | -
---|---|
VeluxBridge | -
- Basic I/O interface towards the Velux bridge.
- |
-
public class VeluxBridgeDiscovery
-extends java.lang.Object
-VeluxBridgeDiscovery
is responsible for handling commands, which are
- sent to one of the channels.Constructor and Description | -
---|
VeluxBridgeDiscovery(VeluxBridgeHandler bridge) |
-
public VeluxBridgeDiscovery(VeluxBridgeHandler bridge)-
public class VeluxBridgeExecute
-extends java.lang.Object
-VeluxBridgeExecute
is responsible for handling commands, which are
- sent to one of the channels.Constructor and Description | -
---|
VeluxBridgeExecute() |
-
Modifier and Type | -Method and Description | -
---|---|
static boolean |
-execute(VeluxBridgeHandler bridge,
- int sceneNo) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean execute(VeluxBridgeHandler bridge, - int sceneNo)-
public class VeluxBridgeHandler
-extends org.eclipse.smarthome.core.thing.binding.BaseBridgeHandler
-VeluxBridgeHandler
is responsible for handling of the communication,
- which is sent via the bridge to support the different channels.
-
- Besides the usual BaseBridgeHandler
methods, it provides three methods
- for interaction,
-
bridgeLogin()
for initiation of an authentication,
- bridgeLogout()
for closing of an authentication, and
- bridgeCommunicate(org.openhab.binding.velux.bridge.comm.BridgeCommunicationProtocol<T>)
for communication in between.
- VeluxBridgeConfiguration
.Modifier and Type | -Field and Description | -
---|---|
VeluxBridgeDiscovery |
-discovery
-Bridge Discovery.
- |
-
VeluxExistingProducts |
-existingsProducts |
-
VeluxExistingScenes |
-existingsScenes |
-
static java.util.Set<org.eclipse.smarthome.core.thing.ThingTypeUID> |
-SUPPORTED_THING_TYPES
-Set of things provided by
-VeluxBridgeHandler . |
-
bundleContext, linkRegistry, scheduler, thing, thingRegistry
Constructor and Description | -
---|
VeluxBridgeHandler(org.eclipse.smarthome.core.thing.Bridge bridge) |
-
Modifier and Type | -Method and Description | -
---|---|
<T> T |
-bridgeCommunicate(BridgeCommunicationProtocol<T> communication)
-Initializes a client/server communication towards Velux bridge
- based on the Basic I/O interface
-VeluxBridge and parameters
- passed as arguments (see below) and provided by VeluxBridgeConfiguration . |
-
boolean |
-bridgeLogin()
-Prepares an authorization request and communicate it with the Velux bridge.
- |
-
boolean |
-bridgeLogout()
-Prepares an (authenticated!)
- |
-
void |
-childHandlerDisposed(org.eclipse.smarthome.core.thing.binding.ThingHandler childHandler,
- org.eclipse.smarthome.core.thing.Thing childThing) |
-
void |
-childHandlerInitialized(org.eclipse.smarthome.core.thing.binding.ThingHandler childHandler,
- org.eclipse.smarthome.core.thing.Thing childThing) |
-
void |
-dispose() |
-
void |
-handleCommand(org.eclipse.smarthome.core.thing.ChannelUID channelUID,
- org.eclipse.smarthome.core.types.Command command) |
-
void |
-initialize() |
-
editThing, getThing, getThingByUID
bridgeStatusChanged, changeThingType, channelLinked, channelUnlinked, editConfiguration, editProperties, getBridge, getConfig, getConfigAs, handleConfigurationUpdate, handleRemoval, handleUpdate, isInitialized, isLinked, postCommand, postCommand, setBundleContext, setCallback, thingUpdated, triggerChannel, triggerChannel, triggerChannel, triggerChannel, unsetBundleContext, updateConfiguration, updateProperties, updateProperty, updateState, updateState, updateStatus, updateStatus, updateStatus, updateThing, validateConfigurationParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bridgeStatusChanged, channelLinked, channelUnlinked, handleConfigurationUpdate, handleRemoval, handleUpdate, setCallback, thingUpdated
public static final java.util.Set<org.eclipse.smarthome.core.thing.ThingTypeUID> SUPPORTED_THING_TYPES-
VeluxBridgeHandler
.public VeluxBridgeDiscovery discovery-
public VeluxExistingProducts existingsProducts-
public VeluxExistingScenes existingsScenes-
public VeluxBridgeHandler(org.eclipse.smarthome.core.thing.Bridge bridge)-
public void initialize()-
initialize
in interface org.eclipse.smarthome.core.thing.binding.ThingHandler
initialize
in class org.eclipse.smarthome.core.thing.binding.BaseThingHandler
public void dispose()-
dispose
in interface org.eclipse.smarthome.core.thing.binding.ThingHandler
dispose
in class org.eclipse.smarthome.core.thing.binding.BaseThingHandler
public void handleCommand(org.eclipse.smarthome.core.thing.ChannelUID channelUID, - org.eclipse.smarthome.core.types.Command command)-
public void childHandlerInitialized(org.eclipse.smarthome.core.thing.binding.ThingHandler childHandler, - org.eclipse.smarthome.core.thing.Thing childThing)-
childHandlerInitialized
in interface org.eclipse.smarthome.core.thing.binding.BridgeHandler
childHandlerInitialized
in class org.eclipse.smarthome.core.thing.binding.BaseBridgeHandler
public void childHandlerDisposed(org.eclipse.smarthome.core.thing.binding.ThingHandler childHandler, - org.eclipse.smarthome.core.thing.Thing childThing)-
childHandlerDisposed
in interface org.eclipse.smarthome.core.thing.binding.BridgeHandler
childHandlerDisposed
in class org.eclipse.smarthome.core.thing.binding.BaseBridgeHandler
public boolean bridgeLogin()-
bridgeLogout()
public boolean bridgeLogout()-
bridgeLogin()
.public <T> T bridgeCommunicate(BridgeCommunicationProtocol<T> communication)-
VeluxBridge
and parameters
- passed as arguments (see below) and provided by VeluxBridgeConfiguration
.T
- generic response based on details within communication.communication
- Structure of interface type BridgeCommunicationProtocol
describing the intended communication,
- that is request and response interactions as well as appropriate URL definition.public class VeluxBridgeHandlerTester
-extends java.lang.Object
-VeluxBridgeHandlerTester
is a quick approach to verify all functions
- provided by the VeluxBridgeHandler
like querying for scenes and products.Constructor and Description | -
---|
VeluxBridgeHandlerTester() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-execute(VeluxBridgeHandler bridge) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public VeluxBridgeHandlerTester()-
public void execute(VeluxBridgeHandler bridge)-
public static enum VeluxChannel.Channel -extends java.lang.Enum<VeluxChannel.Channel>-
Modifier and Type | -Method and Description | -
---|---|
int |
-getPosition() |
-
static VeluxChannel.Channel |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static VeluxChannel.Channel[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final VeluxChannel.Channel ACTION-
public static VeluxChannel.Channel[] values()-
-for (VeluxChannel.Channel c : VeluxChannel.Channel.values()) - System.out.println(c); -
public static VeluxChannel.Channel valueOf(java.lang.String name)-
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getPosition()-
public class VeluxChannel
-extends java.lang.Object
-VeluxChannel
is responsible for handling commands, which are
- sent via VeluxBridgeHandler
to one of the channels.Modifier and Type | -Class and Description | -
---|---|
static class |
-VeluxChannel.Channel |
-
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-SUBSEPARATUR |
-
Constructor and Description | -
---|
VeluxChannel() |
-
Modifier and Type | -Method and Description | -
---|---|
static java.lang.String |
-getChannelId(java.lang.String getId) |
-
static java.lang.String |
-getChannelSubId(java.lang.String getId) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String SUBSEPARATUR-
public class VeluxHandler
-extends org.eclipse.smarthome.core.thing.binding.BaseThingHandler
-VeluxHandler
is responsible for handling commands, which are
- sent via VeluxBridgeHandler
to one of the channels.Modifier and Type | -Field and Description | -
---|---|
static java.util.Set<org.eclipse.smarthome.core.thing.ThingTypeUID> |
-SUPPORTED_THING_TYPES_UIDS
-Set of things provided by
-VeluxHandler . |
-
bundleContext, linkRegistry, scheduler, thing, thingRegistry
Constructor and Description | -
---|
VeluxHandler(org.eclipse.smarthome.core.thing.Thing thing) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-dispose() |
-
org.eclipse.smarthome.core.types.State |
-getChannelValue(java.lang.String channelString) |
-
org.eclipse.smarthome.core.types.State |
-getChannelValue(VeluxChannel.Channel item) |
-
void |
-handleCommand(org.eclipse.smarthome.core.thing.ChannelUID channelUID,
- org.eclipse.smarthome.core.types.Command command) |
-
void |
-initialize() |
-
bridgeStatusChanged, changeThingType, channelLinked, channelUnlinked, editConfiguration, editProperties, editThing, getBridge, getConfig, getConfigAs, getThing, handleConfigurationUpdate, handleRemoval, handleUpdate, isInitialized, isLinked, postCommand, postCommand, setBundleContext, setCallback, thingUpdated, triggerChannel, triggerChannel, triggerChannel, triggerChannel, unsetBundleContext, updateConfiguration, updateProperties, updateProperty, updateState, updateState, updateStatus, updateStatus, updateStatus, updateThing, validateConfigurationParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.util.Set<org.eclipse.smarthome.core.thing.ThingTypeUID> SUPPORTED_THING_TYPES_UIDS-
VeluxHandler
.public VeluxHandler(org.eclipse.smarthome.core.thing.Thing thing)-
public void initialize()-
initialize
in interface org.eclipse.smarthome.core.thing.binding.ThingHandler
initialize
in class org.eclipse.smarthome.core.thing.binding.BaseThingHandler
public void dispose()-
dispose
in interface org.eclipse.smarthome.core.thing.binding.ThingHandler
dispose
in class org.eclipse.smarthome.core.thing.binding.BaseThingHandler
public org.eclipse.smarthome.core.types.State getChannelValue(VeluxChannel.Channel item)-
public org.eclipse.smarthome.core.types.State getChannelValue(java.lang.String channelString)-
public void handleCommand(org.eclipse.smarthome.core.thing.ChannelUID channelUID, - org.eclipse.smarthome.core.types.Command command)-
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Field and Description | -
---|---|
VeluxBridgeDiscovery |
-VeluxBridgeHandler.discovery
-Bridge Discovery.
- |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Method and Description | -
---|---|
void |
-VeluxBridgeHandlerTester.execute(VeluxBridgeHandler bridge) |
-
static boolean |
-VeluxBridgeExecute.execute(VeluxBridgeHandler bridge,
- int sceneNo) |
-
Constructor and Description | -
---|
VeluxBridgeDiscovery(VeluxBridgeHandler bridge) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Method and Description | -
---|---|
static VeluxChannel.Channel |
-VeluxChannel.Channel.valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static VeluxChannel.Channel[] |
-VeluxChannel.Channel.values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
Modifier and Type | -Method and Description | -
---|---|
org.eclipse.smarthome.core.types.State |
-VeluxHandler.getChannelValue(VeluxChannel.Channel item) |
-
Class | -Description | -
---|---|
VeluxBridgeDiscovery | -
- The
-VeluxBridgeDiscovery is responsible for handling commands, which are
- sent to one of the channels. |
-
VeluxBridgeExecute | -
- The
-VeluxBridgeExecute is responsible for handling commands, which are
- sent to one of the channels. |
-
VeluxBridgeHandler | -
- The
-VeluxBridgeHandler is responsible for handling of the communication,
- which is sent via the bridge to support the different channels. |
-
VeluxBridgeHandlerTester | -
- The
-VeluxBridgeHandlerTester is a quick approach to verify all functions
- provided by the VeluxBridgeHandler like querying for scenes and products. |
-
VeluxChannel | -
- The
-VeluxChannel is responsible for handling commands, which are
- sent via VeluxBridgeHandler to one of the channels. |
-
VeluxHandler | -
- The
-VeluxHandler is responsible for handling commands, which are
- sent via VeluxBridgeHandler to one of the channels. |
-
Enum | -Description | -
---|---|
VeluxChannel.Channel | -- |
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Class and Description | -
---|
VeluxBridgeDiscovery
- The
-VeluxBridgeDiscovery is responsible for handling commands, which are
- sent to one of the channels. |
-
VeluxBridgeHandler
- The
-VeluxBridgeHandler is responsible for handling of the communication,
- which is sent via the bridge to support the different channels. |
-
VeluxChannel.Channel | -
public class VeluxHandlerFactory
-extends org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory
-VeluxHandlerFactory
is responsible for creating things and thing
- handlers.bundleContext
Constructor and Description | -
---|
VeluxHandlerFactory() |
-
Modifier and Type | -Method and Description | -
---|---|
protected org.eclipse.smarthome.core.thing.binding.ThingHandler |
-createHandler(org.eclipse.smarthome.core.thing.Thing thing) |
-
boolean |
-supportsThingType(org.eclipse.smarthome.core.thing.ThingTypeUID thingTypeUID) |
-
activate, createThing, createThing, deactivate, getConfigDescriptionRegistry, getThingTypeByUID, registerHandler, removeHandler, removeThing, unregisterHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean supportsThingType(org.eclipse.smarthome.core.thing.ThingTypeUID thingTypeUID)-
protected org.eclipse.smarthome.core.thing.binding.ThingHandler createHandler(org.eclipse.smarthome.core.thing.Thing thing)-
createHandler
in class org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory
public class VeluxBridgeConfiguration
-extends org.eclipse.smarthome.config.core.Configuration
-VeluxBridgeConfiguration
is a wrapper for
- configuration settings needed to access the VeluxBridgeHandler
- device.
- - It contains the factory default values as well. -
Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-BRIDGE_PASSWORD |
-
static java.lang.String |
-BRIDGE_RETRIES |
-
static java.lang.String |
-BRIDGE_TIMEOUT_MSECS |
-
static java.lang.String |
-BRIDGE_URL |
-
java.lang.String |
-bridgePassword |
-
java.lang.String |
-bridgeURL |
-
int |
-retries |
-
int |
-timeoutMsecs |
-
Constructor and Description | -
---|
VeluxBridgeConfiguration()
-Default values - should not be modified
- |
-
as, containsKey, equals, get, get, getProperties, hashCode, keySet, put, remove, remove, setProperties, toString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String BRIDGE_URL-
public static final java.lang.String BRIDGE_PASSWORD-
public static final java.lang.String BRIDGE_TIMEOUT_MSECS-
public static final java.lang.String BRIDGE_RETRIES-
public java.lang.String bridgeURL-
public java.lang.String bridgePassword-
public int timeoutMsecs-
public int retries-
public class VeluxThingConfiguration
-extends org.eclipse.smarthome.config.core.Configuration
-VeluxThingConfiguration
is a wrapper for
- configuration settings needed to access the Velux device to be used for method
- VeluxHandler.initialize()
.
- - It contains the factory default values as well. -
Modifier and Type | -Field and Description | -
---|---|
int |
-refreshSecs |
-
static java.lang.String |
-THING_REFRESH_SECS |
-
Constructor and Description | -
---|
VeluxThingConfiguration()
-Default values - should not be modified
- |
-
as, containsKey, equals, get, get, getProperties, hashCode, keySet, put, remove, remove, setProperties, toString, values
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String THING_REFRESH_SECS-
public int refreshSecs-
Class | -Description | -
---|---|
VeluxBridgeConfiguration | -
- The
-VeluxBridgeConfiguration is a wrapper for
- configuration settings needed to access the VeluxBridgeHandler
- device. |
-
VeluxThingConfiguration | -
- The
-VeluxThingConfiguration is a wrapper for
- configuration settings needed to access the Velux device to be used for method
- VeluxHandler.initialize() . |
-
Class | -Description | -
---|---|
VeluxHandlerFactory | -
- The
-VeluxHandlerFactory is responsible for creating things and thing
- handlers. |
-
Class | -Description | -
---|---|
VeluxBindingConstants | -
- The
-VeluxBindingConstants class defines common constants, which are
- used across the whole binding. |
-
public class VeluxExistingProducts
-extends java.lang.Object
-VeluxProduct
Constructor and Description | -
---|
VeluxExistingProducts() |
-
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct |
-get(java.lang.String productUniqueIndex) |
-
int |
-getNoMembers() |
-
boolean |
-isRegistered(java.lang.String productUniqueIndex) |
-
boolean |
-isRegistered(VeluxProduct product) |
-
boolean |
-register(VeluxProduct newProduct) |
-
java.lang.String |
-toString() |
-
VeluxProduct[] |
-values() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean isRegistered(java.lang.String productUniqueIndex)-
public boolean isRegistered(VeluxProduct product)-
public boolean register(VeluxProduct newProduct)-
public VeluxProduct get(java.lang.String productUniqueIndex)-
public VeluxProduct[] values()-
public int getNoMembers()-
public java.lang.String toString()-
toString
in class java.lang.Object
public class VeluxExistingScenes
-extends java.lang.Object
-VeluxScene
Constructor and Description | -
---|
VeluxExistingScenes() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-dummyTest() |
-
void |
-dummyTest2(VeluxScene.SceneName sceneName) |
-
VeluxScene |
-get(VeluxScene.SceneName sceneName) |
-
int |
-getNoMembers() |
-
boolean |
-isRegistered(VeluxScene.SceneName sceneName) |
-
boolean |
-isRegistered(VeluxScene scene) |
-
boolean |
-register(VeluxScene newScene) |
-
java.lang.String |
-toString() |
-
VeluxScene[] |
-values() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean isRegistered(VeluxScene.SceneName sceneName)-
public boolean isRegistered(VeluxScene scene)-
public boolean register(VeluxScene newScene)-
public VeluxScene get(VeluxScene.SceneName sceneName)-
public VeluxScene[] values()-
public int getNoMembers()-
public void dummyTest()-
public void dummyTest2(VeluxScene.SceneName sceneName)-
public java.lang.String toString()-
toString
in class java.lang.Object
public static class VeluxProduct.ProductBridgeIndex
-extends java.lang.Object
-public static class VeluxProduct.ProductName
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static enum VeluxProduct.ProductTypeId -extends java.lang.Enum<VeluxProduct.ProductTypeId>-
Enum Constant and Description | -
---|
ROLLER_SHUTTER |
-
UNDEFTYPE |
-
WINDOW_OPENER |
-
Modifier and Type | -Method and Description | -
---|---|
static VeluxProduct.ProductTypeId |
-get(int typeId) |
-
int |
-getSubtype() |
-
int |
-getTypeId() |
-
static VeluxProduct.ProductTypeId |
-valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static VeluxProduct.ProductTypeId[] |
-values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final VeluxProduct.ProductTypeId ROLLER_SHUTTER-
public static final VeluxProduct.ProductTypeId WINDOW_OPENER-
public static final VeluxProduct.ProductTypeId UNDEFTYPE-
public static VeluxProduct.ProductTypeId[] values()-
-for (VeluxProduct.ProductTypeId c : VeluxProduct.ProductTypeId.values()) - System.out.println(c); -
public static VeluxProduct.ProductTypeId valueOf(java.lang.String name)-
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getTypeId()-
public int getSubtype()-
public static VeluxProduct.ProductTypeId get(int typeId)-
public class VeluxProduct
-extends java.lang.Object
-- Combined set of information describing a single Velux product.
Modifier and Type | -Class and Description | -
---|---|
static class |
-VeluxProduct.ProductBridgeIndex |
-
static class |
-VeluxProduct.ProductName |
-
static class |
-VeluxProduct.ProductTypeId |
-
Constructor and Description | -
---|
VeluxProduct(BCproduct productDescr) |
-
VeluxProduct(VeluxProduct product) |
-
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct.ProductBridgeIndex |
-getBridgeProductIndex() |
-
VeluxProduct.ProductName |
-getName() |
-
java.lang.String |
-getProductUniqueIndex() |
-
VeluxProduct.ProductTypeId |
-getTypeId() |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public VeluxProduct(VeluxProduct product)-
public VeluxProduct(BCproduct productDescr)-
public VeluxProduct.ProductName getName()-
public VeluxProduct.ProductTypeId getTypeId()-
public VeluxProduct.ProductBridgeIndex getBridgeProductIndex()-
public java.lang.String toString()-
toString
in class java.lang.Object
public java.lang.String getProductUniqueIndex()-
public class VeluxProductReference
-extends java.lang.Object
-- Combined set of information with reference towards a single Velux product.
VeluxProduct
Constructor and Description | -
---|
VeluxProductReference(BCgetScenes.BCproductState productState) |
-
VeluxProductReference(VeluxProduct product) |
-
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct.ProductName |
-getName() |
-
java.lang.String |
-getProductUniqueIndex() |
-
VeluxProduct.ProductTypeId |
-getTypeId() |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public VeluxProductReference(BCgetScenes.BCproductState productState)-
public VeluxProductReference(VeluxProduct product)-
public VeluxProduct.ProductName getName()-
public VeluxProduct.ProductTypeId getTypeId()-
public java.lang.String toString()-
toString
in class java.lang.Object
public java.lang.String getProductUniqueIndex()-
public class VeluxProductState.ProductState
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
int |
-getState() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class VeluxProductState
-extends java.lang.Object
-- Combined set of information which describes a current state of a single Velux product.
VeluxProduct
Modifier and Type | -Class and Description | -
---|---|
class |
-VeluxProductState.ProductState |
-
Constructor and Description | -
---|
VeluxProductState(BCgetScenes.BCproductState productState) |
-
VeluxProductState(VeluxProductReference productReference,
- int actuator,
- int state) |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getActuator() |
-
VeluxProductReference |
-getProductReference() |
-
VeluxProductState.ProductState |
-getState() |
-
int |
-getStateAsInt() |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public VeluxProductState(VeluxProductReference productReference, - int actuator, - int state)-
public VeluxProductState(BCgetScenes.BCproductState productState)-
public VeluxProductReference getProductReference()-
public int getActuator()-
public VeluxProductState.ProductState getState()-
public int getStateAsInt()-
public java.lang.String toString()-
toString
in class java.lang.Object
public static class VeluxScene.SceneBridgeIndex
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
int |
-toInt() |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static class VeluxScene.SceneName
-extends java.lang.Object
-Constructor and Description | -
---|
SceneName(java.lang.String name) |
-
Modifier and Type | -Method and Description | -
---|---|
boolean |
-equals(VeluxScene.SceneName anotherName) |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public java.lang.String toString()-
toString
in class java.lang.Object
public boolean equals(VeluxScene.SceneName anotherName)-
public class VeluxScene
-extends java.lang.Object
-- Combined set of information with references towards multiple Velux product states.
VeluxProductState
Modifier and Type | -Class and Description | -
---|---|
static class |
-VeluxScene.SceneBridgeIndex |
-
static class |
-VeluxScene.SceneName |
-
Constructor and Description | -
---|
VeluxScene(BCgetScenes.BCscene sceneDescr) |
-
VeluxScene(java.lang.String name,
- int sceneBridgeIndex,
- boolean silentOperation,
- VeluxProductState[] actions) |
-
Modifier and Type | -Method and Description | -
---|---|
VeluxScene.SceneBridgeIndex |
-getBridgeSceneIndex() |
-
VeluxScene.SceneName |
-getName() |
-
java.lang.String |
-toString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public VeluxScene(BCgetScenes.BCscene sceneDescr)-
public VeluxScene(java.lang.String name, - int sceneBridgeIndex, - boolean silentOperation, - VeluxProductState[] actions)-
public VeluxScene.SceneName getName()-
public VeluxScene.SceneBridgeIndex getBridgeSceneIndex()-
public java.lang.String toString()-
toString
in class java.lang.Object
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Field and Description | -
---|---|
VeluxExistingProducts |
-VeluxBridgeHandler.existingsProducts |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
Modifier and Type | -Field and Description | -
---|---|
VeluxExistingScenes |
-VeluxBridgeHandler.existingsScenes |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct.ProductBridgeIndex |
-VeluxProduct.getBridgeProductIndex() |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct.ProductName |
-VeluxProductReference.getName() |
-
VeluxProduct.ProductName |
-VeluxProduct.getName() |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
static VeluxProduct.ProductTypeId |
-VeluxProduct.ProductTypeId.get(int typeId) |
-
VeluxProduct.ProductTypeId |
-VeluxProductReference.getTypeId() |
-
VeluxProduct.ProductTypeId |
-VeluxProduct.getTypeId() |
-
static VeluxProduct.ProductTypeId |
-VeluxProduct.ProductTypeId.valueOf(java.lang.String name)
-Returns the enum constant of this type with the specified name.
- |
-
static VeluxProduct.ProductTypeId[] |
-VeluxProduct.ProductTypeId.values()
-Returns an array containing the constants of this enum type, in
-the order they are declared.
- |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxProduct |
-VeluxExistingProducts.get(java.lang.String productUniqueIndex) |
-
VeluxProduct[] |
-VeluxExistingProducts.values() |
-
Modifier and Type | -Method and Description | -
---|---|
boolean |
-VeluxExistingProducts.isRegistered(VeluxProduct product) |
-
boolean |
-VeluxExistingProducts.register(VeluxProduct newProduct) |
-
Constructor and Description | -
---|
VeluxProduct(VeluxProduct product) |
-
VeluxProductReference(VeluxProduct product) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxProductReference |
-VeluxProductState.getProductReference() |
-
Constructor and Description | -
---|
VeluxProductState(VeluxProductReference productReference,
- int actuator,
- int state) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxProductState.ProductState |
-VeluxProductState.getState() |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Constructor and Description | -
---|
VeluxScene(java.lang.String name,
- int sceneBridgeIndex,
- boolean silentOperation,
- VeluxProductState[] actions) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxScene.SceneBridgeIndex |
-VeluxScene.getBridgeSceneIndex() |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxScene.SceneName |
-VeluxScene.getName() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-VeluxExistingScenes.dummyTest2(VeluxScene.SceneName sceneName) |
-
boolean |
-VeluxScene.SceneName.equals(VeluxScene.SceneName anotherName) |
-
VeluxScene |
-VeluxExistingScenes.get(VeluxScene.SceneName sceneName) |
-
boolean |
-VeluxExistingScenes.isRegistered(VeluxScene.SceneName sceneName) |
-
Package | -Description | -
---|---|
org.openhab.binding.velux.things | -- |
Modifier and Type | -Method and Description | -
---|---|
VeluxScene |
-VeluxExistingScenes.get(VeluxScene.SceneName sceneName) |
-
VeluxScene[] |
-VeluxExistingScenes.values() |
-
Modifier and Type | -Method and Description | -
---|---|
boolean |
-VeluxExistingScenes.isRegistered(VeluxScene scene) |
-
boolean |
-VeluxExistingScenes.register(VeluxScene newScene) |
-
Class | -Description | -
---|---|
VeluxExistingProducts | -
- Combined set of product informations provided by the Velux bridge,
- which can be used for later interactions.
- |
-
VeluxExistingScenes | -
- Combined set of scene informations provided by the Velux bridge,
- which can be used for later interactions.
- |
-
VeluxProduct | -
- Velux product representation.
- |
-
VeluxProduct.ProductBridgeIndex | -- |
VeluxProduct.ProductName | -- |
VeluxProductReference | -
- Velux product reference representation.
- |
-
VeluxProductState | -
- Velux product status representation.
- |
-
VeluxScene | -
- Velux scene representation.
- |
-
VeluxScene.SceneBridgeIndex | -- |
VeluxScene.SceneName | -- |
Enum | -Description | -
---|---|
VeluxProduct.ProductTypeId | -- |
Package | -Description | -
---|---|
org.openhab.binding.velux.handler | -- |
org.openhab.binding.velux.things | -- |
Class and Description | -
---|
VeluxExistingProducts
- Combined set of product informations provided by the Velux bridge,
- which can be used for later interactions.
- |
-
VeluxExistingScenes
- Combined set of scene informations provided by the Velux bridge,
- which can be used for later interactions.
- |
-
Class and Description | -
---|
VeluxProduct
- Velux product representation.
- |
-
VeluxProduct.ProductBridgeIndex | -
VeluxProduct.ProductName | -
VeluxProduct.ProductTypeId | -
VeluxProductReference
- Velux product reference representation.
- |
-
VeluxProductState
- Velux product status representation.
- |
-
VeluxProductState.ProductState | -
VeluxScene
- Velux scene representation.
- |
-
VeluxScene.SceneBridgeIndex | -
VeluxScene.SceneName | -
- - diff --git a/addons/binding/org.openhab.binding.velux/doc/overview-summary.html b/addons/binding/org.openhab.binding.velux/doc/overview-summary.html deleted file mode 100644 index ba6f0f838f01f..0000000000000 --- a/addons/binding/org.openhab.binding.velux/doc/overview-summary.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - -
Package | -Description | -
---|---|
org.openhab.binding.velux | -- |
org.openhab.binding.velux.bridge | -- |
org.openhab.binding.velux.bridge.comm | -- |
org.openhab.binding.velux.handler | -- |
org.openhab.binding.velux.internal | -- |
org.openhab.binding.velux.internal.config | -- |
org.openhab.binding.velux.things | -- |
* It provides two methods for interaction,
*
- * {@link VeluxBridge#communicateAuthenticated communicateAuthenticated} and
- * {@link VeluxBridge#communicateUnauthenticated communicateUnauthenticated} as well
+ * {@link VeluxBridge#ioAuthenticated ioAuthenticated} and
+ * {@link VeluxBridge#ioUnauthenticated ioUnauthenticated} as well
* as an utility method for customizing the
- * behaviour {@link VeluxBridge#communicationSetup communicationSetup}.
+ * behavior {@link VeluxBridge#ioSetup ioSetup}.
*
* @author Guenther Schreiner - Initial contribution.
*/
@@ -39,7 +36,7 @@ public class VeluxBridge {
private static int retries = 5;
private static long waitMSecs = 500L;
- private static
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * It therefore provides a method
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @see VeluxBridgeHandler
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeWLANConfig {
+ private final Logger logger = LoggerFactory.getLogger(VeluxBridgeWLANConfig.class);
+
+ /**
+ * Wireless network configuration, consisting of:
+ *
+ * Resulting JSON:
+ *
+ *
+ * Expected JSON (sample):
+ *
+ *
+ * Resulting JSON:
+ *
+ *
+ * Expected JSON (sample):
+ *
+ *
+ * Resulting JSON:
+ *
+ *
+ * Used within structure {@link BCgetFirmware} to describe the software of the Bridge.
+ */
+ public static class BCfirmwareVersion {
+ /*
+ * "version": "0.1.1.0.41.0"
+ */
+ private String version;
+
+ public String getVersion() {
+ return this.version;
+ }
+ }
+
+ /**
+ * Bridge I/O Response message used by {@link VeluxBridge} for deserializing with including component access methods
+ *
+ * Expected JSON (sample):
+ *
+ *
+ * Resulting JSON:
+ *
+ *
+ * Used within structure {@link BCgetLANConfig} to describe the network connectivity of the Bridge.
+ */
+ public static class BCLANConfig {
+ /*
+ * {"ipAddress":"192.168.45.9","subnetMask":"255.255.255.0","defaultGateway":"192.168.45.129","dhcp":false}
+ */
+ private String ipAddress;
+ private String subnetMask;
+ private String defaultGateway;
+ private boolean dhcp;
+
+ public String getIPAddress() {
+ return this.ipAddress;
+ }
+
+ public String getSubnetMask() {
+ return this.subnetMask;
+ }
+
+ public String getDefaultGateway() {
+ return this.defaultGateway;
+ }
+
+ public boolean getDHCP() {
+ return this.dhcp;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("ipAddress=%s,subnetMask=%s,defaultGateway=%s,dhcp=%s", this.ipAddress,
+ this.subnetMask, this.defaultGateway, this.dhcp ? "on" : "off");
+ }
+ }
+
+ /**
+ * Bridge I/O Response message used by {@link VeluxBridge} for unmarshelling with including component access methods
+ *
+ * Expected JSON (sample):
+ *
+ *
* Expected JSON (sample):
*
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetScenes.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetScenes.java
index ca5ff4dba5831..6e3800f710f54 100644
--- a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetScenes.java
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetScenes.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016-2017 (c) Guenther Schreiner
+ * Resulting JSON:
+ *
+ *
+ * Resulting JSON:
+ *
+ *
+ * Used within structure {@link BCgetWLANConfig} to describe the network connectivity of the Bridge.
+ */
+ public static class BCWLANConfig {
+ /*
+ * {"password":"Esf56mxqFY","name":"VELUX_KLF_847C"}
+ */
+ private String password;
+ private String name;
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public String getSSID() {
+ return this.name;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("SSID={},password={}", this.name, this.password);
+ }
+ }
+
+ /**
+ * Bridge I/O Response message used by {@link VeluxBridge} for deserialization with including component access
+ * methods
+ *
+ * Expected JSON (sample):
+ *
+ *
+ * Resulting JSON (sample):
+ *
+ *
+ * Expected JSON (sample):
+ *
+ *
+ * The following class access methods exist:
+ *
+ * The following class access methods exist:
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeDetectProducts {
+ private static final Logger LOGGER = LoggerFactory.getLogger(VeluxBridgeDetectProducts.class);
+
+ private static long waitMSecs = 2000L;
+
+ /**
+ * Login into bridge, start process to detect (new) products, loop until bridge is idle again and logout from bridge
+ * based on a well-prepared environment of a {@link VeluxBridgeHandler}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return success
+ * of type boolean describing the overall result of this interaction.
+ */
+
+ public static boolean detectProducts(VeluxBridgeHandler bridge) {
+ LOGGER.trace("detectProducts() called.");
+ boolean success = false;
+ if (!bridge.bridgeLogin()) {
+ LOGGER.debug("Velux bridge login sequence failed; expecting bridge is OFFLINE.");
+ return false;
+ }
+
+ LOGGER.trace("detectProducts() About to activate detection.");
+ BCdetectProducts.Response detectResponse = bridge.bridgeCommunicate(new BCdetectProducts());
+ if (detectResponse != null) {
+ while (true) {
+ LOGGER.trace("detectProducts() About to query detection status.");
+ BCgetDeviceStatus.Response response = bridge.bridgeCommunicate(new BCgetDeviceStatus());
+ if ((response == null) || (!response.getResult())) {
+ LOGGER.trace("detectProducts() finished with failure.");
+ break;
+ }
+ String deviceStatus = response.getDeviceStatus();
+ if (deviceStatus.equals("discovering")) {
+ LOGGER.trace("detectProducts() bridge is still busy.");
+ } else if (deviceStatus.equals("IDLE")) {
+ LOGGER.trace("detectProducts() bridge is idle again, now.");
+ success = true;
+ break;
+ } else {
+ LOGGER.info("detectProducts() unknown devicestatus ({}) received.", deviceStatus);
+ }
+ LOGGER.trace("detectProducts() about to wait {} msecs.", waitMSecs);
+ try {
+ Thread.sleep(waitMSecs);
+ } catch (InterruptedException ie) {
+ LOGGER.trace("detectProducts() wait interrupted.");
+ }
+ }
+ } else {
+ LOGGER.trace("detectProducts() activate detection finished with failure.");
+ }
+ if (!bridge.bridgeLogout()) {
+ LOGGER.debug("Velux bridge logout sequence failed; expecting bridge is OFFLINE.");
+ }
+ LOGGER.debug("detectProducts() finished {}.", success ? "successfully" : "with failure");
+ return success;
+ }
+}
+
+/**
+ * end-of-VeluxBridgeDetectProducts.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeDeviceStatus.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeDeviceStatus.java
new file mode 100644
index 0000000000000..dcdaf6fe1d3ce
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeDeviceStatus.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetDeviceStatus;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeDeviceStatus} represents a complete set of transactions
+ * for querying device status on the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeDeviceStatus {
+ private final Logger logger = LoggerFactory.getLogger(VeluxBridgeDeviceStatus.class);
+
+ /**
+ * Login into bridge, query the bridge for device status and logout from bridge
+ * based on a well-prepared environment of a {@link VeluxBridgeHandler}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return status
+ * of type String describing the status of the device/bridge.
+ */
+
+ public String retrieve(VeluxBridgeHandler bridge) {
+ logger.trace("retrieve() called.");
+
+ logger.trace("retrieve() About to query device status.");
+ BCgetDeviceStatus.Response response = bridge.bridgeCommunicate(new BCgetDeviceStatus());
+ if ((response == null) || (!response.getResult())) {
+ logger.trace("retrieve() finished with failure.");
+ return null;
+ } else {
+ logger.trace("retrieve() finished successfully with result {}.", response.getDeviceStatus());
+ return response.getDeviceStatus();
+ }
+ }
+}
+
+/**
+ * end-of-VeluxBridgeDeviceStatus.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/handler/VeluxBridgeExecute.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeExecute.java
similarity index 60%
rename from addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/handler/VeluxBridgeExecute.java
rename to addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeExecute.java
index c2a9e0b45008f..e5a8bfc042672 100644
--- a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/handler/VeluxBridgeExecute.java
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeExecute.java
@@ -1,26 +1,46 @@
/**
- * Copyright 2016-2017 (c) Guenther Schreiner
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
*
* @author Guenther Schreiner - Initial contribution
*/
public class VeluxBridgeExecute {
private static final Logger LOGGER = LoggerFactory.getLogger(VeluxBridgeExecute.class);
+ /**
+ * Login into bridge, executes a scene and logout from bridge based
+ * on a well-prepared environment of a {@link VeluxBridgeHandler}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @param sceneNo
+ * Number of scene to be executed.
+ *
+ * @return success
+ * of type boolean describing the overall result of this interaction.
+ */
public static boolean execute(VeluxBridgeHandler bridge, int sceneNo) {
LOGGER.trace("execute({}) called.", sceneNo);
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeFirmware.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeFirmware.java
new file mode 100644
index 0000000000000..2947e6cf69826
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeFirmware.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetFirmware;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeFirmware} represents a complete set of transactions
+ * for retrieving of any available scenes into a structure {@link VeluxExistingScenes}
+ * defined on the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @see VeluxBridgeHandler
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeFirmware {
+ private final Logger logger = LoggerFactory.getLogger(VeluxBridgeFirmware.class);
+
+ /**
+ * Wireless network configuration, consisting of:
+ *
+ *
+ */
+ public class Channel {
+ public boolean isRetrieved = false;
+ public String firmwareVersion = "";
+ }
+
+ private Channel channel = null;
+
+ /**
+ * Complete workflow for retrieving the firmware version, consisting of Login into bridge, querying the firmware
+ * version and logout from bridge based on a well-prepared environment of a {@link VeluxBridgeHandler}, where the
+ * results are stored within as well in {@link VeluxBridgeFirmware#channel}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return channel - or null -
+ * of type {@link VeluxBridgeFirmware.Channel} describing the overall result of this interaction.
+ */
+ public Channel retrieve(VeluxBridgeHandler bridge) {
+ logger.trace("retrieve() called.");
+
+ if (this.channel == null) {
+ this.channel = new Channel();
+ }
+
+ BCgetFirmware.Response response = bridge.bridgeCommunicate(new BCgetFirmware());
+ if (response != null) {
+ logger.trace("retrieve() found successfully firmware {}.", response.getFirmwareVersion());
+ this.channel.firmwareVersion = response.getFirmwareVersion();
+ this.channel.isRetrieved = true;
+ return channel;
+ } else {
+ logger.trace("retrieve() finished with failure.");
+ return null;
+ }
+ }
+
+}
+/**
+ * end-of-VeluxBridgeFirmware.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetProducts.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetProducts.java
new file mode 100644
index 0000000000000..73d49ce4c7297
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetProducts.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetProducts;
+import org.openhab.binding.velux.bridge.comm.BCproduct;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.openhab.binding.velux.things.VeluxExistingProducts;
+import org.openhab.binding.velux.things.VeluxProduct;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeGetProducts} represents a complete set of transactions
+ * for retrieving of any available products into a structure {@link VeluxExistingProducts}
+ * defined on the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @see VeluxProduct
+ * @see VeluxExistingProducts
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeGetProducts {
+ private static final Logger LOGGER = LoggerFactory.getLogger(VeluxBridgeGetProducts.class);
+
+ /**
+ * Login into bridge, retrieve all products and logout from bridge based
+ * on a well-prepared environment of a {@link VeluxBridgeHandler}. The results
+ * are stored within a public structure {@link org.openhab.binding.velux.things.VeluxExistingProducts
+ * VeluxExistingProducts}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return success
+ * of type boolean describing the overall result of this interaction.
+ */
+
+ public static boolean getProducts(VeluxBridgeHandler bridge) {
+ LOGGER.trace("getProducts() called.");
+
+ BCgetProducts.Response response = bridge.bridgeCommunicate(new BCgetProducts());
+ if (response != null) {
+ for (BCproduct product : response.getDevices()) {
+ LOGGER.trace("getProducts() found product {} (type {}).", product.getName(), product.getCategory());
+
+ VeluxProduct veluxProduct = new VeluxProduct(product);
+ LOGGER.trace("getProducts() storing product {}.", veluxProduct);
+ if (!bridge.existingsProducts.isRegistered(veluxProduct)) {
+ bridge.existingsProducts.register(veluxProduct);
+ }
+ }
+ LOGGER.debug("getProducts() finally has found products {}.", bridge.existingsProducts);
+ return true;
+
+ } else {
+ LOGGER.trace("getProducts() finished with failure.");
+ return false;
+ }
+ }
+
+}
+/**
+ * end-of-VeluxBridgeGetProducts.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetScenes.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetScenes.java
new file mode 100644
index 0000000000000..ea01dbd0ee2f0
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeGetScenes.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetScenes;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.openhab.binding.velux.things.VeluxExistingScenes;
+import org.openhab.binding.velux.things.VeluxScene;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeGetScenes} represents a complete set of transactions
+ * for retrieving of any available scenes into a structure {@link VeluxExistingScenes}
+ * defined on the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @see VeluxScene
+ * @see VeluxExistingScenes
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeGetScenes {
+ private static final Logger LOGGER = LoggerFactory.getLogger(VeluxBridgeGetScenes.class);
+
+ //
+ public static boolean getScenes(VeluxBridgeHandler bridge) {
+ LOGGER.trace("getScenes() called.");
+
+ BCgetScenes.Response response = bridge.bridgeCommunicate(new BCgetScenes());
+ if (response != null) {
+ for (BCgetScenes.BCscene scene : response.getScenes()) {
+ LOGGER.trace("getScenes() found scene {}.", scene.getName());
+
+ VeluxScene veluxScene = new VeluxScene(scene);
+ LOGGER.trace("getScenes() storing scene {}.", veluxScene);
+ if (!bridge.existingsScenes.isRegistered(veluxScene)) {
+ bridge.existingsScenes.register(veluxScene);
+ }
+ LOGGER.trace("getScenes() stored scene {}.", veluxScene);
+ }
+ LOGGER.debug("getScenes() finally has found scenes {}.", bridge.existingsScenes);
+ return true;
+ } else {
+ LOGGER.trace("getScenes() finished with failure.");
+ return false;
+ }
+ }
+
+}
+/**
+ * end-of-VeluxBridgeGetScenes.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeLANConfig.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeLANConfig.java
new file mode 100644
index 0000000000000..29d2935bb7446
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeLANConfig.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetLANConfig;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeLANConfig} represents a complete set of transactions
+ * for retrieving the network configuration of the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @see VeluxBridgeHandler
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeLANConfig {
+ private final Logger logger = LoggerFactory.getLogger(VeluxBridgeLANConfig.class);
+
+ /**
+ * Wireless network configuration, consisting of:
+ *
+ *
+ */
+ public class Channel {
+ public boolean isRetrieved = false;
+ public String ipAddress = "";
+ public String subnetMask = "";
+ public String defaultGW = "";
+ public boolean enabledDHCP = false;
+ }
+
+ private Channel channel = null;
+
+ /**
+ * Complete workflow for retrieving the network configuration, consisting of Login into bridge, querying
+ * the network configuration and logout from bridge based on a well-prepared environment of a
+ * {@link VeluxBridgeHandler}, where the results are stored within as well in
+ * {@link VeluxBridgeLANConfig#channel}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return channel - or null -
+ * of type {@link VeluxBridgeLANConfig.Channel} describing the overall result of this interaction.
+ */
+ public Channel retrieve(VeluxBridgeHandler bridge) {
+ logger.trace("retrieve() called.");
+
+ if (this.channel == null) {
+ this.channel = new Channel();
+ }
+
+ BCgetLANConfig.Response response = bridge.bridgeCommunicate(new BCgetLANConfig());
+ if (response != null) {
+ logger.trace("retrieve() found successfully configuration {}.", response.getLANConfig());
+ this.channel.ipAddress = response.getLANConfig().getIPAddress();
+ this.channel.subnetMask = response.getLANConfig().getSubnetMask();
+ this.channel.defaultGW = response.getLANConfig().getDefaultGateway();
+ this.channel.enabledDHCP = response.getLANConfig().getDHCP();
+ this.channel.isRetrieved = true;
+ return channel;
+ } else {
+ logger.trace("retrieve() finished with failure.");
+ return null;
+ }
+ }
+
+}
+/**
+ * end-of-VeluxBridgeLANConfig.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeSceneMode.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeSceneMode.java
new file mode 100644
index 0000000000000..bd8b44178cdc0
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeSceneMode.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCsetSilentMode;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.openhab.binding.velux.internal.config.VeluxBridgeConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeSceneMode} represents a complete set of transactions
+ * for modifying the silent-mode of a scene defined on the Velux bridge.
+ *
+ *
+ * Any parameters are controlled by {@link VeluxBridgeConfiguration}.
+ *
+ * @author Guenther Schreiner - Initial contribution
+ */
+public class VeluxBridgeSceneMode {
+ private static final Logger LOGGER = LoggerFactory.getLogger(VeluxBridgeSceneMode.class);
+
+ /**
+ * Login into bridge, executes a scene and logout from bridge based
+ * on a well-prepared environment of a {@link VeluxBridgeHandler}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @param sceneNo
+ * Number of scene to be executed.
+ *
+ * @param silentMode
+ * Mode of this mentioned scene.
+ *
+ * @return success
+ * of type boolean describing the overall result of this interaction.
+ */
+ public static boolean setSilentMode(VeluxBridgeHandler bridge, int sceneNo, boolean silentMode) {
+ LOGGER.trace("setSilentMode({},{}) called.", sceneNo, silentMode);
+
+ if (!bridge.bridgeLogin()) {
+ LOGGER.debug("Velux bridge login sequence failed; expecting bridge is OFFLINE.");
+ return false;
+ }
+ BCsetSilentMode.Response response = bridge.bridgeCommunicate(new BCsetSilentMode(sceneNo, silentMode));
+ if (response != null) {
+ if (response.getResult()) {
+ LOGGER.info("setSilentMode() finished successfully.");
+ return true;
+ }
+ }
+ if (!bridge.bridgeLogout()) {
+ LOGGER.debug("Velux bridge logout sequence failed; expecting bridge is OFFLINE.");
+ return false;
+ }
+ LOGGER.trace("setSilentMode() finished with failure.");
+ return false;
+ }
+}
+/**
+ * end-of-VeluxBridgeSceneMode.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeWLANConfig.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeWLANConfig.java
new file mode 100644
index 0000000000000..e7ce81cd25c3a
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/VeluxBridgeWLANConfig.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge;
+
+import org.openhab.binding.velux.bridge.comm.BCgetWLANConfig;
+import org.openhab.binding.velux.handler.VeluxBridgeHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The {@link VeluxBridgeWLANConfig} represents a complete set of transactions
+ * for retrieving the wireless network configuration of the Velux bridge.
+ *
+ *
+ *
+ *
+ */
+ public class Channel {
+ public boolean isRetrieved = false;
+ public String wlanSSID = "";
+ public String wlanPassword = "";
+ }
+
+ private Channel channel = null;
+
+ /**
+ * Complete workflow for retrieving the wireless network configuration, consisting of Login into bridge, querying
+ * the network configuration and logout from bridge based on a well-prepared environment of a
+ * {@link VeluxBridgeHandler}, where the results are stored within as well in
+ * {@link VeluxBridgeWLANConfig#channel}.
+ *
+ * @param bridge
+ * Initialized Velux bridge handler.
+ *
+ * @return channel - or null -
+ * of type {@link VeluxBridgeWLANConfig.Channel} describing the overall result of this interaction.
+ */
+ public Channel retrieve(VeluxBridgeHandler bridge) {
+ logger.trace("retrieve() called.");
+
+ if (this.channel == null) {
+ this.channel = new Channel();
+ }
+ BCgetWLANConfig.Response response = bridge.bridgeCommunicate(new BCgetWLANConfig());
+ if (response != null) {
+ logger.trace("retrieve() found successfully configuration {}.", response.getWLANConfig());
+ this.channel.wlanSSID = response.getWLANConfig().getSSID();
+ this.channel.wlanPassword = response.getWLANConfig().getPassword();
+ this.channel.isRetrieved = true;
+ return channel;
+ } else {
+ logger.trace("retrieve() finished with failure.");
+ return null;
+ }
+ }
+
+}
+/**
+ * end-of-VeluxBridgeWLANConfig.java
+ */
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCdetectProducts.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCdetectProducts.java
new file mode 100644
index 0000000000000..de1dfb3281663
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCdetectProducts.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge.comm;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openhab.binding.velux.bridge.VeluxBridge;
+
+/**
+ * I/O messages supported by the Velux bridge.
+ * It provides informations how to send query through the
+ * {@link org.openhab.binding.velux.handler.VeluxBridgeHandler VeluxBridgeHandler}.
+ *
+ * @author Guenther Schreiner - Initial contribution.
+ */
+public class BCdetectProducts implements BridgeCommunicationProtocol
+ * {"action":"discover","params":{}}
+ *
+ */
+ public static class Request {
+
+ @SuppressWarnings("unused")
+ private String action;
+
+ @SuppressWarnings("unused")
+ private Map
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"discovering",
+ * "data":{},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ @SuppressWarnings("unused")
+ private Object data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "discover products";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ * {"action":"getDeviceStatus","params":{}}
+ *
+ */
+ public static class Request {
+
+ @SuppressWarnings("unused")
+ private String action;
+
+ @SuppressWarnings("unused")
+ private Map
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"discovering", or "IDLE"
+ * "data":{},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ @SuppressWarnings("unused")
+ private Object data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "get device status";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ * {"action":"getFirmware","params":{}}
+ *
+ */
+ public static class Request {
+
+ @SuppressWarnings("unused")
+ private String action;
+
+ @SuppressWarnings("unused")
+ private Map
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"IDLE",
+ * "data":{"version":"0.1.1.0.41.0"},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ private BCfirmwareVersion data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public String getFirmwareVersion() {
+ return data.getVersion();
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "get firmware version";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ * {"action":"get","params":{}}
+ *
+ */
+ public static class Request {
+
+ @SuppressWarnings("unused")
+ private String action;
+
+ @SuppressWarnings("unused")
+ private Map
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"IDLE",
+ * "data":"ipAddress":"192.168.45.9","subnetMask":"255.255.255.0","defaultGateway":"192.168.45.129","dhcp":false},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ private BCLANConfig data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public BCLANConfig getLANConfig() {
+ return data;
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "get LAN configuration";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ * {"action":"get","params":{}}
+ *
*/
public static class Request {
- // {"action":"get","params":{}}
@SuppressWarnings("unused")
private String action;
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetWLANConfig.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetWLANConfig.java
new file mode 100644
index 0000000000000..12f1f81ce6db7
--- /dev/null
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/bridge/comm/BCgetWLANConfig.java
@@ -0,0 +1,179 @@
+/**
+ * Copyright (c) 2010-2017 by the respective copyright holders.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.openhab.binding.velux.bridge.comm;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openhab.binding.velux.bridge.VeluxBridge;
+
+/**
+ * I/O messages supported by the Velux bridge.
+ * It provides informations how to send query through the
+ * {@link org.openhab.binding.velux.handler.VeluxBridgeHandler VeluxBridgeHandler}.
+ *
+ * @author Guenther Schreiner - Initial contribution.
+ */
+public class BCgetWLANConfig implements BridgeCommunicationProtocol
+ * {"action":"wifi","params":{}}
+ *
+ */
+ public static class Request {
+
+ @SuppressWarnings("unused")
+ private String action;
+
+ @SuppressWarnings("unused")
+ private Map
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"IDLE",
+ * "data":{"password":"Esf56mxqFY","name":"VELUX_KLF_847C"},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ private BCWLANConfig data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public BCWLANConfig getWLANConfig() {
+ return data;
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "get WLAN configuration";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ * {"action":"setSilentMode","params":{"id":9,"silent":false}}}
+ *
+ */
+ public static class Request {
+ @SuppressWarnings("unused")
+ private String action;
+ @SuppressWarnings("unused")
+ private ParamsRunScene params;
+
+ public Request() {
+ this.action = "setSilentMode";
+ this.params = new ParamsRunScene(BCsetSilentMode.productId, BCsetSilentMode.silentMode);
+ }
+ }
+
+ /**
+ * Bridge I/O Response message used by {@link VeluxBridge} for deserializing with including component access methods
+ *
+ * {
+ * "token":"RHIKGlJyZhidI/JSK0a2RQ==",
+ * "result":true,
+ * "deviceStatus":"IDLE",
+ * "data":{},
+ * "errors":[]
+ * }
+ *
+ */
+ public static class Response {
+ private String token;
+ private boolean result;
+ private String deviceStatus;
+ @SuppressWarnings("unused")
+ private Object data;
+ private String[] errors;
+
+ public String getToken() {
+ return token;
+ }
+
+ public boolean getResult() {
+ return result;
+ }
+
+ public String getDeviceStatus() {
+ return deviceStatus;
+ }
+
+ public String[] getErrors() {
+ return errors;
+ }
+ }
+
+ /*
+ * ===========================================================
+ * Methods required for interface {@link BridgeCommunicationProtocol}.
+ */
+
+ @Override
+ public String name() {
+ return "modify silent mode";
+ }
+
+ @Override
+ public String getURL() {
+ return url;
+ }
+
+ @Override
+ public boolean isCommunicationSuccessful(Response response) {
+ return response.getResult();
+ };
+
+ @Override
+ public Class
+ *
*
* @see VeluxProduct
*
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxExistingScenes.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxExistingScenes.java
index d148a922e93b9..c4cce76c407fc 100644
--- a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxExistingScenes.java
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxExistingScenes.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016-2017 (c) Guenther Schreiner
+ *
*
* @see VeluxScene
*
diff --git a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxProduct.java b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxProduct.java
index 2417319f1eec7..9659d3af039ef 100644
--- a/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxProduct.java
+++ b/addons/binding/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/things/VeluxProduct.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016-2017 (c) Guenther Schreiner