2 * Copyright (c) 2010-2024 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.shelly.internal.config;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link ShellyThingConfiguration} class contains fields mapping thing configuration parameters.
20 * @author Markus Michels - Initial contribution
23 public class ShellyThingConfiguration {
24 public String deviceIp = ""; // ip address of thedevice
25 public String deviceAddress = ""; // IP address or MAC address for BLU devices
26 public String userId = ""; // userid for http basic auth
27 public String password = ""; // password for http basic auth
29 public int updateInterval = 60; // schedule interval for the update job
30 public int lowBattery = 15; // threshold for battery value
31 public boolean brightnessAutoOn = true; // true: turn on device if brightness > 0 is set
33 public int favoriteUP = 0; // Roller position favorite when control channel receives ON, 0=none
34 public int favoriteDOWN = 0; // Roller position favorite when control channel receives ON, 0=none
36 public boolean eventsButton = false; // true: register for Relay btn_xxx events
37 public boolean eventsSwitch = true; // true: register for device out_xxx events
38 public boolean eventsPush = true; // true: register for short/long push events
39 public boolean eventsRoller = true; // true: register for short/long push events
40 public boolean eventsSensorReport = true; // true: register for sensor events
41 public boolean eventsCoIoT = false; // true: use CoIoT events (based on COAP)
43 public String localIp = ""; // local ip addresses used to create callback url
44 public String localPort = "8080";
45 public String serviceName = "";
47 public Boolean enableBluGateway = false;
48 public Boolean enableRangeExtender = true;
51 public String toString() {
52 return "Device address=" + deviceAddress + ", HTTP user/password=" + userId + "/"
53 + (password.isEmpty() ? "<none>" : "***") + ", update interval=" + updateInterval + "\n"
54 + "Events: Button: " + eventsButton + ", Switch (on/off): " + eventsSwitch + ", Push: " + eventsPush
55 + ", Roller: " + eventsRoller + "Sensor: " + eventsSensorReport + ", CoIoT: " + eventsCoIoT + "\n"
56 + "Blu Gateway=" + enableBluGateway + ", Range Extender: " + enableRangeExtender;