-
-
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.
SolarMax Binding Initial implementation
- Loading branch information
1 parent
0d9b20a
commit 0699447
Showing
21 changed files
with
2,229 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This content is produced and maintained by the openHAB project. | ||
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/openhab/openhab-addons |
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,70 @@ | ||
# SolarMax Binding | ||
|
||
This binding supports SolarMax PV inverters. | ||
|
||
## Supported Things | ||
|
||
The SolarMax MT Series is support. (tested with 8MT2 devices) | ||
|
||
## Discovery | ||
|
||
Auto-discovery is currently not available. | ||
|
||
## Thing Configuration | ||
|
||
The IP address and port number (default 12345) of the device needs to be configured. | ||
|
||
|
||
``` | ||
############################## openHAB SolarMax Binding ############################# | ||
# The IP address or hostname of the SolarMax device | ||
#host=192.168.1.151|SolarMax1 | ||
# The port number configured on the SolarMax device | ||
# Default is 12345 | ||
#portNumber=12345 | ||
# The refresh interval (in seconds) | ||
# Default is 15 | ||
#refreshInterval=15 | ||
``` | ||
|
||
## Channels | ||
|
||
| channel | type | description | | ||
| ------------------------ | ------ | ------------------------------------------- | | ||
| LastUpdated | Point | When was the data last read from the device | | ||
| SoftwareVersion | Point | Software Version installed on the SolarMax device | | ||
| BuildNumber | Point | Firmware Build Number installed on the SolarMax device | | ||
| Startups | Point | Number of times the device has started | | ||
| AcPhase1Current | Point | Ac Phase 1 Current in Amps | | ||
| AcPhase2Current | Point | Ac Phase 2 Current in Amps | | ||
| AcPhase3Current | Point | Ac Phase 3 Current in Amps | | ||
| EnergyGeneratedToday | Point | Energy Generated Today in wH | | ||
| EnergyGeneratedTotal | Point | Energy Generated since recording began in wH | | ||
| OperatingHours | Point | Operating Hours since recording began in H | | ||
| EnergyGeneratedYesterday | Point | Energy Generated Yesterday in wH | | ||
| EnergyGeneratedLastMonth | Point | Energy Generated Last Month in wH | | ||
| EnergyGeneratedLastYear | Point | Energy Generated Last Year in wH | | ||
| EnergyGeneratedThisMonth | Point | Energy Generated This Month in wH | | ||
| EnergyGeneratedThisYear | Point | Energy Generated This Year in wH | | ||
| Current Power Generated | Point | Power currently being generated in w | | ||
| AcFrequency | Point | AcFrequency in Hz | | ||
| AcPhase1Voltage | Point | Ac Phase1 Voltage in V | | ||
| AcPhase2Voltage | Point | Ac Phase2 Voltage in V | | ||
| AcPhase3Voltage | Point | Ac Phase3 Voltage in V | | ||
| HeatSinkTemperature | Point | Heat Sink Temperature in degrees celcius | | ||
|
||
## Full Example | ||
|
||
Example Thing Configuration | ||
``` | ||
UID: solarmax:inverter:7a56fa7252 | ||
label: SolarMax Power Inverter East | ||
thingTypeUID: solarmax:inverter | ||
configuration: | ||
host: 192.168.1.151 | ||
refreshInterval: 15 | ||
portNumber: 12345 | ||
``` |
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,12 @@ | ||
############################## openHAB SolarMax Binding ############################# | ||
|
||
# The IP address or hostname of the SolarMax device | ||
#host=192.168.1.151|SolarMax1 | ||
|
||
# The port number configured on the SolarMax device | ||
# Default is 12345 | ||
#portNumber=12345 | ||
|
||
# The refresh interval (in seconds) | ||
# Default is 15 | ||
#refreshInterval=15 |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>3.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.solarmax</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: SolarMax Binding</name> | ||
|
||
</project> |
9 changes: 9 additions & 0 deletions
9
bundles/org.openhab.binding.solarmax/src/main/feature/feature.xml
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<features name="org.openhab.binding.solarmax-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"> | ||
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository> | ||
|
||
<feature name="openhab-binding-solarmax" description="SolarMax Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.solarmax/${project.version}</bundle> | ||
</feature> | ||
</features> |
38 changes: 38 additions & 0 deletions
38
...olarmax/src/main/java/org/openhab/binding/solarmax/internal/SolarMaxBindingConstants.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,38 @@ | ||
/** | ||
* Copyright (c) 2010-2021 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.solarmax.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.openhab.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link SolarMaxBindingConstants} class defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Jamie Townsend - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class SolarMaxBindingConstants { | ||
|
||
private static final String BINDING_ID = "solarmax"; | ||
private static final String THING_TYPE_ID = "inverter"; | ||
|
||
// List of all Thing Type UIDs | ||
public static final ThingTypeUID THING_TYPE_SOLARMAX = new ThingTypeUID(BINDING_ID, THING_TYPE_ID); | ||
|
||
// Config - do we really need to define all the values from SolarMaxConfiguration here?? I think not | ||
// ... | ||
|
||
// Channels - do we really need to define all the values from SolarMaxChannel here?? I think not | ||
// ... | ||
} |
60 changes: 60 additions & 0 deletions
60
...binding.solarmax/src/main/java/org/openhab/binding/solarmax/internal/SolarMaxChannel.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,60 @@ | ||
/** | ||
* Copyright (c) 2010-2021 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.solarmax.internal; | ||
|
||
import org.openhab.binding.solarmax.internal.connector.SolarMaxCommandKey; | ||
|
||
/** | ||
* The {@link SolarMaxChannel} Enum defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Jamie Townsend - Initial contribution | ||
*/ | ||
public enum SolarMaxChannel { | ||
|
||
// CHANNEL_UPDATE_VALUES_FROM_DEVICE("UpdateValuesFromDevice"), | ||
CHANNEL_LAST_UPDATED("LastUpdated"), // | ||
// CHANNEL_DEVICE_ADDRESS(SolarMaxCommandKey.DeviceAddress.name()), | ||
CHANNEL_SOFTWARE_VERSION(SolarMaxCommandKey.SoftwareVersion.name()), | ||
CHANNEL_BUILD_NUMBER(SolarMaxCommandKey.BuildNumber.name()), | ||
CHANNEL_STARTUPS(SolarMaxCommandKey.Startups.name()), | ||
CHANNEL_AC_PHASE1_CURRENT(SolarMaxCommandKey.AcPhase1Current.name()), | ||
CHANNEL_AC_PHASE2_CURRENT(SolarMaxCommandKey.AcPhase2Current.name()), | ||
CHANNEL_AC_PHASE3_CURRENT(SolarMaxCommandKey.AcPhase3Current.name()), | ||
CHANNEL_ENERGY_GENERATED_TODAY(SolarMaxCommandKey.EnergyGeneratedToday.name()), | ||
CHANNEL_ENERGY_GENERATED_TOTAL(SolarMaxCommandKey.EnergyGeneratedTotal.name()), | ||
CHANNEL_OPERATING_HOURS(SolarMaxCommandKey.OperatingHours.name()), | ||
CHANNEL_ENERGY_GENERATED_YESTERDAY(SolarMaxCommandKey.EnergyGeneratedYesterday.name()), | ||
CHANNEL_ENERGY_GENERATED_LAST_MONTH(SolarMaxCommandKey.EnergyGeneratedLastMonth.name()), | ||
CHANNEL_ENERGY_GENERATED_LAST_YEAR(SolarMaxCommandKey.EnergyGeneratedLastYear.name()), | ||
CHANNEL_ENERGY_GENERATED_THIS_MONTH(SolarMaxCommandKey.EnergyGeneratedThisMonth.name()), | ||
CHANNEL_ENERGY_GENERATED_THIS_YEAR(SolarMaxCommandKey.EnergyGeneratedThisYear.name()), | ||
CHANNEL_CURRENT_POWER_GENERATED(SolarMaxCommandKey.CurrentPowerGenerated.name()), | ||
CHANNEL_AC_FREQUENCY(SolarMaxCommandKey.AcFrequency.name()), | ||
CHANNEL_AC_PHASE1_VOLTAGE(SolarMaxCommandKey.AcPhase1Voltage.name()), | ||
CHANNEL_AC_PHASE2_VOLTAGE(SolarMaxCommandKey.AcPhase2Voltage.name()), | ||
CHANNEL_AC_PHASE3_VOLTAGE(SolarMaxCommandKey.AcPhase3Voltage.name()), | ||
CHANNEL_HEAT_SINK_TEMPERATUR(SolarMaxCommandKey.HeatSinkTemperature.name()) | ||
|
||
; | ||
|
||
private final String channelId; | ||
|
||
private SolarMaxChannel(String channelId) { | ||
this.channelId = channelId; | ||
} | ||
|
||
public String getChannelId() { | ||
return channelId; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...g.solarmax/src/main/java/org/openhab/binding/solarmax/internal/SolarMaxConfiguration.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,28 @@ | ||
/** | ||
* Copyright (c) 2010-2021 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.solarmax.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* The {@link SolarMaxConfiguration} class contains fields mapping thing configuration parameters. | ||
* | ||
* @author Jamie Townsend - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class SolarMaxConfiguration { | ||
public String host = ""; // this will always need to be overridden | ||
public int portNumber = 12345; // default value is 12345 | ||
|
||
public int refreshInterval = 15; // default value is 15 | ||
} |
Oops, something went wrong.