Skip to content

Commit

Permalink
#10413 updates from code reviews in PR #10414
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie Townsend <jamie_townsend@hotmail.com>
  • Loading branch information
jamietownsend committed Apr 27, 2021
1 parent 8bc3f2b commit 11e901c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 67 deletions.
80 changes: 29 additions & 51 deletions bundles/org.openhab.binding.solarmax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,40 @@ Auto-discovery is currently not available.

## Thing Configuration

The IP address and port number (default 12345) of the device needs to be configured.
Each inverter requires the following configuration parameters:

| parameter | required | default | description |
| --------------- | -------- | ------- | -------------------------------------------------------------------- |
| host | yes | | hostname or IP address of the inverter |
| port | no | 12345 | Port number to connect to. This should be `12345` for most inverters |
| refreshInterval | no | 15 | Interval (in seconds) to refresh the channel values. |

```
############################## 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 | DateTime | Time when data was 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 |
| channel | type | description |
| ------------------------ | -------- | ------------------------------------------------------ |
| lastUpdated | DateTime | Time when data was 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 |
| currentPowerGenerated | 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 |

### SolarMax Commands

Expand All @@ -65,16 +56,3 @@ The most interesting, identifiable and useful commands were implemented as chann
Here is a list of other commands, which are know to return some kind of value: ADR (DeviceAddress / Device Number - only used if the devices are linked serially), AMM, CID, CPG, CPL, CP1, CP2, CP3, CP4, CP5, CYC, DIN, DMO, ETH, FH2, FQR, FWV, IAA, IED, IEE, IEM, ILM, IP4, ISL, ITS, KFS, KHS, KTS, LAN (Language), MAC (MAC Address), PAE, PAM, PDA, PDC, PFA, PIN (Power Installed), PLR, PPC, PRL (AC Power Percent, PSF, PSR, PSS, QAC, QMO, QUC, RA1, RA2, RB1, RB2, REL, RH1, RH2, RPR, RSD, SAC, SAL, SAM, SCH, SNM (IP Broadcast Address??), SPS, SRD, SRS, SYS (Operating State), TCP (probably port number - 12345), TI1, TL1, TL3, TND, TNH, TNL, TP1, TP2, TP3, TV0, TV1, TYP (Type?), UA2, UB2, UGD, UI1, UI2, UI3, ULH, ULL, UMX, UM1, UM2, UM3, UPD, UZK, VCM

Valid commands which returned a null/empty value during testing: FFK, FRT, GCP, ITN, PLD, PLE, PLF, PLS, PPO, TV2, VLE, VLI, VLO

## 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
```
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,35 @@
</channel-type>

<channel-type id="acPhase1Current">
<item-type>Number</item-type>
<item-type>Number:ElectricCurrent</item-type>
<label>Ac Phase 1 Current</label>
<description>Ac Phase 1 Current in Amps</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acPhase2Current">
<item-type>Number</item-type>
<item-type>Number:ElectricCurrent</item-type>
<label>Ac Phase 2 Current</label>
<description>Ac Phase 2 Current in Amps</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acPhase3Current">
<item-type>Number</item-type>
<item-type>Number:ElectricCurrent</item-type>
<label>Ac Phase 3 Current</label>
<description>Ac Phase 3 Current in Amps</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedToday">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated Today</label>
<description>Energy Generated Today in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedTotal">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated Total</label>
<description>Energy Generated Total since recording began in wH</description>
<state readOnly="true"></state>
Expand All @@ -123,77 +123,77 @@
</channel-type>

<channel-type id="energyGeneratedYesterday">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated Yesterday</label>
<description>Energy Generated Yesterday in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedLastMonth">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated Last Month</label>
<description>Energy Generated Last Month in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedLastYear">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated Last Year</label>
<description>Energy Generated Last Year in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedThisMonth">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated This Month</label>
<description>Energy Generated This Month in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="energyGeneratedThisYear">
<item-type>Number</item-type>
<item-type>Number:Energy</item-type>
<label>Energy Generated This Year</label>
<description>Energy Generated This Year in wH</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="currentPowerGenerated">
<item-type>Number</item-type>
<item-type>Number:Power</item-type>
<label>Current Power Generated</label>
<description>Power currently being generated in w</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acFrequency">
<item-type>Number</item-type>
<item-type>Number:Frequency</item-type>
<label>Ac Frequency</label>
<description>AcFrequency in Hz</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acPhase1Voltage">
<item-type>Number</item-type>
<item-type>Number:ElectricPotential</item-type>
<label>Ac Phase1 Voltage</label>
<description>Ac Phase1 Voltage in V</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acPhase2Voltage">
<item-type>Number</item-type>
<item-type>Number:ElectricPotential</item-type>
<label>Ac Phase2 Voltage</label>
<description>Ac Phase2 Voltage in V</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="acPhase3Voltage">
<item-type>Number</item-type>
<item-type>Number:ElectricPotential</item-type>
<label>Ac Phase3 Voltage</label>
<description>Ac Phase3 Voltage in V</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="heatSinkTemperature">
<item-type>Number</item-type>
<item-type>Number:Temperature</item-type>
<label>Heat Sink Temperature</label>
<description>Heat Sink Temperature in degrees celcius</description>
<state readOnly="true"></state>
Expand Down

0 comments on commit 11e901c

Please sign in to comment.