2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.nikohomecontrol.internal.protocol;
15 import java.net.InetAddress;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link NhcControllerEvent} interface is used to get configuration information and to pass alarm or notice events
22 * received from the Niko Home Control controller to the consuming client. It is designed to pass events to openHAB
23 * handlers that implement this interface. Because of the design, the
24 * org.openhab.binding.nikohomecontrol.internal.protocol package can be extracted and used independent of openHAB.
26 * @author Mark Herwege - Initial Contribution
29 public interface NhcControllerEvent {
32 * Get the IP-address of the Niko Home Control IP-interface.
36 public default @Nullable InetAddress getAddr() {
41 * Get the listening port of the Niko Home Control IP-interface.
45 public default int getPort() {
50 * Get the profile for the hobby API in the Niko Home Control II system.
54 public default String getProfile() {
59 * Get the JWT Token of the Niko Home Control II system.
63 public default String getToken() {
68 * Called to indicate the connection with the Niko Home Control Controller is offline.
72 public void controllerOffline(String message);
75 * Called to indicate the connection with the Niko Home Control Controller is online.
78 public void controllerOnline();
81 * This method is called when an alarm event is received from the Niko Home Control controller.
85 public void alarmEvent(String alarmText);
88 * This method is called when a notice event is received from the Niko Home Control controller.
92 public void noticeEvent(String noticeText);
95 * This method is called when properties are updated from the Niko Home Control controller.
97 public void updatePropertiesEvent();