-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fronius] Added Ohmpilot thing and channel realpowersum for thing met…
…er (#11835) * Added support for fronius ohmpilot and added smart meter power sum. Signed-off-by: urmet0 <hannes.spenger@gmail.com>
- Loading branch information
Showing
11 changed files
with
490 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...onius/src/main/java/org/openhab/binding/fronius/internal/api/OhmpilotRealtimeBodyDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.fronius.internal.api; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* The {@link OhmpilotRealtimeBody} is responsible for storing | ||
* the "body" node of the JSON response | ||
* | ||
* @author Hannes Spenger - Initial contribution | ||
*/ | ||
public class OhmpilotRealtimeBodyDTO { | ||
@SerializedName("Data") | ||
private OhmpilotRealtimeBodyDataDTO data; | ||
|
||
public OhmpilotRealtimeBodyDataDTO getData() { | ||
if (data == null) { | ||
data = new OhmpilotRealtimeBodyDataDTO(); | ||
} | ||
return data; | ||
} | ||
|
||
public void setData(OhmpilotRealtimeBodyDataDTO data) { | ||
this.data = data; | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
...s/src/main/java/org/openhab/binding/fronius/internal/api/OhmpilotRealtimeBodyDataDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.fronius.internal.api; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* The {@link OhmpilotRealtimeBodyData} is responsible for storing | ||
* the "data" node of the JSON response | ||
* | ||
* @author Hannes Spenger - Initial contribution | ||
*/ | ||
public class OhmpilotRealtimeBodyDataDTO { | ||
@SerializedName("Details") | ||
private OhmpilotRealtimeDetailsDTO details; | ||
@SerializedName("EnergyReal_WAC_Sum_Consumed") | ||
private double energyRealWACSumConsumed; | ||
@SerializedName("PowerReal_PAC_Sum") | ||
private double powerPACSum; | ||
@SerializedName("Temperature_Channel_1") | ||
private double temperatureChannel1; | ||
@SerializedName("CodeOfError") | ||
private int errorCode; | ||
@SerializedName("CodeOfState") | ||
private int stateCode; | ||
|
||
public OhmpilotRealtimeDetailsDTO getDetails() { | ||
if (details == null) { | ||
details = new OhmpilotRealtimeDetailsDTO(); | ||
} | ||
return details; | ||
} | ||
|
||
public void setDetails(OhmpilotRealtimeDetailsDTO details) { | ||
this.details = details; | ||
} | ||
|
||
public double getEnergyRealWACSumConsumed() { | ||
return energyRealWACSumConsumed; | ||
} | ||
|
||
public void setEnergyRealWACSumConsumed(double energyRealWACSumConsumed) { | ||
this.energyRealWACSumConsumed = energyRealWACSumConsumed; | ||
} | ||
|
||
public double getPowerPACSum() { | ||
return powerPACSum; | ||
} | ||
|
||
public void setPowerPACSum(double powerPACSum) { | ||
this.powerPACSum = powerPACSum; | ||
} | ||
|
||
public double getTemperatureChannel1() { | ||
return temperatureChannel1; | ||
} | ||
|
||
public void setTemperatureChannel1(double temperatureChannel1) { | ||
this.temperatureChannel1 = temperatureChannel1; | ||
} | ||
|
||
public int getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public void setErrorCode(int errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
|
||
public int getStateCode() { | ||
return stateCode; | ||
} | ||
|
||
public void setStateCode(int stateCode) { | ||
this.stateCode = stateCode; | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
...us/src/main/java/org/openhab/binding/fronius/internal/api/OhmpilotRealtimeDetailsDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.fronius.internal.api; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* The {@link OhmpilotRealtimeDetails} is responsible for storing | ||
* the "body" node of the JSON response | ||
* | ||
* @author Hannes Spenger - Initial contribution | ||
*/ | ||
public class OhmpilotRealtimeDetailsDTO { | ||
@SerializedName("Hardware") | ||
private String hardware; | ||
@SerializedName("Manufacturer") | ||
private String manufacturer; | ||
@SerializedName("Model") | ||
private String model; | ||
@SerializedName("Serial") | ||
private String serial; | ||
@SerializedName("Software") | ||
private String software; | ||
|
||
public String getHardware() { | ||
return hardware; | ||
} | ||
|
||
public void setHardware(String hardware) { | ||
this.hardware = hardware; | ||
} | ||
|
||
public String getManufacturer() { | ||
return manufacturer; | ||
} | ||
|
||
public void setManufacturer(String manufacturer) { | ||
this.manufacturer = manufacturer; | ||
} | ||
|
||
public String getModel() { | ||
return model; | ||
} | ||
|
||
public void setModel(String model) { | ||
this.model = model; | ||
} | ||
|
||
public String getSerial() { | ||
return serial; | ||
} | ||
|
||
public void setSerial(String serial) { | ||
this.serial = serial; | ||
} | ||
|
||
public String getSoftware() { | ||
return software; | ||
} | ||
|
||
public void setSoftware(String software) { | ||
this.software = software; | ||
} | ||
} |
Oops, something went wrong.