]> git.basschouten.com Git - openhab-addons.git/blob
7073d71671d62c9a8caea7e6f1c6e75bff3d23b4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.shelly.internal.coap;
14
15 import java.util.List;
16 import java.util.Map;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.openhab.binding.shelly.internal.coap.ShellyCoapJSonDTO.CoIotDescrBlk;
21 import org.openhab.binding.shelly.internal.coap.ShellyCoapJSonDTO.CoIotDescrSen;
22 import org.openhab.binding.shelly.internal.coap.ShellyCoapJSonDTO.CoIotSensor;
23 import org.openhab.binding.shelly.internal.handler.ShellyColorUtils;
24 import org.openhab.core.types.State;
25
26 /**
27  * The {@link ShellyCoapListener} describes the listening interface to process Coap responses
28  *
29  * @author Markus Michels - Initial contribution
30  */
31 @NonNullByDefault
32 public interface ShellyCoIoTInterface {
33     public int getVersion();
34
35     public CoIotDescrSen fixDescription(@Nullable CoIotDescrSen sen, Map<String, CoIotDescrBlk> blkMap);
36
37     public void completeMissingSensorDefinition(Map<String, CoIotDescrSen> sensorMap);
38
39     public boolean handleStatusUpdate(List<CoIotSensor> sensorUpdates, CoIotDescrSen sen, int serial, CoIotSensor s,
40             Map<String, State> updates, ShellyColorUtils col);
41
42     public String getLastWakeup();
43 }