Skip to content

Commit 83c774b

Browse files
committed
[surepetcare] added waterstation Felaqua
* Fixes: openhab#15654 * added Felaqua pet waterstation * added UoM where possible * other small fixes Signed-off-by: Holger Eisold <[email protected]>
1 parent baaaf7f commit 83c774b

File tree

15 files changed

+562
-161
lines changed

15 files changed

+562
-161
lines changed

bundles/org.openhab.binding.surepetcare/README.md

+363-145
Large diffs are not rendered by default.

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/SurePetcareConstants.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ public class SurePetcareConstants {
4646
public static final ThingTypeUID THING_TYPE_HUB_DEVICE = new ThingTypeUID(BINDING_ID, "hubDevice");
4747
public static final ThingTypeUID THING_TYPE_FLAP_DEVICE = new ThingTypeUID(BINDING_ID, "flapDevice");
4848
public static final ThingTypeUID THING_TYPE_FEEDER_DEVICE = new ThingTypeUID(BINDING_ID, "feederDevice");
49+
public static final ThingTypeUID THING_TYPE_WATER_DEVICE = new ThingTypeUID(BINDING_ID, "waterDevice");
4950

5051
public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Set.of(THING_TYPE_BRIDGE);
51-
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(Arrays.asList(THING_TYPE_HOUSEHOLD,
52-
THING_TYPE_PET, THING_TYPE_HUB_DEVICE, THING_TYPE_FLAP_DEVICE, THING_TYPE_FEEDER_DEVICE));
52+
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(
53+
Arrays.asList(THING_TYPE_HOUSEHOLD, THING_TYPE_PET, THING_TYPE_HUB_DEVICE, THING_TYPE_FLAP_DEVICE,
54+
THING_TYPE_FEEDER_DEVICE, THING_TYPE_WATER_DEVICE));
5355

5456
public static final long DEFAULT_REFRESH_INTERVAL_TOPOLOGY = 36000; // 10 hours
5557
public static final long DEFAULT_REFRESH_INTERVAL_STATUS = 300; // 5 mins
@@ -122,4 +124,7 @@ public class SurePetcareConstants {
122124
public static final String PET_CHANNEL_FEEDER_LAST_CHANGE = "feederLastChange";
123125
public static final String PET_CHANNEL_FEEDER_LAST_CHANGE_LEFT = "feederLastChangeLeft";
124126
public static final String PET_CHANNEL_FEEDER_LAST_CHANGE_RIGHT = "feederLastChangeRight";
127+
public static final String PET_CHANNEL_WATER_DEVICE = "waterDevice";
128+
public static final String PET_CHANNEL_WATER_LASTDRINKING = "waterLastDrinking";
129+
public static final String PET_CHANNEL_WATER_LAST_CHANGE = "waterLastChange";
125130
}

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/SurePetcareHandlerFactory.java

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public boolean supportsThingType(ThingTypeUID thingTypeUID) {
8080
return new SurePetcareDeviceHandler(thing, petcareAPI);
8181
} else if (thingTypeUID.equals(THING_TYPE_FEEDER_DEVICE)) {
8282
return new SurePetcareDeviceHandler(thing, petcareAPI);
83+
} else if (thingTypeUID.equals(THING_TYPE_WATER_DEVICE)) {
84+
return new SurePetcareDeviceHandler(thing, petcareAPI);
8385
} else if (thingTypeUID.equals(THING_TYPE_PET)) {
8486
return new SurePetcarePetHandler(thing, petcareAPI);
8587
} else if (thingTypeUID.equals(THING_TYPE_BRIDGE)) {

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/discovery/SurePetcareDiscoveryService.java

+3
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ private void deviceDiscovered(SurePetcareDevice device) {
149149
case PET_FEEDER:
150150
typeUID = THING_TYPE_FEEDER_DEVICE;
151151
break;
152+
case PET_WATER:
153+
typeUID = THING_TYPE_WATER_DEVICE;
154+
break;
152155
case UNKNOWN:
153156
default:
154157
return;

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/dto/SurePetcareDevice.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public enum ProductType {
3434
HUB(1, "Hub"),
3535
PET_FLAP(3, "Pet Flap"),
3636
PET_FEEDER(4, "Pet Feeder"),
37-
CAT_FLAP(6, "Cat Flap");
37+
CAT_FLAP(6, "Cat Flap"),
38+
PET_WATER(8, "Waterstation");
3839

3940
public final Integer id;
4041
public final String name;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2010-2025 Contributors to the openHAB project
3+
*
4+
* See the NOTICE file(s) distributed with this work for additional
5+
* information.
6+
*
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
10+
*
11+
* SPDX-License-Identifier: EPL-2.0
12+
*/
13+
package org.openhab.binding.surepetcare.internal.dto;
14+
15+
import java.time.ZonedDateTime;
16+
import java.util.ArrayList;
17+
import java.util.List;
18+
19+
import com.google.gson.annotations.SerializedName;
20+
21+
/**
22+
* The {@link SurePetcarePetDrinking} is the Java class used to represent the
23+
* status of a pet. It's used to deserialize JSON API results.
24+
*
25+
* @author Rene Scherer - Initial contribution
26+
* @author Holger Eisold - Added pet feeder status, waterstation
27+
*/
28+
public class SurePetcarePetDrinking {
29+
30+
public Long tagId;
31+
public Long deviceId;
32+
@SerializedName("change")
33+
public List<Float> drinkChange = new ArrayList<>();
34+
@SerializedName("at")
35+
public ZonedDateTime drinkChangeAt;
36+
}

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/dto/SurePetcarePetStatus.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ public class SurePetcarePetStatus {
2323

2424
public SurePetcarePetActivity activity;
2525
public SurePetcarePetFeeding feeding;
26+
public SurePetcarePetDrinking drinking;
2627
}

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcareDeviceHandler.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,17 @@ protected void updateThing() {
134134
updateState(DEVICE_CHANNEL_PAIRING_MODE, new StringType(device.status.pairingModeId.toString()));
135135
} else {
136136
float batVol = device.status.battery;
137-
updateState(DEVICE_CHANNEL_BATTERY_VOLTAGE, new DecimalType(batVol));
138-
updateState(DEVICE_CHANNEL_BATTERY_LEVEL, new DecimalType(Math.min(
139-
(batVol - BATTERY_EMPTY_VOLTAGE) / (BATTERY_FULL_VOLTAGE - BATTERY_EMPTY_VOLTAGE) * 100.0f,
140-
100.0f)));
137+
updateState(DEVICE_CHANNEL_BATTERY_VOLTAGE, new QuantityType<>(batVol, Units.VOLT));
138+
updateState(DEVICE_CHANNEL_BATTERY_LEVEL,
139+
new QuantityType<>(
140+
Math.min((batVol - BATTERY_EMPTY_VOLTAGE)
141+
/ (BATTERY_FULL_VOLTAGE - BATTERY_EMPTY_VOLTAGE) * 100.0f, 100.0f),
142+
Units.PERCENT));
141143
updateState(DEVICE_CHANNEL_LOW_BATTERY, OnOffType.from(batVol < LOW_BATTERY_THRESHOLD));
142144
updateState(DEVICE_CHANNEL_DEVICE_RSSI,
143-
QuantityType.valueOf(device.status.signal.deviceRssi, Units.DECIBEL_MILLIWATTS));
145+
new QuantityType<>(device.status.signal.deviceRssi, Units.DECIBEL_MILLIWATTS));
144146
updateState(DEVICE_CHANNEL_HUB_RSSI,
145-
QuantityType.valueOf(device.status.signal.hubRssi, Units.DECIBEL_MILLIWATTS));
147+
new QuantityType<>(device.status.signal.hubRssi, Units.DECIBEL_MILLIWATTS));
146148

147149
if (thing.getThingTypeUID().equals(THING_TYPE_FLAP_DEVICE)) {
148150
updateThingCurfews(device);
@@ -175,6 +177,8 @@ protected void updateThing() {
175177
new StringType(device.control.lid.closeDelayId.toString()));
176178
updateState(DEVICE_CHANNEL_BOWLS_TRAINING_MODE,
177179
new StringType(device.control.trainingModeId.toString()));
180+
} else if (thing.getThingTypeUID().equals(THING_TYPE_WATER_DEVICE)) {
181+
// TODO
178182
} else {
179183
logger.warn("Unknown product type for device {}", thing.getUID().getAsString());
180184
}

bundles/org.openhab.binding.surepetcare/src/main/java/org/openhab/binding/surepetcare/internal/handler/SurePetcarePetHandler.java

+13
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.openhab.binding.surepetcare.internal.dto.SurePetcareHousehold;
2727
import org.openhab.binding.surepetcare.internal.dto.SurePetcarePet;
2828
import org.openhab.binding.surepetcare.internal.dto.SurePetcarePetActivity;
29+
import org.openhab.binding.surepetcare.internal.dto.SurePetcarePetDrinking;
2930
import org.openhab.binding.surepetcare.internal.dto.SurePetcarePetFeeding;
3031
import org.openhab.binding.surepetcare.internal.dto.SurePetcareTag;
3132
import org.openhab.core.cache.ByteArrayFileCache;
@@ -35,7 +36,9 @@
3536
import org.openhab.core.library.types.QuantityType;
3637
import org.openhab.core.library.types.RawType;
3738
import org.openhab.core.library.types.StringType;
39+
import org.openhab.core.library.unit.MetricPrefix;
3840
import org.openhab.core.library.unit.SIUnits;
41+
import org.openhab.core.library.unit.Units;
3942
import org.openhab.core.thing.ChannelUID;
4043
import org.openhab.core.thing.Thing;
4144
import org.openhab.core.types.Command;
@@ -211,6 +214,16 @@ protected void updateThing() {
211214
updateState(PET_CHANNEL_FEEDER_LASTFEEDING, new DateTimeType(feeding.feedChangeAt));
212215
}
213216
}
217+
SurePetcarePetDrinking drinking = pet.status.drinking;
218+
if (drinking != null) {
219+
SurePetcareDevice device = petcareAPI.getDevice(drinking.deviceId.toString());
220+
if (device != null) {
221+
updateState(PET_CHANNEL_WATER_DEVICE, new StringType(device.name));
222+
updateState(PET_CHANNEL_WATER_LAST_CHANGE,
223+
new QuantityType<>(drinking.drinkChange.get(0), MetricPrefix.MILLI(Units.LITRE)));
224+
updateState(PET_CHANNEL_WATER_LASTDRINKING, new DateTimeType(drinking.drinkChangeAt));
225+
}
226+
}
214227
} else {
215228
logger.debug("Trying to update unknown pet: {}", thing.getUID().getId());
216229
}

bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/addon/addon.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<type>binding</type>
77
<name>Sure Petcare Binding</name>
8-
<description>This binding interacts with the Sure Petcare Connect range of cat flaps and feeders</description>
8+
<description>This binding interacts with the Sure Petcare Connect range of pet/cat flaps, feeders and waterstations</description>
99
<connection>cloud</connection>
1010

1111
</addon:addon>

bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/i18n/surepetcare.properties

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
addon.surepetcare.name = Sure Petcare Binding
2-
addon.surepetcare.description = This binding interacts with the Sure Petcare Connect range of cat/pet flaps and feeders
2+
addon.surepetcare.description = This binding interacts with the Sure Petcare Connect range of cat/pet flaps, feeders and waterstations
33

44
# bridge-types
55
thing-type.surepetcare.bridge.label = Sure Petcare API Bridge
@@ -31,6 +31,9 @@ thing-type.surepetcare.flapDevice.description = A Sure Petcare cat or pet flap d
3131
thing-type.surepetcare.feederDevice.label = Sure Petcare Pet Feeder
3232
thing-type.surepetcare.feederDevice.description = A Sure Petcare pet feeder device.
3333

34+
thing-type.surepetcare.waterDevice.label = Sure Petcare Pet Waterstation
35+
thing-type.surepetcare.waterDevice.description = A Sure Petcare pet waterstation device.
36+
3437
thing-type.surepetcare.pet.label = Sure Petcare Pet
3538
thing-type.surepetcare.pet.description = A Sure Petcare pet.
3639

@@ -51,12 +54,13 @@ channel-type.surepetcare.timezoneIdType.label = Timezone ID
5154
channel-type.surepetcare.timezoneIdType.description = The identifier of the timezone.
5255

5356
channel-type.surepetcare.productType.label = Product Type
54-
channel-type.surepetcare.productType.description = The type of product this device represents. (0=Unknown, 1=Hub, 3=Pet Flap, 4=Feeder, 6=Cat Flap)
57+
channel-type.surepetcare.productType.description = The type of product this device represents. (0=Unknown, 1=Hub, 3=Pet Flap, 4=Feeder, 6=Cat Flap, 8=Waterstation)
5558
channel-type.surepetcare.productType.state.option.0 = Unknown
5659
channel-type.surepetcare.productType.state.option.1 = Hub
5760
channel-type.surepetcare.productType.state.option.3 = Pet Flap
5861
channel-type.surepetcare.productType.state.option.4 = Pet Feeder
5962
channel-type.surepetcare.productType.state.option.6 = Cat Flap
63+
channel-type.surepetcare.productType.state.option.8 = Waterstation
6064

6165
channel-type.surepetcare.shareCodeType.label = Share Code
6266
channel-type.surepetcare.shareCodeType.description = A unique code provided by Sure Petcare to access photos of pets.
@@ -195,6 +199,15 @@ channel-type.surepetcare.feederLastChangeLeftType.description = The pet feeding
195199
channel-type.surepetcare.feederLastChangeRightType.label = Pet Feeding Last Change Right
196200
channel-type.surepetcare.feederLastChangeRightType.description = The pet feeding last change right.
197201

202+
channel-type.surepetcare.waterDeviceType.label = Pet Waterstation Device Name
203+
channel-type.surepetcare.waterDeviceType.description = The pet waterstation device name.
204+
205+
channel-type.surepetcare.waterLastDrinkingType.label = Pet Last Drinking
206+
channel-type.surepetcare.waterLastDrinkingType.description = The last pet drinking.
207+
208+
channel-type.surepetcare.waterLastChangeType.label = Pet Drinking Last Change
209+
channel-type.surepetcare.waterLastChangeType.description = The pet drinking last change.
210+
198211
channel-type.surepetcare.lockingModeType.label = Locking Mode
199212
channel-type.surepetcare.lockingModeType.description = The id of the locking mode the flap is currently set to (e.g. in/out, in only, out only, locked)
200213
channel-type.surepetcare.lockingModeType.state.option.0 = Unlocked

bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/i18n/surepetcare_de.properties

+16-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ thing-type.config.surepetcare.bridge.password.label = Sure Petcare Passwort
1313
thing-type.config.surepetcare.bridge.password.description = Sure Petcare Passwort.
1414

1515
thing-type.config.surepetcare.bridge.refreshIntervalStatus.label = Aktualisierungsintervall Haustier Status
16-
thing-type.config.surepetcare.bridge.refreshIntervalStatus.description = Intervall zur Abfrage des Haustier Status (in Sekunden) (mind. 300 / standard 36000).
16+
thing-type.config.surepetcare.bridge.refreshIntervalStatus.description = Intervall zur Abfrage des Haustier Status (in Sekunden) (mind. 300 / standard 300).
1717

1818
thing-type.config.surepetcare.bridge.refreshIntervalTopology.label = Aktualisierungsintervall Topology
19-
thing-type.config.surepetcare.bridge.refreshIntervalTopology.description = Intervall zur Abfrage der Geräte und Haustier Daten (in Sekunden) (mind. 300 / standard 300).
19+
thing-type.config.surepetcare.bridge.refreshIntervalTopology.description = Intervall zur Abfrage der Geräte und Haustier Daten (in Sekunden) (mind. 300 / standard 36000).
2020

2121
# thing-types
2222
thing-type.surepetcare.household.label = Sure Petcare Haushalt
@@ -31,6 +31,9 @@ thing-type.surepetcare.flapDevice.description = Ein Sure Petcare Gerät (Haustie
3131
thing-type.surepetcare.feederDevice.label = Sure Petcare Gerät (Futterautomat)
3232
thing-type.surepetcare.feederDevice.description = Sure Petcare Gerät (Futterautomat).
3333

34+
thing-type.surepetcare.waterDevice.label = Sure Petcare Gerät (Felaqua - Wasserstation)
35+
thing-type.surepetcare.waterDevice.description = Sure Petcare Gerät (Felaqua - Wasserstation).
36+
3437
thing-type.surepetcare.pet.label = Sure Petcare Haustier
3538
thing-type.surepetcare.pet.description = Ein Sure Petcare Haustier.
3639

@@ -51,12 +54,13 @@ channel-type.surepetcare.timezoneIdType.label = Zeitzone ID
5154
channel-type.surepetcare.timezoneIdType.description = Zeigt die ID der Zeitzone an.
5255

5356
channel-type.surepetcare.productType.label = Produkt Typ
54-
channel-type.surepetcare.productType.description = Zeigt den Produkt Namen an. \#(0\=unbekannt, 1\=Hub, 3\=Haustierklappe, 4\=Futterautomat, 6\=Katzenklappe)
57+
channel-type.surepetcare.productType.description = Zeigt den Produkt Namen an. \#(0\=unbekannt, 1\=Hub, 3\=Haustierklappe, 4\=Futterautomat, 6\=Katzenklappe, 8\=Wasserstation)
5558
channel-type.surepetcare.productType.state.option.0 = unbekannt
5659
channel-type.surepetcare.productType.state.option.1 = Hub
5760
channel-type.surepetcare.productType.state.option.3 = Haustierklappe
5861
channel-type.surepetcare.productType.state.option.4 = Futterautomat
5962
channel-type.surepetcare.productType.state.option.6 = Katzenklappe
63+
channel-type.surepetcare.productType.state.option.8 = Wasserstation
6064

6165
channel-type.surepetcare.shareCodeType.label = Share Code
6266
channel-type.surepetcare.shareCodeType.description = A unique code provided by Sure Petcare to access photos of pets
@@ -195,6 +199,15 @@ channel-type.surepetcare.feederLastChangeLeftType.description = Die letzte Futte
195199
channel-type.surepetcare.feederLastChangeRightType.label = Letzte Futteraufnahme Änderung (Rechts)
196200
channel-type.surepetcare.feederLastChangeRightType.description = Die letzte Futteraufnahme Änderung (rechts).
197201

202+
channel-type.surepetcare.waterDeviceType.label = Wasserstation Name
203+
channel-type.surepetcare.waterDeviceType.description = Der Name der Wasserstation.
204+
205+
channel-type.surepetcare.waterLastDrinkingType.label = Letzte Wasseraufnahme
206+
channel-type.surepetcare.waterLastDrinkingType.description = Die letzte Wasseraufnahme.
207+
208+
channel-type.surepetcare.waterLastChangeType.label = Letzte Wasseraufnahme Änderung
209+
channel-type.surepetcare.waterLastChangeType.description = Die letzte Wasseraufnahme Änderung.
210+
198211
channel-type.surepetcare.lockingModeType.label = Sperrmodus
199212
channel-type.surepetcare.lockingModeType.description = Zeigt des Sperrmodus des Gerätes an.
200213
channel-type.surepetcare.lockingModeType.state.option.0 = Entriegelt

bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/thing/things.xml

+60-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</supported-bridge-type-refs>
7979

8080
<label>Sure Petcare Hub Device</label>
81-
<description>A Sure Petcare hub device (connects cat flaps, feeders etc. to a network)</description>
81+
<description>A Sure Petcare hub device (connects pet/cat flaps, feeders and waterstations to a network)</description>
8282

8383
<channels>
8484
<channel id="id" typeId="idType"/>
@@ -192,6 +192,40 @@
192192
<representation-property>id</representation-property>
193193
</thing-type>
194194

195+
<thing-type id="waterDevice">
196+
<supported-bridge-type-refs>
197+
<bridge-type-ref id="bridge"/>
198+
</supported-bridge-type-refs>
199+
200+
<label>Sure Petcare Waterstation Device</label>
201+
<description>A Sure Petcare pet waterstation device</description>
202+
203+
<channels>
204+
<channel id="id" typeId="idType"/>
205+
<channel id="name" typeId="nameType"/>
206+
<channel id="product" typeId="productType"/>
207+
<channel id="lowBattery" typeId="system.low-battery"/>
208+
<channel id="batteryLevel" typeId="system.battery-level"/>
209+
<channel id="batteryVoltage" typeId="batteryVoltageType"/>
210+
<channel id="online" typeId="onlineType"/>
211+
<channel id="deviceRSSI" typeId="rssiDeviceType"/>
212+
<channel id="hubRSSI" typeId="rssiHubType"/>
213+
</channels>
214+
215+
<properties>
216+
<property name="id"/>
217+
<property name="version"/>
218+
<property name="createdAt"/>
219+
<property name="updatedAt"/>
220+
<property name="householdId"/>
221+
<property name="productType"/>
222+
<property name="productName"/>
223+
<property name="pairingAt"/>
224+
<property name="thingTypeVersion">1</property>
225+
</properties>
226+
<representation-property>id</representation-property>
227+
</thing-type>
228+
195229
<thing-type id="pet">
196230
<supported-bridge-type-refs>
197231
<bridge-type-ref id="bridge"/>
@@ -220,6 +254,9 @@
220254
<channel id="feederLastChange" typeId="feederLastChangeType"/>
221255
<channel id="feederLastChangeLeft" typeId="feederLastChangeLeftType"/>
222256
<channel id="feederLastChangeRight" typeId="feederLastChangeRightType"/>
257+
<channel id="waterDevice" typeId="waterDeviceType"/>
258+
<channel id="waterLastDrinking" typeId="waterLastDrinkingType"/>
259+
<channel id="waterLastChange" typeId="waterLastChangeType"/>
223260
</channels>
224261

225262
<properties>
@@ -272,6 +309,7 @@
272309
<option value="3">Pet Flap</option>
273310
<option value="4">Pet Feeder</option>
274311
<option value="6">Cat Flap</option>
312+
<option value="8">Waterstation</option>
275313
</options>
276314
</state>
277315
</channel-type>
@@ -527,6 +565,27 @@
527565
<state readOnly="true" pattern="%.2f %unit%"/>
528566
</channel-type>
529567

568+
<channel-type id="waterDeviceType">
569+
<item-type>String</item-type>
570+
<label>Pet Waterstation Device Name</label>
571+
<description>The pet waterstation device name</description>
572+
<state readOnly="true" pattern="%s"/>
573+
</channel-type>
574+
575+
<channel-type id="waterLastDrinkingType">
576+
<item-type>DateTime</item-type>
577+
<label>Pet Last Drinking</label>
578+
<description>The last pet drinking</description>
579+
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
580+
</channel-type>
581+
582+
<channel-type id="waterLastChangeType">
583+
<item-type>Number:Volume</item-type>
584+
<label>Pet Drinking Last Change</label>
585+
<description>The pet drinking last change</description>
586+
<state readOnly="true" pattern="%.2f %unit%"/>
587+
</channel-type>
588+
530589
<channel-type id="lockingModeType">
531590
<item-type>String</item-type>
532591
<label>Locking Mode</label>

bundles/org.openhab.binding.surepetcare/src/main/resources/OH-INF/update/update.xml

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
</instruction-set>
1515
</thing-type>
1616

17+
<thing-type uid="surepetcare:waterDevice">
18+
<instruction-set targetVersion="1">
19+
<update-channel id="deviceRSSI">
20+
<type>surepetcare:rssiDeviceType</type>
21+
</update-channel>
22+
<update-channel id="hubRSSI">
23+
<type>surepetcare:rssiHubType</type>
24+
</update-channel>
25+
</instruction-set>
26+
</thing-type>
27+
1728
<thing-type uid="surepetcare:flapDevice">
1829
<instruction-set targetVersion="1">
1930
<update-channel id="deviceRSSI">

0 commit comments

Comments
 (0)