Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ipobserver] Add channel rainTotal #17727

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class IpObserverBindingConstants {
public static final String WEEKLY_RAIN = "rainForWeek";
public static final String MONTHLY_RAIN = "rainForMonth";
public static final String YEARLY_RAIN = "rainForYear";
public static final String TOTAL_RAIN = "rainTotal";
public static final String INDOOR_BATTERY = "batteryIndoor";
public static final String OUTDOOR_BATTERY = "batteryOutdoor";
public static final String RESPONSE_TIME = "responseTime";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ private void setupServerChannels() {
createChannelHandler(WEEKLY_RAIN, QuantityType.class, ImperialUnits.INCH, "weeklyrainin");
createChannelHandler(MONTHLY_RAIN, QuantityType.class, ImperialUnits.INCH, "monthlyrainin");
createChannelHandler(YEARLY_RAIN, QuantityType.class, ImperialUnits.INCH, "yearlyrainin");
createChannelHandler(TOTAL_RAIN, QuantityType.class, ImperialUnits.INCH, "totalrainin");
createChannelHandler(UV_INDEX, DecimalType.class, SIUnits.CELSIUS, "UV");
createChannelHandler(WIND_AVERAGE_SPEED, QuantityType.class, ImperialUnits.MILES_PER_HOUR, "windspeedmph");
createChannelHandler(WIND_GUST, QuantityType.class, ImperialUnits.MILES_PER_HOUR, "windgustmph");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ channel-type.ipobserver.rainHourlyRate.label = Rain Hourly Rate
channel-type.ipobserver.rainHourlyRate.description = How much rain will fall in an Hour if the rate continues
channel-type.ipobserver.rainToday.label = Rain Today
channel-type.ipobserver.rainToday.description = Rain since Midnight
channel-type.ipobserver.rainTotal.label = Total Rain
channel-type.ipobserver.responseTime.label = Response Time
channel-type.ipobserver.responseTime.description = How many milliseconds it took to fetch the sensor readings from livedata.htm
channel-type.ipobserver.solarRadiation.label = Solar Radiation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@
<channel id="rainForWeek" typeId="rainForWeek"/>
<channel id="rainForMonth" typeId="rainForMonth"/>
<channel id="rainForYear" typeId="rainForYear"/>
<channel id="rainTotal" typeId="rainTotal"/>
<channel id="batteryOutdoor" typeId="system.low-battery"/>
<channel id="batteryIndoor" typeId="system.low-battery"/>
<channel id="responseTime" typeId="responseTime"/>
<channel id="lastUpdatedTime" typeId="lastUpdatedTime"/>
</channels>

<properties>
<property name="thingTypeVersion">1</property>
</properties>

<config-description>
<parameter name="address" type="text" required="true">
<context>network-address</context>
Expand Down Expand Up @@ -233,6 +238,12 @@
<category>Rain</category>
<state pattern="%.2f %unit%" readOnly="true"/>
</channel-type>
<channel-type id="rainTotal">
<item-type>Number:Length</item-type>
<label>Total Rain</label>
<category>Rain</category>
<state pattern="%.2f %unit%" readOnly="true"/>
</channel-type>
<channel-type id="lastUpdatedTime" advanced="true">
<item-type>DateTime</item-type>
<label>Last Updated Time</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">

<thing-type uid="ipobserver:weatherstation">
<instruction-set targetVersion="1">
<add-channel id="rainTotal">
<type>ipobserver:rainTotal</type>
</add-channel>
</instruction-set>
</thing-type>

</update:update-descriptions>