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.pilight.internal;
15 import java.util.List;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.pilight.internal.dto.Config;
20 import org.openhab.binding.pilight.internal.dto.Status;
21 import org.openhab.binding.pilight.internal.dto.Version;
22 import org.openhab.core.thing.ThingStatus;
23 import org.openhab.core.thing.ThingStatusDetail;
26 * Callback interface to signal any listeners that an update was received from pilight
28 * @author Jeroen Idserda - Initial contribution
29 * @author Stefan Röllin - Port to openHAB 2 pilight binding
30 * @author Niklas Dörfler - Port pilight binding to openHAB 3 + add device discovery
33 public interface IPilightCallback {
38 * @param status status of thing
39 * @param statusDetail status detail of thing
40 * @param description description of thing status
42 void updateThingStatus(ThingStatus status, ThingStatusDetail statusDetail, @Nullable String description);
45 * Update for one or more device received.
47 * @param allStatus list of Object containing list of devices that were updated and their current state
49 void statusReceived(List<Status> allStatus);
52 * Configuration received.
54 * @param config Object containing configuration of pilight
56 void configReceived(Config config);
59 * Version information received.
61 * @param version Object containing software version information of pilight daemon
63 void versionReceived(Version version);