Skip to content

Commit

Permalink
Adressing issue nibi79#91
Browse files Browse the repository at this point in the history
Signed-off-by: clinique <[email protected]>
  • Loading branch information
clinique committed Aug 19, 2023
1 parent b46cccb commit 7b4c369
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 15 deletions.
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.worxlandroid</artifactId>

<name>openHAB Add-ons :: Bundles :: Worx Landroid Binding</name>

<dependencies>

<dependency>
<groupId>software.amazon.awssdk.iotdevicesdk</groupId>
<artifactId>aws-iot-device-sdk</artifactId>
Expand All @@ -26,6 +25,11 @@
<artifactId>aws-crt</artifactId>
<version>0.22.1</version>
</dependency>
<dependency>
<groupId>javax.measure</groupId>
<artifactId>unit-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions src/main/history/dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<feature>wrap</feature>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.12.0</bundle>
<bundle>mvn:com.google.code.gson/gson/2.9.0</bundle>
<bundle>mvn:javax.measure/unit-api/2.2</bundle>
<bundle>mvn:org.openhab.addons.bundles/org.openhab.binding.worxlandroid/4.1.0-SNAPSHOT</bundle>
<bundle>wrap:mvn:org.lastnpe.eea/eea-all/2.2.1</bundle>
<bundle>wrap:mvn:software.amazon.awssdk.crt/aws-crt/0.22.1</bundle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ public enum WorxLandroidErrorCodes {
@SerializedName("16")
MOWER_LOCKED,
@SerializedName("17")
BATTERY_OVER_TEMPERATURE;
BATTERY_OVER_TEMPERATURE,
@SerializedName("20")
MOWER_OUTSIDE_WIRE;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public enum WorxLandroidStatusCodes {
DEBUG,
@SerializedName("12")
REMOTE_CONTROL,
@SerializedName("13")
ESCAPE_FROM_OLM,
@SerializedName("30")
GOING_HOME,
@SerializedName("31")
Expand All @@ -60,5 +62,10 @@ public enum WorxLandroidStatusCodes {
@SerializedName("33")
SEARCHING_ZONE,
@SerializedName("34")
PAUSE;
PAUSE,
// Issue #91
// @SerializedName("97")
// ZONE_TRAINING,
@SerializedName("99")
MANUEL_STOP;
}
196 changes: 185 additions & 11 deletions src/main/resources/OH-INF/i18n/worxlandroid.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,191 @@ addon.worxlandroid.description = This is the binding for WorxLandroid.

# thing types

thing-type.worxlandroid.mower.label = Worx Landroid Mower
thing-type.worxlandroid.mower.description = Worx Landroid Mower
thing-type.worxlandroid.bridge.label = Bridge Worx Landroid API
thing-type.worxlandroid.bridge.description = Represents the API and handler for Worx Landroid.
thing-type.worxlandroid.mower.label = Landroid Mower
thing-type.worxlandroid.mower.description = Represents a Landroid Worx Mower
thing-type.worxlandroid.mower.group.friday.label = Friday Schedule
thing-type.worxlandroid.mower.group.friday2.label = Friday Slot 2 Schedule
thing-type.worxlandroid.mower.group.monday.label = Monday Schedule
thing-type.worxlandroid.mower.group.monday2.label = Monday Slot 2 Schedule
thing-type.worxlandroid.mower.group.saturday.label = Saturday Schedule
thing-type.worxlandroid.mower.group.saturday2.label = Saturday Slot 2 Schedule
thing-type.worxlandroid.mower.group.sunday.label = Sunday Schedule
thing-type.worxlandroid.mower.group.sunday2.label = Sunday Slot 2 Schedule
thing-type.worxlandroid.mower.group.thursday.label = Thursday Schedule
thing-type.worxlandroid.mower.group.thursday2.label = Thursday Slot 2 Schedule
thing-type.worxlandroid.mower.group.tuesday.label = Tuesday Schedule
thing-type.worxlandroid.mower.group.tuesday2.label = Tuesday Slot 2 Schedule
thing-type.worxlandroid.mower.group.wednesday.label = Wednesday Schedule
thing-type.worxlandroid.mower.group.wednesday2.label = Wednesday Slot 2 Schedule

# thing types config

thing-type.config.worxlandroid.bridge.password.label = Password
thing-type.config.worxlandroid.bridge.password.description = Password to access the Landroid WebAPI.
thing-type.config.worxlandroid.bridge.reconnectInterval.label = Reconnect Interval
thing-type.config.worxlandroid.bridge.reconnectInterval.description = Interval for reconnecting in seconds (after 600 seconds of inactivity, the connection is closed)
thing-type.config.worxlandroid.bridge.username.label = Username
thing-type.config.worxlandroid.bridge.username.description = Username to access the Landroid WebAPI.
thing-type.config.worxlandroid.mower.pollingInterval.label = Polling Interval
thing-type.config.worxlandroid.mower.pollingInterval.description = Interval for polling in seconds
thing-type.config.worxlandroid.mower.refreshStatusInterval.label = Refresh Status Interval
thing-type.config.worxlandroid.mower.refreshStatusInterval.description = Interval for refreshing mower status in seconds
thing-type.config.worxlandroid.mower.serialNumber.label = Serial Number
thing-type.config.worxlandroid.mower.serialNumber.description = Serial number of the mower

# channel group types

channel-group-type.worxlandroid.battery-group-type.label = Battery
channel-group-type.worxlandroid.battery-group-type.description = Data battery channels of your mower
channel-group-type.worxlandroid.battery-group-type.channel.charge-cycle.label = Battery Charge Cycle Total
channel-group-type.worxlandroid.battery-group-type.channel.charge-cycle-current.label = Battery Charge Cycle Current
channel-group-type.worxlandroid.common-group-type.label = Common
channel-group-type.worxlandroid.common-group-type.description = Common channels of the mower
channel-group-type.worxlandroid.common-group-type.channel.enable.label = Mowing enabled
channel-group-type.worxlandroid.common-group-type.channel.online.label = Online
channel-group-type.worxlandroid.common-group-type.channel.online.description = Online status of the mower
channel-group-type.worxlandroid.common-group-type.channel.online-timestamp.label = Online Status Timestamp
channel-group-type.worxlandroid.common-group-type.channel.poll.label = Poll AWS
channel-group-type.worxlandroid.common-group-type.channel.poll.description = Enables or disables polling Worx AWS
channel-group-type.worxlandroid.config-group-type.label = Configuration
channel-group-type.worxlandroid.config-group-type.description = Configuration channels of your mower
channel-group-type.worxlandroid.config-group-type.channel.command.label = Command
channel-group-type.worxlandroid.day-sched-group-type.label = Daily Schedule
channel-group-type.worxlandroid.day-sched-group-type.description = Configuration schedule channels for each day
channel-group-type.worxlandroid.day-sched-group-type.channel.edgecut.label = Schedule Edgecut
channel-group-type.worxlandroid.day-sched-group-type.channel.enable.label = Active
channel-group-type.worxlandroid.day-sched-group-type.channel.enable.description = Defines if this day schedule is active or not
channel-group-type.worxlandroid.metrics-group-type.label = Metrics
channel-group-type.worxlandroid.metrics-group-type.description = Data st channels of your mower
channel-group-type.worxlandroid.metrics-group-type.channel.current-blade-time.label = Current Blade Time
channel-group-type.worxlandroid.metrics-group-type.channel.total-blade-time.label = Total Blade Time
channel-group-type.worxlandroid.metrics-group-type.channel.total-time.label = Total Time
channel-group-type.worxlandroid.multi-zones-group-type.label = Multi-Zone
channel-group-type.worxlandroid.multi-zones-group-type.description = Multi-Zones configuration of your mower
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-0.label = Zone Allocation 1
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-1.label = Zone Allocation 2
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-2.label = Zone Allocation 3
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-3.label = Zone Allocation 4
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-4.label = Zone Allocation 5
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-5.label = Zone Allocation 6
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-6.label = Zone Allocation 7
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-7.label = Zone Allocation 8
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-8.label = Zone Allocation 9
channel-group-type.worxlandroid.multi-zones-group-type.channel.allocation-9.label = Zone Allocation 10
channel-group-type.worxlandroid.multi-zones-group-type.channel.enable.label = Multizone Enabled
channel-group-type.worxlandroid.multi-zones-group-type.channel.last-zone.label = Last Zone
channel-group-type.worxlandroid.multi-zones-group-type.channel.zone-1.label = Meters Zone 1
channel-group-type.worxlandroid.multi-zones-group-type.channel.zone-2.label = Meters Zone 2
channel-group-type.worxlandroid.multi-zones-group-type.channel.zone-3.label = Meters Zone 3
channel-group-type.worxlandroid.multi-zones-group-type.channel.zone-4.label = Meters Zone 4
channel-group-type.worxlandroid.orientation-group-type.label = Orientation
channel-group-type.worxlandroid.orientation-group-type.description = Orientation of your mower
channel-group-type.worxlandroid.orientation-group-type.channel.pitch.label = Pitch
channel-group-type.worxlandroid.orientation-group-type.channel.roll.label = Roll
channel-group-type.worxlandroid.orientation-group-type.channel.yaw.label = Yaw
channel-group-type.worxlandroid.ot-sched-group-type.label = One-Time Schedule
channel-group-type.worxlandroid.ot-sched-group-type.description = One time schedule configuration of your mower
channel-group-type.worxlandroid.ot-sched-group-type.channel.edgecut.label = Schedule Edgecut
channel-group-type.worxlandroid.rain-group-type.label = Rain
channel-group-type.worxlandroid.rain-group-type.description = Data rain channels of your mower
channel-group-type.worxlandroid.rain-group-type.channel.counter.label = Counter
channel-group-type.worxlandroid.sched-group-type.label = Schedule
channel-group-type.worxlandroid.sched-group-type.description = Schedule channels configuration of your mower
channel-group-type.worxlandroid.sched-group-type.channel.next-start.label = Next Start
channel-group-type.worxlandroid.sched-group-type.channel.next-start.description = Next mowing start based on schedule
channel-group-type.worxlandroid.sched-group-type.channel.next-stop.label = Next Stop
channel-group-type.worxlandroid.sched-group-type.channel.next-stop.description = Next mowing stop based on schedule
channel-group-type.worxlandroid.wifi-group-type.label = Wifi Information

# channel types

channel-type.worxlandroid.action-type.label = Action
channel-type.worxlandroid.action-type.description = Action channel for your mower
channel-type.worxlandroid.action-type.state.option.START = Start
channel-type.worxlandroid.action-type.state.option.STOP = Stop
channel-type.worxlandroid.action-type.state.option.HOME = Home
channel-type.worxlandroid.axis-type.label = Axis
channel-type.worxlandroid.battery-temp-type.label = Battery Temperature
channel-type.worxlandroid.battery-temp-type.description = Current temperature of the battery
channel-type.worxlandroid.charging-type.label = Battery Charging
channel-type.worxlandroid.distance-type.label = Total Distance
channel-type.worxlandroid.error-type.label = Error Code
channel-type.worxlandroid.error-type.state.option.UNKNOWN = Unknown
channel-type.worxlandroid.error-type.state.option.NO_ERR = No error
channel-type.worxlandroid.error-type.state.option.TRAPPED = Trapped
channel-type.worxlandroid.error-type.state.option.LIFTED = Lifted
channel-type.worxlandroid.error-type.state.option.WIRE_MISSING = Wire missing
channel-type.worxlandroid.error-type.state.option.OUTSIDE_WIRE = Outside wire
channel-type.worxlandroid.error-type.state.option.RAINING = Raining
channel-type.worxlandroid.error-type.state.option.CLOSE_DOOR_TO_MOW = Close door to mow
channel-type.worxlandroid.error-type.state.option.CLOSE_DOOR_TO_GO_HOME = Close door to go home
channel-type.worxlandroid.error-type.state.option.BLADE_MOTOR_BLOCKED = Blade motor blocked
channel-type.worxlandroid.error-type.state.option.WHEEL_MOTOR_BLOKED = Wheel motor blocked
channel-type.worxlandroid.error-type.state.option.TRAPPED_TIMEOUT = Trapped timeout
channel-type.worxlandroid.error-type.state.option.UPSIDE_DOWN = Upside down
channel-type.worxlandroid.error-type.state.option.BATTERY_LOW = Battery low
channel-type.worxlandroid.error-type.state.option.REVERSE_WIRE = Reverse wire
channel-type.worxlandroid.error-type.state.option.CHARGE_ERROR = Charge error
channel-type.worxlandroid.error-type.state.option.TIMEOUT_FINDING_HOME = Timeout finding home
channel-type.worxlandroid.error-type.state.option.MOWER_LOCKED = Mower locked
channel-type.worxlandroid.error-type.state.option.BATTERY_OVER_TEMPERATURE = Battery over temperature
channel-type.worxlandroid.error-type.state.option.MOWER_OUTSIDE_WIRE = Mower outside wire
channel-type.worxlandroid.lock-type.label = Lock mower
channel-type.worxlandroid.lock-type.description = Lock or unlock your mower.
channel-type.worxlandroid.metrics-duration.label = Time
channel-type.worxlandroid.number-ro.label = A Number
channel-type.worxlandroid.rain-delay-type.label = Delay
channel-type.worxlandroid.rain-state-type.label = State
channel-type.worxlandroid.rssi.label = RSSI
channel-type.worxlandroid.rssi.description = Received signal strength indicator
channel-type.worxlandroid.schedule-duration-type.label = Schedule Duration
channel-type.worxlandroid.schedule-mode-type.label = Schedule Mode
channel-type.worxlandroid.schedule-mode-type.description = Sets Normal or Party mode
channel-type.worxlandroid.schedule-mode-type.state.option.1 = Normal
channel-type.worxlandroid.schedule-mode-type.state.option.2 = Party
channel-type.worxlandroid.schedule-time.label = Start Time
channel-type.worxlandroid.schedule-time.description = Start time of the mowing on this day
channel-type.worxlandroid.schedule-time.state.pattern = %1$tH:%1$tM
channel-type.worxlandroid.status-type.label = Status Code
channel-type.worxlandroid.status-type.state.option.UNKNOWN = Unknown
channel-type.worxlandroid.status-type.state.option.IDLE = Idle
channel-type.worxlandroid.status-type.state.option.HOME = Home
channel-type.worxlandroid.status-type.state.option.START_SEQUENCE = Start sequence
channel-type.worxlandroid.status-type.state.option.LEAVING_HOME = Leaving home
channel-type.worxlandroid.status-type.state.option.FOLLOW_WIRE = Follow wire
channel-type.worxlandroid.status-type.state.option.SEARCHING_HOME = Searching home
channel-type.worxlandroid.status-type.state.option.SEARCHING_WIRE = Searching wire
channel-type.worxlandroid.status-type.state.option.MOWING = Mowing
channel-type.worxlandroid.status-type.state.option.LIFTED = Lifted
channel-type.worxlandroid.status-type.state.option.TRAPPED = Trapped
channel-type.worxlandroid.status-type.state.option.BLADE_BLOCKED = Blade blocked
channel-type.worxlandroid.status-type.state.option.DEBUG = Debug
channel-type.worxlandroid.status-type.state.option.REMOTE_CONTROL = Remote control
channel-type.worxlandroid.status-type.state.option.ESCAPE_FROM_OLM = Escape from OLM
channel-type.worxlandroid.status-type.state.option.GOING_HOME = Going home
channel-type.worxlandroid.status-type.state.option.ZONE_TRAINING = Zone training
channel-type.worxlandroid.status-type.state.option.BORDER_CUT = Border cut
channel-type.worxlandroid.status-type.state.option.SEARCHING_ZONE = Searching zone
channel-type.worxlandroid.status-type.state.option.PAUSE = Pause
channel-type.worxlandroid.status-type.state.option.MANUAL_STOP = Manual stop
channel-type.worxlandroid.switch-ro.label = Read Only Switch
channel-type.worxlandroid.switch-rw.label = Read Write Switch
channel-type.worxlandroid.time-extension-type.label = Schedule Time Extension
channel-type.worxlandroid.timestamp.label = Last Update
channel-type.worxlandroid.timestamp.description = Last device update
channel-type.worxlandroid.voltage-type.label = Battery Voltage
channel-type.worxlandroid.voltage-type.description = Battery voltage reported by the mower
channel-type.worxlandroid.zone-meter-type.label = Length of the zone
channel-type.worxlandroid.zone-type.label = Zone Number
channel-type.worxlandroid.zone-type.state.option.0 = Zone 1
channel-type.worxlandroid.zone-type.state.option.1 = Zone 2
channel-type.worxlandroid.zone-type.state.option.2 = Zone 3
channel-type.worxlandroid.zone-type.state.option.3 = Zone 4

# thing types

thing-type.worxlandroid.mower.group.cfgScFriday.label = Configuration schedule channels Friday
thing-type.worxlandroid.mower.group.cfgScFriday2.label = Configuration schedule channels Friday Slot 2
thing-type.worxlandroid.mower.group.cfgScMonday.label = Configuration schedule channels Monday
Expand All @@ -21,19 +204,11 @@ thing-type.worxlandroid.mower.group.cfgScTuesday.label = Configuration schedule
thing-type.worxlandroid.mower.group.cfgScTuesday2.label = Configuration schedule channels Tuesday Slot 2
thing-type.worxlandroid.mower.group.cfgScWednesday.label = Configuration schedule channels Wednesday
thing-type.worxlandroid.mower.group.cfgScWednesday2.label = Configuration schedule channels Wednesday Slot 2
thing-type.worxlandroid.bridge.label = Bridge Worx Landroid API
thing-type.worxlandroid.bridge.description = Represents the API and handler for Worx Landroid.

# thing types config

thing-type.config.worxlandroid.mower.serialNumber.label = Serial Number
thing-type.config.worxlandroid.mower.serialNumber.description = Serial number of the mower
thing-type.config.worxlandroid.mower.pollingInterval.label = Polling Interval
thing-type.config.worxlandroid.mower.pollingInterval.description = Interval for polling in seconds
thing-type.config.worxlandroid.mower.reconnectInterval.label = Reconnect Interval
thing-type.config.worxlandroid.mower.reconnectInterval.description = Interval for reconnecting in seconds (after 10 minutes / 600 seconds of inactivity, the connection is closed)
thing-type.config.worxlandroid.mower.refreshStatusInterval.label = Refresh Status Interval
thing-type.config.worxlandroid.mower.refreshStatusInterval.description = Interval for refreshing mower status in seconds
thing-type.config.worxlandroid.bridge.webapiPassword.label = Password
thing-type.config.worxlandroid.bridge.webapiPassword.description = Password to access the Landroid WebAPI.
thing-type.config.worxlandroid.bridge.webapiUsername.label = Username
Expand Down Expand Up @@ -148,5 +323,4 @@ channel-type.worxlandroid.chZoneMeter.label = Meters of zone
conf-error-no-username = Cannot connect to Landroid bridge as no username is configured
conf-error-no-password = Cannot connect to Landroid bridge as no password is configured
conf-error-no-serial = No serial number configured for this mower

oauth-connection-error = Error getting access token
3 changes: 3 additions & 0 deletions src/main/resources/OH-INF/thing/channels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@
<option value="BLADE_BLOCKED">Blade blocked</option>
<option value="DEBUG">Debug</option>
<option value="REMOTE_CONTROL">Remote control</option>
<option value="ESCAPE_FROM_OLM">Escape from OLM</option>
<option value="GOING_HOME">Going home</option>
<option value="ZONE_TRAINING">Zone training</option>
<option value="BORDER_CUT">Border cut</option>
<option value="SEARCHING_ZONE">Searching zone</option>
<option value="PAUSE">Pause</option>
<option value="MANUAL_STOP">Manual stop</option>
</options>
</state>
</channel-type>
Expand Down Expand Up @@ -102,6 +104,7 @@
<option value="TIMEOUT_FINDING_HOME">Timeout finding home</option>
<option value="MOWER_LOCKED">Mower locked</option>
<option value="BATTERY_OVER_TEMPERATURE">Battery over temperature</option>
<option value="MOWER_OUTSIDE_WIRE">Mower outside wire</option>
</options>
</state>
</channel-type>
Expand Down

0 comments on commit 7b4c369

Please sign in to comment.