2 * Copyright (c) 2010-2023 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;
16 import java.time.ZoneId;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
22 * The {@link NhcControllerEvent} interface is used to get configuration information and to pass alarm or notice events
23 * received from the Niko Home Control controller to the consuming client. It is designed to pass events to openHAB
24 * handlers that implement this interface. Because of the design, the
25 * org.openhab.binding.nikohomecontrol.internal.protocol package can be extracted and used independent of openHAB.
27 * @author Mark Herwege - Initial Contribution
30 public interface NhcControllerEvent {
33 * Get the IP-address of the Niko Home Control IP-interface.
37 default @Nullable InetAddress getAddr() {
42 * Get the listening port of the Niko Home Control IP-interface.
46 default int getPort() {
51 * Get the profile for the hobby API in the Niko Home Control II system.
55 default String getProfile() {
60 * Get the JWT Token of the Niko Home Control II system.
64 default String getToken() {
69 * Get the time zone ID of the Niko Home Control system.
76 * Called to indicate the connection with the Niko Home Control Controller is offline.
80 void controllerOffline(String message);
83 * Called to indicate the connection with the Niko Home Control Controller is online.
86 void controllerOnline();
89 * This method is called when an alarm event is received from the Niko Home Control controller.
93 void alarmEvent(String alarmText);
96 * This method is called when a notice event is received from the Niko Home Control controller.
100 void noticeEvent(String noticeText);
103 * This method is called when properties are updated from the Niko Home Control controller.
105 void updatePropertiesEvent();