]> git.basschouten.com Git - openhab-addons.git/blob
94fa3989f7f77234f53f7aeb56abddc4fe6e9caa
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.tellstick.internal.handler;
14
15 import org.openhab.core.thing.ChannelUID;
16 import org.openhab.core.types.Command;
17 import org.tellstick.device.iface.Device;
18
19 /**
20  * Interface for the telldus bridge modules
21  *
22  * @author Jarle Hjortland - Initial contribution
23  */
24 public interface TelldusBridgeHandler {
25
26     /**
27      * TelldusDeviceController
28      * Add a status listener.
29      *
30      * @param deviceStatusListener
31      * @return
32      */
33     boolean registerDeviceStatusListener(DeviceStatusListener deviceStatusListener);
34
35     /**
36      * Remove a status listener.
37      *
38      * @param deviceStatusListener
39      * @return
40      */
41     boolean unregisterDeviceStatusListener(DeviceStatusListener deviceStatusListener);
42
43     /**
44      * Get a device from the bridgehandler.
45      *
46      * @param serialNumber
47      * @return
48      */
49     Device getDevice(String serialNumber);
50
51     /**
52      * Get a sensor from the bridgehandler.
53      *
54      * @param deviceUUId
55      * @return
56      */
57     Device getSensor(String deviceUUId);
58
59     /**
60      * Tell the bridge to rescan for new devices.
61      *
62      */
63     void rescanTelldusDevices();
64
65     /**
66      * Get the controller to communicate with devices.
67      *
68      * @return
69      */
70     TelldusDeviceController getController();
71
72     /**
73      * Send a command to the controller.
74      *
75      * @param channelUID
76      * @param command
77      */
78     void handleCommand(ChannelUID channelUID, Command command);
79 }