]> git.basschouten.com Git - openhab-addons.git/blob
b8a2e5c441d480b93ebec9a8ce4a6ef1434228b8
[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.shelly.internal.api1;
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.api1.Shelly1CoapJSonDTO.CoIotDescrBlk;
21 import org.openhab.binding.shelly.internal.api1.Shelly1CoapJSonDTO.CoIotDescrSen;
22 import org.openhab.binding.shelly.internal.api1.Shelly1CoapJSonDTO.CoIotSensor;
23 import org.openhab.binding.shelly.internal.handler.ShellyColorUtils;
24 import org.openhab.core.types.State;
25
26 /**
27  * The {@link Shelly1CoapListener} describes the listening interface to process Coap responses
28  *
29  * @author Markus Michels - Initial contribution
30  */
31 @NonNullByDefault
32 public interface Shelly1CoIoTInterface {
33     int getVersion();
34
35     CoIotDescrSen fixDescription(@Nullable CoIotDescrSen sen, Map<String, CoIotDescrBlk> blkMap);
36
37     void completeMissingSensorDefinition(Map<String, CoIotDescrSen> sensorMap);
38
39     boolean handleStatusUpdate(List<CoIotSensor> sensorUpdates, CoIotDescrSen sen, int serial, CoIotSensor s,
40             Map<String, State> updates, ShellyColorUtils col);
41
42     String getLastWakeup();
43 }