]> git.basschouten.com Git - openhab-addons.git/blob
75a38212dd82036f32e8c755257b790158887eae
[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.nikohomecontrol.internal.protocol;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link NhcThermostatEvent} interface is used to pass thermostat events received from the Niko Home Control
19  * controller to
20  * the consuming client. It is designed to pass events to openHAB handlers that implement this interface. Because of
21  * the design, the org.openhab.binding.nikohomecontrol.internal.protocol package can be extracted and used independent
22  * of openHAB.
23  *
24  * @author Mark Herwege - Initial Contribution
25  */
26 @NonNullByDefault
27 public interface NhcThermostatEvent {
28
29     /**
30      * This method is called when thermostat event is received from the Niko Home Control controller.
31      *
32      * @param measured current temperature in 0.1°C multiples
33      * @param setpoint the setpoint temperature in 0.1°C multiples
34      * @param mode thermostat mode 0 = day, 1 = night, 2 = eco, 3 = off, 4 = cool, 5 = prog1, 6 = prog2, 7 = prog3
35      * @param overrule the overrule temperature in 0.1°C multiples
36      * @param demand 0 if no demand, > 0 if heating, < 0 if cooling
37      */
38     void thermostatEvent(int measured, int setpoint, int mode, int overrule, int demand);
39
40     /**
41      * Called to indicate the thermostat has been initialized.
42      *
43      */
44     void thermostatInitialized();
45
46     /**
47      * Called to indicate the thermostat has been removed from the Niko Home Control controller.
48      *
49      */
50     void thermostatRemoved();
51 }