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.gardena.internal;
15 import java.util.Collection;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.gardena.internal.exception.GardenaDeviceNotFoundException;
19 import org.openhab.binding.gardena.internal.exception.GardenaException;
20 import org.openhab.binding.gardena.internal.model.dto.Device;
21 import org.openhab.binding.gardena.internal.model.dto.api.DataItem;
22 import org.openhab.binding.gardena.internal.model.dto.command.GardenaCommand;
25 * Describes the methods required for the communication with Gardena smart system.
27 * @author Gerhard Riegler - Initial contribution
30 public interface GardenaSmart {
33 * Disposes Gardena smart system.
35 public void dispose();
38 * Returns all devices from all locations.
40 public Collection<Device> getAllDevices();
43 * Returns a device with the given id.
45 public Device getDevice(String deviceId) throws GardenaDeviceNotFoundException;
48 * Sends a command to Gardena smart system.
50 public void sendCommand(DataItem<?> dataItem, GardenaCommand gardenaCommand) throws GardenaException;
55 public String getId();
58 * Restarts all WebSocket.
60 public void restartWebsockets();