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.freebox.internal.api.model;
15 import java.util.List;
18 * The {@link FreeboxSystemConfig} is the Java class used to map the "SystemConfig"
19 * structure used by the system API
20 * https://dev.freebox.fr/sdk/os/system/#
22 * @author Laurent Garnier - Initial contribution
24 public class FreeboxSystemConfig {
25 private String firmwareVersion;
27 private String serial;
28 private String uptime;
29 private long uptimeVal;
30 private String boardName;
35 private boolean boxAuthenticated;
36 private String diskStatus;
37 private String boxFlavor;
38 private String userMainStorage;
39 private List<FreeboxSensor> fans;
40 private List<FreeboxSensor> sensors;
42 public String getFirmwareVersion() {
43 return firmwareVersion;
46 public String getMac() {
50 public String getSerial() {
54 public String getUptime() {
58 public long getUptimeVal() {
62 public String getBoardName() {
66 public int getTempCpum() {
67 if (sensors != null) {
68 for (FreeboxSensor sensor : sensors) {
69 if ("temp_cpum".equals(sensor.getId())) {
70 return sensor.getValue();
77 public int getTempSw() {
78 if (sensors != null) {
79 for (FreeboxSensor sensor : sensors) {
80 if ("temp_sw".equals(sensor.getId())) {
81 return sensor.getValue();
88 public int getTempCpub() {
89 if (sensors != null) {
90 for (FreeboxSensor sensor : sensors) {
91 if ("temp_cpub".equals(sensor.getId())) {
92 return sensor.getValue();
99 public int getFanRpm() {
101 for (FreeboxSensor fan : fans) {
102 if ("fan0_speed".equals(fan.getId())) {
103 return fan.getValue();
110 public boolean isBoxAuthenticated() {
111 return boxAuthenticated;
114 public String getDiskStatus() {
118 public String getBoxFlavor() {
122 public String getUserMainStorage() {
123 return userMainStorage;