]> git.basschouten.com Git - openhab-addons.git/blob
b58d31afbabf06c0f19ca10e3d35538480a815d6
[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 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * The {@link NhcEnergyMeterEvent} interface is used to pass energyMeters meter events received from the Niko Home
20  * Control
21  * controller to the consuming client. It is designed to pass events to openHAB handlers that implement this interface.
22  * Because of the design, the org.openhab.binding.nikohomecontrol.internal.protocol package can be extracted and used
23  * independent of openHAB.
24  *
25  * @author Mark Herwege - Initial Contribution
26  */
27 @NonNullByDefault
28 public interface NhcEnergyMeterEvent {
29
30     /**
31      * This method is called when an energyMeter event is received from the Niko Home Control controller.
32      *
33      * @param power current power consumption/production in W (positive for consumption), null for an empty reading
34      */
35     public void energyMeterEvent(@Nullable Integer power);
36
37     /**
38      * Called to indicate the energyMeter has been initialized.
39      *
40      */
41     public void energyMeterInitialized();
42
43     /**
44      * Called to indicate the energyMeter has been removed from the Niko Home Control controller.
45      *
46      */
47     public void energyMeterRemoved();
48 }