mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[homeconnect] Add cleaning robot support (#20733)
- Introduce cleaning robot thing type with automatic device type detection (Roxxter vs. Spotless series) based on available programs. Signed-off-by: Jonas Brüstel <openhab@bruestel.net>
This commit is contained in:
@@ -13,12 +13,12 @@ The **Home Connect API** (Bridge Type ID: api_bridge) is responsible for the com
|
||||
|
||||
### Devices
|
||||
|
||||
Supported devices: dishwasher, washer, washer / dryer combination, dryer, oven, refrigerator freezer, coffee machine, hood, cooktop*
|
||||
Supported devices: dishwasher, washer, washer / dryer combination, dryer, oven, refrigerator freezer, coffee machine, hood, cooktop*, cleaning robot*
|
||||
|
||||
#### experimental support
|
||||
`*` _experimental support_
|
||||
|
||||
| Home appliance | Thing Type ID |
|
||||
| -------------------------- | ------------- |
|
||||
|----------------------------|---------------|
|
||||
| Dishwasher | dishwasher |
|
||||
| Washer | washer |
|
||||
| Washer / Dryer combination | washerdryer |
|
||||
@@ -28,6 +28,7 @@ Supported devices: dishwasher, washer, washer / dryer combination, dryer, oven,
|
||||
| Cooktop | hob |
|
||||
| Refrigerator Freezer | fridgefreezer |
|
||||
| Coffee Machine | coffeemaker |
|
||||
| Cleaning Robot | cleaningrobot |
|
||||
|
||||
> **INFO:** Currently the Home Connect API does not support all appliance programs. Please check if your desired program is available (e.g. <https://developer.home-connect.com/docs/washing-machine/supported_programs_and_options>).
|
||||
|
||||
@@ -37,54 +38,63 @@ After the bridge has been added and authorized, devices are discovered automatic
|
||||
|
||||
## Channels
|
||||
|
||||
| Channel Type ID | Item Type | Read only | Description | Available on Thing |
|
||||
| --------------- | --------- | --------- | ----------- | ------------------ |
|
||||
| power_state | Switch | false | This setting describes the current power state of the home appliance. | dishwasher, oven, coffeemaker, hood, hob, washer, washerdryer |
|
||||
| door_state | Contact | true | This status describes the door state of a home appliance. A status change is either triggered by the user operating the home appliance locally (i.e. opening/closing door) or automatically by the home appliance (i.e. locking the door). | dishwasher, washer, washerdryer, dryer, oven, fridgefreezer |
|
||||
| operation_state | String | true | This status describes the operation state of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hood, hob, coffeemaker |
|
||||
| remote_start_allowance_state | Switch | true | This status indicates whether the remote program start is enabled. This can happen due to a programmatic change (only disabling), or manually by the user changing the flag locally on the home appliance, or automatically after a certain duration - usually in 24 hours. | dishwasher, washer, washerdryer, dryer, oven, hood, coffeemaker |
|
||||
| remote_control_active_state | Switch | true | This status indicates whether the allowance for remote controlling is enabled. | dishwasher, washer, washerdryer, dryer, oven, hood, hob |
|
||||
| active_program_state | String | true | This status describes the active program of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hood, hob, coffeemaker |
|
||||
| selected_program_state | String | false | This state describes the selected program of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hob, coffeemaker |
|
||||
| remaining_program_time_state | Number:Time | true | This status indicates the remaining program time of the home appliance. | dishwasher, washer, washerdryer, dryer, oven |
|
||||
| elapsed_program_time | Number:Time | true | This status indicates the elapsed program time of the home appliance. | oven |
|
||||
| program_progress_state | Number:Dimensionless | true | This status describes the program progress of the home appliance in percent. | dishwasher, washer, washerdryer, dryer, oven, coffeemaker |
|
||||
| duration | Number:Time | true | This status describes the duration of the program of the home appliance. | oven |
|
||||
| oven_current_cavity_temperature | Number:Temperature | true | This status describes the current cavity temperature of the home appliance. | oven |
|
||||
| setpoint_temperature | Number:Temperature | false | This status describes the setpoint/target temperature of the home appliance. | oven |
|
||||
| laundry_care_washer_temperature | String | false | This status describes the temperature of the washing program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_spin_speed | String | false | This status defines the spin speed of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_idos1_level | String | false | This status defines the i-Dos 1 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
|
||||
| laundry_care_washer_idos2_level | String | false | This status defines the i-Dos 2 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
|
||||
| laundry_care_washer_idos1 | Switch | true | This status indicates whether i-Dos 1 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
|
||||
| laundry_care_washer_idos2 | Switch | true | This status indicates whether i-Dos 2 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
|
||||
| laundry_care_washer_vario_perfect | String | true | This status defines the vario perfect mode of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_less_ironing | Switch | true | This status indicates whether less ironing is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_pre_wash | Switch | true | This status indicates whether the pre-wash is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_rinse_plus | String | true | This status defines the number of additional rinses of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_rinse_hold | Switch | true | This status indicates whether the spin function is deactivated for a washer program of the home appliance (washing will remain in the water after the last rinse cycle). | washer, washerdryer |
|
||||
| laundry_care_washer_soak | Switch | true | This status indicates whether the soaking is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_load_recommendation | Number:Mass | true | This channel indicates the maximum laundry load recommended for a program of the home appliance. | washer, washerdryer |
|
||||
| program_energy | Number:Dimensionless | true | This channel provides the estimated energy required in percentage for a program of the home appliance. | washer, washerdryer |
|
||||
| program_water | Number:Dimensionless | true | This channel provides the estimated water required in percentage for a program of the home appliance. | washer, washerdryer |
|
||||
| dryer_drying_target | String | false | This status defines the desired dryness of a program of the home appliance. | dryer, washerdryer |
|
||||
| setpoint_temperature_refrigerator | Number:Temperature | false | Target temperature of the refrigerator compartment (range depends on appliance - common range 2 to 8°C). | fridgefreezer |
|
||||
| setpoint_temperature_freezer | Number:Temperature | false | Target temperature of the freezer compartment (range depends on appliance - common range -16 to -24°C). | fridgefreezer |
|
||||
| super_mode_refrigerator | Switch | false | The setting has no impact on setpoint temperatures but will make the fridge compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the HA because of a timeout. | fridgefreezer |
|
||||
| super_mode_freezer | Switch | false | This setting has no impact on setpoint temperatures but will make the freezer compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the home appliance because of a timeout. | fridgefreezer |
|
||||
| coffeemaker_drip_tray_full_state | Switch | true | Is coffee maker drip tray full? | coffeemaker |
|
||||
| coffeemaker_water_tank_empty_state | Switch | true | Is coffee maker water tank empty? | coffeemaker |
|
||||
| coffeemaker_bean_container_empty_state | Switch | true | Is coffee maker bean container empty? | coffeemaker |
|
||||
| hood_venting_level | String | true | This option defines the required fan setting of the hood. | hood |
|
||||
| hood_intensive_level | String | true | This option defines the intensive setting of the hood. | hood |
|
||||
| hood_program_state | String | false | Adds hood controller actions to the appliance. The following commands are supported: `stop`, `venting1`, `venting2`, `venting3`, `venting4`, `venting5`, `ventingIntensive1`, `ventingIntensive1`, `automatic` and `delayed`. Furthermore it is possible to send raw (Home Connect JSON payload) to the home appliance. | hood |
|
||||
| basic_actions_state | String | false | Adds basic controller actions to the appliance. The following basic commands are supported: `start` (start current selected program), `stop` (stop current program) and `selected` (show current program information). Furthermore it is possible to send raw (Home Connect JSON payload) to the home appliance. | dishwasher, oven, washer, washerdryer, dryer, coffeemaker |
|
||||
| functional_light_state | Switch | false | This setting describes the current functional light state of the home appliance. | hood |
|
||||
| functional_light_brightness_state | Dimmer | false | This setting describes the brightness state of the functional light. | hood |
|
||||
| ambient_light_state | Switch | false | This setting describes the current ambient light state of the home appliance. | dishwasher, hood |
|
||||
| ambient_light_brightness_state | Dimmer | false | This setting describes the brightness state of the ambient light. _INFO: Please note that the brightness can't be set if the ambient light color is set to `CustomColor`._ | dishwasher, hood |
|
||||
| ambient_light_color_state | String | false | This setting describes the current ambient light color state of the home appliance. | dishwasher, hood |
|
||||
| ambient_light_custom_color_state | Color | false | This setting describes the custom color state of the ambient light. HSB color commands are supported as well as hex color string e.g. `#11ff00`. _INFO: Please note that the brightness can't be set._ | dishwasher, hood |
|
||||
| Channel Type ID | Item Type | Read only | Description | Available on Thing |
|
||||
|-----------------------------------------|----------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
|
||||
| power_state | Switch | false | This setting describes the current power state of the home appliance. | dishwasher, oven, coffeemaker, hood, hob, washer, washerdryer |
|
||||
| door_state | Contact | true | This status describes the door state of a home appliance. A status change is either triggered by the user operating the home appliance locally (i.e. opening/closing door) or automatically by the home appliance (i.e. locking the door). | dishwasher, washer, washerdryer, dryer, oven, fridgefreezer |
|
||||
| operation_state | String | true | This status describes the operation state of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hood, hob, coffeemaker, cleaningrobot |
|
||||
| remote_start_allowance_state | Switch | true | This status indicates whether the remote program start is enabled. This can happen due to a programmatic change (only disabling), or manually by the user changing the flag locally on the home appliance, or automatically after a certain duration - usually in 24 hours. | dishwasher, washer, washerdryer, dryer, oven, hood, coffeemaker |
|
||||
| remote_control_active_state | Switch | true | This status indicates whether the allowance for remote controlling is enabled. | dishwasher, washer, washerdryer, dryer, oven, hood, hob |
|
||||
| active_program_state | String | true | This status describes the active program of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hood, hob, coffeemaker, cleaningrobot |
|
||||
| selected_program_state | String | false | This state describes the selected program of the home appliance. | dishwasher, washer, washerdryer, dryer, oven, hob, coffeemaker, cleaningrobot |
|
||||
| remaining_program_time_state | Number:Time | true | This status indicates the remaining program time of the home appliance. | dishwasher, washer, washerdryer, dryer, oven |
|
||||
| elapsed_program_time | Number:Time | true | This status indicates the elapsed program time of the home appliance. | oven |
|
||||
| program_progress_state | Number:Dimensionless | true | This status describes the program progress of the home appliance in percent. | dishwasher, washer, washerdryer, dryer, oven, coffeemaker, cleaningrobot |
|
||||
| duration | Number:Time | true | This status describes the duration of the program of the home appliance. | oven |
|
||||
| oven_current_cavity_temperature | Number:Temperature | true | This status describes the current cavity temperature of the home appliance. | oven |
|
||||
| setpoint_temperature | Number:Temperature | false | This status describes the setpoint/target temperature of the home appliance. | oven |
|
||||
| laundry_care_washer_temperature | String | false | This status describes the temperature of the washing program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_spin_speed | String | false | This status defines the spin speed of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_idos1_level | String | false | This status defines the i-Dos 1 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
|
||||
| laundry_care_washer_idos2_level | String | false | This status defines the i-Dos 2 dosing level of a washer program of the home appliance (if appliance supports i-Dos). | washer |
|
||||
| laundry_care_washer_idos1 | Switch | true | This status indicates whether i-Dos 1 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
|
||||
| laundry_care_washer_idos2 | Switch | true | This status indicates whether i-Dos 2 is activated for a washer program of the home appliance. (If appliance supports i-Dos) | washer |
|
||||
| laundry_care_washer_vario_perfect | String | true | This status defines the vario perfect mode of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_less_ironing | Switch | true | This status indicates whether less ironing is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_pre_wash | Switch | true | This status indicates whether the pre-wash is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_rinse_plus | String | true | This status defines the number of additional rinses of a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_rinse_hold | Switch | true | This status indicates whether the spin function is deactivated for a washer program of the home appliance (washing will remain in the water after the last rinse cycle). | washer, washerdryer |
|
||||
| laundry_care_washer_soak | Switch | true | This status indicates whether the soaking is activated for a washer program of the home appliance. | washer, washerdryer |
|
||||
| laundry_care_washer_load_recommendation | Number:Mass | true | This channel indicates the maximum laundry load recommended for a program of the home appliance. | washer, washerdryer |
|
||||
| program_energy | Number:Dimensionless | true | This channel provides the estimated energy required in percentage for a program of the home appliance. | washer, washerdryer |
|
||||
| program_water | Number:Dimensionless | true | This channel provides the estimated water required in percentage for a program of the home appliance. | washer, washerdryer |
|
||||
| dryer_drying_target | String | false | This status defines the desired dryness of a program of the home appliance. | dryer, washerdryer |
|
||||
| setpoint_temperature_refrigerator | Number:Temperature | false | Target temperature of the refrigerator compartment (range depends on appliance - common range 2 to 8°C). | fridgefreezer |
|
||||
| setpoint_temperature_freezer | Number:Temperature | false | Target temperature of the freezer compartment (range depends on appliance - common range -16 to -24°C). | fridgefreezer |
|
||||
| super_mode_refrigerator | Switch | false | The setting has no impact on setpoint temperatures but will make the fridge compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the HA because of a timeout. | fridgefreezer |
|
||||
| super_mode_freezer | Switch | false | This setting has no impact on setpoint temperatures but will make the freezer compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the home appliance because of a timeout. | fridgefreezer |
|
||||
| coffeemaker_drip_tray_full_state | Switch | true | Is coffee maker drip tray full? | coffeemaker |
|
||||
| coffeemaker_water_tank_empty_state | Switch | true | Is coffee maker water tank empty? | coffeemaker |
|
||||
| coffeemaker_bean_container_empty_state | Switch | true | Is coffee maker bean container empty? | coffeemaker |
|
||||
| hood_venting_level | String | true | This option defines the required fan setting of the hood. | hood |
|
||||
| hood_intensive_level | String | true | This option defines the intensive setting of the hood. | hood |
|
||||
| hood_program_state | String | false | Adds hood controller actions to the appliance. The following commands are supported: `stop`, `venting1`, `venting2`, `venting3`, `venting4`, `venting5`, `ventingIntensive1`, `ventingIntensive1`, `automatic` and `delayed`. Furthermore it is possible to send raw (Home Connect JSON payload) to the home appliance. | hood |
|
||||
| basic_actions_state | String | false | Adds basic controller actions to the appliance. The following basic commands are supported: `start` (start current selected program), `stop` (stop current program) and `selected` (show current program information). For cleaning robots, additional commands are available: `pause` (pause current program), `resume` (resume paused program), and `gohome` (send robot to charging station). Furthermore it is possible to send raw (Home Connect JSON payload) to the home appliance. | dishwasher, oven, washer, washerdryer, dryer, coffeemaker, cleaningrobot |
|
||||
| functional_light_state | Switch | false | This setting describes the current functional light state of the home appliance. | hood |
|
||||
| functional_light_brightness_state | Dimmer | false | This setting describes the brightness state of the functional light. | hood |
|
||||
| ambient_light_state | Switch | false | This setting describes the current ambient light state of the home appliance. | dishwasher, hood |
|
||||
| ambient_light_brightness_state | Dimmer | false | This setting describes the brightness state of the ambient light. _INFO: Please note that the brightness can't be set if the ambient light color is set to `CustomColor`._ | dishwasher, hood |
|
||||
| ambient_light_color_state | String | false | This setting describes the current ambient light color state of the home appliance. | dishwasher, hood |
|
||||
| ambient_light_custom_color_state | Color | false | This setting describes the custom color state of the ambient light. HSB color commands are supported as well as hex color string e.g. `#11ff00`. _INFO: Please note that the brightness can't be set._ | dishwasher, hood |
|
||||
| battery_level | Number:Dimensionless | true | This status describes the battery level of the home appliance. | cleaningrobot |
|
||||
| cleaning_mode_state | String | false | This setting describes the cleaning mode of the cleaning robot. Possible values: `Silent`, `Standard`, `Power` _(Roxxter series only)_ or `IntelligentMode`, `VacuumOnly`, `MopOnly`, `VacuumAndMop`, `MopAfterVacuum` _(Spotless series only)_. The available options are automatically determined based on the detected device type. | cleaningrobot |
|
||||
| suction_power_state | String | false | This setting describes the suction power of the cleaning robot. Possible values: `Silent`, `Standard`, `Max`. Only available for Spotless series. | cleaningrobot |
|
||||
| water_flow_rate_state | String | true | This setting describes the water flow rate of the cleaning robot. Possible values: `Low`, `Medium`, `High`. Only available for Spotless series. | cleaningrobot |
|
||||
| cleaning_passes_state | String | true | The number of cleaning passes of the cleaning robot. Possible values: `Once`, `Twice`. Only available for Spotless series. | cleaningrobot |
|
||||
| carpet_boost | Switch | true | Indicates whether the carpet boost mode of the cleaning robot is enabled. Only available for Spotless series. | cleaningrobot |
|
||||
| cleaning_speed_state | String | true | The cleaning speed of the cleaning robot. Possible values: `Quick`, `Default`, `Intensive`. Only available for Spotless series. | cleaningrobot |
|
||||
| mop_extension | Switch | true | Indicates whether the mop extension of the cleaning robot is enabled. Only available for Spotless series. | cleaningrobot |
|
||||
| current_map | String | false | The current map of the cleaning robot. Possible values: `TempMap` (Temporary map), `Map1` (User-defined map 1), `Map2` (User-defined map 2), `Map3` (User-defined map 3). _(Roxxter series only)_ | cleaningrobot |
|
||||
|
||||
## Thing Configuration
|
||||
|
||||
@@ -155,6 +165,7 @@ Bridge homeconnect:api_bridge:api_bridge_at_home "Home Connect API" [ clientId="
|
||||
Thing fridgefreezer fridgefreezer1 "Fridge/Freezer" [ haId="BOSCH-HCS06COM1-2140A8821AE7AB" ]
|
||||
Thing hood hood1 "Hood" [ haId="BOSCH-HCS06COM1-2140A8821AE7AB" ]
|
||||
Thing hob hob1 "Hob" [ haId="BOSCH-HCS06COM1-2140A8821AE7AB" ]
|
||||
Thing cleaningrobot cleaningrobot1 "Cleaning Robot" [ haId="BOSCH-HCS06COM1-2140A8821AE7AB" ]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -187,9 +198,9 @@ Number:Time Oven_RemainingProgramTimeState "Remai
|
||||
Number:Dimensionless Oven_ProgramProgressState "Progress State" {channel="homeconnect:oven:api_bridge_at_home:oven1:program_progress_state"}
|
||||
Number:Time Oven_ElapsedProgramTime "Elapsed Program Time" {channel="homeconnect:oven:api_bridge_at_home:oven1:elapsed_program_time"}
|
||||
Number:Time Oven_Duration "Program Duration" {channel="homeconnect:oven:api_bridge_at_home:oven1:duration"}
|
||||
Number:Temperature Oven_CurrentCavityTemperature "Current Temperature" {channel="homeconnect:oven:api_bridge_at_home:oven1:oven_current_cavity_temperature"}
|
||||
Number:Temperature Oven_SetpointTemperature "Set Temperature" {channel="homeconnect:oven:api_bridge_at_home:oven1:setpoint_temperature"}
|
||||
String Oven_BasicActionsState "Basic Control" {channel="homeconnect:oven:api_bridge_at_home:oven1:basic_actions_state"}
|
||||
Number:Temperature Oven_CurrentCavityTemperature "Current Temperature" {channel="homeconnect:oven:api_bridge_at_home:oven1:oven_current_cavity_temperature"}
|
||||
Number:Temperature Oven_SetpointTemperature "Set Temperature" {channel="homeconnect:oven:api_bridge_at_home:oven1:setpoint_temperature"}
|
||||
String Oven_BasicActionsState "Basic Control" {channel="homeconnect:oven:api_bridge_at_home:oven1:basic_actions_state"}
|
||||
|
||||
// washer
|
||||
Switch Washer_PowerState "Power State" {channel="homeconnect:washer:api_bridge_at_home:washer1:power_state"}
|
||||
@@ -201,22 +212,39 @@ String Washer_SelectedProgramState "Selec
|
||||
String Washer_ActiveProgramState "Active Program" {channel="homeconnect:washer:api_bridge_at_home:washer1:active_program_state"}
|
||||
Number:Time Washer_RemainingProgramTimeState "Remaining Program Time" {channel="homeconnect:washer:api_bridge_at_home:washer1:remaining_program_time_state"}
|
||||
Number:Dimensionless Washer_ProgramProgressState "Progress State" {channel="homeconnect:washer:api_bridge_at_home:washer1:program_progress_state"}
|
||||
String Washer_LaundryCareWasherTemperature "Temperature" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_temperature"}
|
||||
String Washer_LaundryCareWasherSpinSpeed "Spin Speed" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_spin_speed"}
|
||||
String Washer_LaundryCareWasherIdos1Level "i-Dos 1 Level" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos1_level"}
|
||||
String Washer_LaundryCareWasherIdos2Level "i-Dos 2 Level" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos2_level"}
|
||||
Switch Washer_LaundryCareWasherIdos1 "i-Dos 1 State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos1"}
|
||||
Switch Washer_LaundryCareWasherIdos2 "i-Dos 2 State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos2"}
|
||||
Switch Washer_LaundryCareWasherVarioPerfect "Vario Perfect State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_vario_perfect"}
|
||||
Switch Washer_LaundryCareWasherLessIroning "Ironing State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_less_ironing"}
|
||||
Switch Washer_LaundryCareWasherPreWash "Prewash State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_pre_wash"}
|
||||
String Washer_LaundryCareWasherRinsePlus "Amount Additional Rinses" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_rinse_plus"}
|
||||
Switch Washer_LaundryCareWasherRinseHold "Spin Hold" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_rinse_hold"}
|
||||
Switch Washer_LaundryCareWasherSoak "Soaking State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_soak"}
|
||||
Number:Mass Washer_LaundryCareWasherLoadRecommendation "Load Recommendation" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_load_recommendation"}
|
||||
Number:Dimensionless Washer_ProgramEnergy "Estimated Energy Consumption" {channel="homeconnect:washer:api_bridge_at_home:washer1:program_energy"}
|
||||
Number:Dimensionless Washer_ProgramWater "Estimated Water Consumption" {channel="homeconnect:washer:api_bridge_at_home:washer1:program_water"}
|
||||
String Washer_BasicActionsState "Basic Control" {channel="homeconnect:washer:api_bridge_at_home:washer1:basic_actions_state"}
|
||||
String Washer_LaundryCareWasherTemperature "Temperature" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_temperature"}
|
||||
String Washer_LaundryCareWasherSpinSpeed "Spin Speed" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_spin_speed"}
|
||||
String Washer_LaundryCareWasherIdos1Level "i-Dos 1 Level" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos1_level"}
|
||||
String Washer_LaundryCareWasherIdos2Level "i-Dos 2 Level" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos2_level"}
|
||||
Switch Washer_LaundryCareWasherIdos1 "i-Dos 1 State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos1"}
|
||||
Switch Washer_LaundryCareWasherIdos2 "i-Dos 2 State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_idos2"}
|
||||
Switch Washer_LaundryCareWasherVarioPerfect "Vario Perfect State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_vario_perfect"}
|
||||
Switch Washer_LaundryCareWasherLessIroning "Ironing State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_less_ironing"}
|
||||
Switch Washer_LaundryCareWasherPreWash "Prewash State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_pre_wash"}
|
||||
String Washer_LaundryCareWasherRinsePlus "Amount Additional Rinses" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_rinse_plus"}
|
||||
Switch Washer_LaundryCareWasherRinseHold "Spin Hold" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_rinse_hold"}
|
||||
Switch Washer_LaundryCareWasherSoak "Soaking State" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_soak"}
|
||||
Number:Mass Washer_LaundryCareWasherLoadRecommendation "Load Recommendation" {channel="homeconnect:washer:api_bridge_at_home:washer1:laundry_care_washer_load_recommendation"}
|
||||
Number:Dimensionless Washer_ProgramEnergy "Estimated Energy Consumption" {channel="homeconnect:washer:api_bridge_at_home:washer1:program_energy"}
|
||||
Number:Dimensionless Washer_ProgramWater "Estimated Water Consumption" {channel="homeconnect:washer:api_bridge_at_home:washer1:program_water"}
|
||||
String Washer_BasicActionsState "Basic Control" {channel="homeconnect:washer:api_bridge_at_home:washer1:basic_actions_state"}
|
||||
|
||||
// cleaning robot
|
||||
Switch CleaningRobot_PowerState "Power State" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:power_state"}
|
||||
String CleaningRobot_OperationState "Operation State" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:operation_state"}
|
||||
String CleaningRobot_ActiveProgramState "Active Program" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:active_program_state"}
|
||||
String CleaningRobot_SelectedProgramState "Selected Program" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:selected_program_state"}
|
||||
String CleaningRobot_BasicActionsState "Program Control" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:basic_actions_state"}
|
||||
String CleaningRobot_CleaningModeState "Cleaning Mode" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:cleaning_mode_state"}
|
||||
String CleaningRobot_SuctionPowerState "Suction Power" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:suction_power_state"}
|
||||
String CleaningRobot_WaterFlowRateState "Water Flow Rate" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:water_flow_rate_state"}
|
||||
String CleaningRobot_CleaningPassesState "Cleaning Passes" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:cleaning_passes_state"}
|
||||
Switch CleaningRobot_CarpetBoost "Carpet Boost" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:carpet_boost"}
|
||||
String CleaningRobot_CleaningSpeedState "Cleaning Speed" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:cleaning_speed_state"}
|
||||
Switch CleaningRobot_MopExtension "Mop Extension" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:mop_extension"}
|
||||
Number:Dimensionless CleaningRobot_ProgramProgressState "Progress State" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:program_progress_state"}
|
||||
String CleaningRobot_CurrentMap "Current Map" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:current_map"}
|
||||
Number:Dimensionless CleaningRobot_BatteryLevel "Battery Level" {channel="homeconnect:cleaningrobot:api_bridge_at_home:cleaningrobot1:battery_level"}
|
||||
|
||||
```
|
||||
|
||||
|
||||
+48
-2
@@ -46,6 +46,7 @@ public class HomeConnectBindingConstants {
|
||||
public static final ThingTypeUID THING_TYPE_COFFEE_MAKER = new ThingTypeUID(BINDING_ID, "coffeemaker");
|
||||
public static final ThingTypeUID THING_TYPE_HOOD = new ThingTypeUID(BINDING_ID, "hood");
|
||||
public static final ThingTypeUID THING_TYPE_COOKTOP = new ThingTypeUID(BINDING_ID, "hob");
|
||||
public static final ThingTypeUID THING_TYPE_CLEANING_ROBOT = new ThingTypeUID(BINDING_ID, "cleaningrobot");
|
||||
|
||||
// Setting
|
||||
public static final String SETTING_POWER_STATE = "BSH.Common.Setting.PowerState";
|
||||
@@ -59,6 +60,7 @@ public class HomeConnectBindingConstants {
|
||||
public static final String SETTING_REFRIGERATOR_SETPOINT_TEMPERATURE = "Refrigeration.FridgeFreezer.Setting.SetpointTemperatureRefrigerator";
|
||||
public static final String SETTING_REFRIGERATOR_SUPER_MODE = "Refrigeration.FridgeFreezer.Setting.SuperModeRefrigerator";
|
||||
public static final String SETTING_FREEZER_SUPER_MODE = "Refrigeration.FridgeFreezer.Setting.SuperModeFreezer";
|
||||
public static final String SETTING_CURRENT_MAP = "ConsumerProducts.CleaningRobot.Setting.CurrentMap";
|
||||
|
||||
// Status
|
||||
public static final String STATUS_DOOR_STATE = "BSH.Common.Status.DoorState";
|
||||
@@ -67,6 +69,7 @@ public class HomeConnectBindingConstants {
|
||||
public static final String STATUS_REMOTE_CONTROL_START_ALLOWED = "BSH.Common.Status.RemoteControlStartAllowed";
|
||||
public static final String STATUS_REMOTE_CONTROL_ACTIVE = "BSH.Common.Status.RemoteControlActive";
|
||||
public static final String STATUS_LOCAL_CONTROL_ACTIVE = "BSH.Common.Status.LocalControlActive";
|
||||
public static final String STATUS_BATTERY_LEVEL = "BSH.Common.Status.BatteryLevel";
|
||||
|
||||
// SSE Event types
|
||||
public static final String EVENT_ELAPSED_PROGRAM_TIME = "BSH.Common.Option.ElapsedProgramTime";
|
||||
@@ -106,6 +109,8 @@ public class HomeConnectBindingConstants {
|
||||
public static final String EVENT_AMBIENT_LIGHT_BRIGHTNESS_STATE = SETTING_AMBIENT_LIGHT_BRIGHTNESS;
|
||||
public static final String EVENT_AMBIENT_LIGHT_COLOR_STATE = SETTING_AMBIENT_LIGHT_COLOR;
|
||||
public static final String EVENT_AMBIENT_LIGHT_CUSTOM_COLOR_STATE = SETTING_AMBIENT_LIGHT_CUSTOM_COLOR;
|
||||
public static final String EVENT_BATTERY_LEVEL = STATUS_BATTERY_LEVEL;
|
||||
public static final String EVENT_CURRENT_MAP = SETTING_CURRENT_MAP;
|
||||
|
||||
// Channel IDs
|
||||
public static final String CHANNEL_DOOR_STATE = "door_state";
|
||||
@@ -155,16 +160,18 @@ public class HomeConnectBindingConstants {
|
||||
public static final String CHANNEL_AMBIENT_LIGHT_BRIGHTNESS_STATE = "ambient_light_brightness_state";
|
||||
public static final String CHANNEL_AMBIENT_LIGHT_COLOR_STATE = "ambient_light_color_state";
|
||||
public static final String CHANNEL_AMBIENT_LIGHT_CUSTOM_COLOR_STATE = "ambient_light_custom_color_state";
|
||||
public static final String CHANNEL_BATTERY_LEVEL = "battery_level";
|
||||
|
||||
// List of all supported devices
|
||||
public static final Set<ThingTypeUID> SUPPORTED_DEVICE_THING_TYPES_UIDS = Set.of(THING_TYPE_API_BRIDGE,
|
||||
THING_TYPE_DISHWASHER, THING_TYPE_OVEN, THING_TYPE_WASHER, THING_TYPE_DRYER, THING_TYPE_WASHER_DRYER,
|
||||
THING_TYPE_FRIDGE_FREEZER, THING_TYPE_COFFEE_MAKER, THING_TYPE_HOOD, THING_TYPE_COOKTOP);
|
||||
THING_TYPE_FRIDGE_FREEZER, THING_TYPE_COFFEE_MAKER, THING_TYPE_HOOD, THING_TYPE_COOKTOP,
|
||||
THING_TYPE_CLEANING_ROBOT);
|
||||
|
||||
// Discoverable devices
|
||||
public static final Set<ThingTypeUID> DISCOVERABLE_DEVICE_THING_TYPES_UIDS = Set.of(THING_TYPE_DISHWASHER,
|
||||
THING_TYPE_OVEN, THING_TYPE_WASHER, THING_TYPE_DRYER, THING_TYPE_WASHER_DRYER, THING_TYPE_FRIDGE_FREEZER,
|
||||
THING_TYPE_COFFEE_MAKER, THING_TYPE_HOOD, THING_TYPE_COOKTOP);
|
||||
THING_TYPE_COFFEE_MAKER, THING_TYPE_HOOD, THING_TYPE_COOKTOP, THING_TYPE_CLEANING_ROBOT);
|
||||
|
||||
// List of state values
|
||||
public static final String STATE_POWER_OFF = "BSH.Common.EnumType.PowerState.Off";
|
||||
@@ -240,6 +247,28 @@ public class HomeConnectBindingConstants {
|
||||
public static final String PROGRAM_HOOD_AUTOMATIC = "Cooking.Common.Program.Hood.Automatic";
|
||||
public static final String PROGRAM_HOOD_VENTING = "Cooking.Common.Program.Hood.Venting";
|
||||
public static final String PROGRAM_HOOD_DELAYED_SHUT_OFF = "Cooking.Common.Program.Hood.DelayedShutOff";
|
||||
public static final String PROGRAM_CLEANING_ROBOT_GO_HOME = "ConsumerProducts.CleaningRobot.Program.Basic.GoHome";
|
||||
public static final String PROGRAM_CLEANING_ROBOT_CLEAN_MAP = "ConsumerProducts.CleaningRobot.Program.Cleaning.CleanMap";
|
||||
|
||||
// Cleaning robot options
|
||||
public static final String OPTION_CLEANING_MODE = "ConsumerProducts.CleaningRobot.Option.CleaningMode";
|
||||
public static final String OPTION_SUCTION_POWER = "ConsumerProducts.CleaningRobot.Option.SuctionPower";
|
||||
public static final String OPTION_WATER_FLOW_RATE = "ConsumerProducts.CleaningRobot.Option.WaterFlowRate";
|
||||
public static final String OPTION_CLEANING_PASSES = "ConsumerProducts.CleaningRobot.Option.CleaningPasses";
|
||||
public static final String OPTION_CARPET_BOOST = "ConsumerProducts.CleaningRobot.Option.CarpetBoostEnabled";
|
||||
public static final String OPTION_CLEANING_SPEED = "ConsumerProducts.CleaningRobot.Option.CleaningSpeed";
|
||||
public static final String OPTION_MOP_EXTENSION = "ConsumerProducts.CleaningRobot.Option.MopExtensionEnabled";
|
||||
|
||||
// Cleaning robot cleaning modes
|
||||
public static final String CLEANING_MODE_PREFIX = "ConsumerProducts.CleaningRobot.EnumType.CleaningMode.";
|
||||
public static final String CLEANING_MODE_SILENT = CLEANING_MODE_PREFIX + "Silent";
|
||||
public static final String CLEANING_MODE_STANDARD = CLEANING_MODE_PREFIX + "Standard";
|
||||
public static final String CLEANING_MODE_POWER = CLEANING_MODE_PREFIX + "Power";
|
||||
public static final String CLEANING_MODE_INTELLIGENT = CLEANING_MODE_PREFIX + "IntelligentMode";
|
||||
public static final String CLEANING_MODE_VACUUM_ONLY = CLEANING_MODE_PREFIX + "VacuumOnly";
|
||||
public static final String CLEANING_MODE_MOP_ONLY = CLEANING_MODE_PREFIX + "MopOnly";
|
||||
public static final String CLEANING_MODE_VACUUM_AND_MOP = CLEANING_MODE_PREFIX + "VacuumAndMop";
|
||||
public static final String CLEANING_MODE_MOP_AFTER_VACUUM = CLEANING_MODE_PREFIX + "MopAfterVacuum";
|
||||
|
||||
// Network and oAuth constants
|
||||
public static final String API_BASE_URL = "https://api.home-connect.com";
|
||||
@@ -272,6 +301,23 @@ public class HomeConnectBindingConstants {
|
||||
public static final String COMMAND_VENTING_INTENSIVE_2 = "ventingIntensive2";
|
||||
public static final String COMMAND_AUTOMATIC = "automatic";
|
||||
public static final String COMMAND_DELAYED_SHUT_OFF = "delayed";
|
||||
public static final String COMMAND_PAUSE = "pause";
|
||||
public static final String COMMAND_RESUME = "resume";
|
||||
public static final String COMMAND_GO_HOME = "gohome";
|
||||
|
||||
// Home Connect API commands
|
||||
public static final String API_COMMAND_PAUSE = "BSH.Common.Command.PauseCommand";
|
||||
public static final String API_COMMAND_RESUME = "BSH.Common.Command.ResumeCommand";
|
||||
|
||||
// Channel IDs (cleaning robot)
|
||||
public static final String CHANNEL_CLEANING_MODE_STATE = "cleaning_mode_state";
|
||||
public static final String CHANNEL_SUCTION_POWER_STATE = "suction_power_state";
|
||||
public static final String CHANNEL_WATER_FLOW_RATE_STATE = "water_flow_rate_state";
|
||||
public static final String CHANNEL_CLEANING_PASSES_STATE = "cleaning_passes_state";
|
||||
public static final String CHANNEL_CARPET_BOOST = "carpet_boost";
|
||||
public static final String CHANNEL_CLEANING_SPEED_STATE = "cleaning_speed_state";
|
||||
public static final String CHANNEL_MOP_EXTENSION = "mop_extension";
|
||||
public static final String CHANNEL_CURRENT_MAP = "current_map";
|
||||
|
||||
// light
|
||||
public static final int BRIGHTNESS_MIN = 10;
|
||||
|
||||
+57
@@ -515,6 +515,48 @@ public class HomeConnectApiClient {
|
||||
return getStatus(haId, STATUS_DOOR_STATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get battery level of device.
|
||||
*
|
||||
* @param haId home appliance id
|
||||
* @return {@link Data}
|
||||
* @throws CommunicationException API communication exception
|
||||
* @throws AuthorizationException oAuth authorization exception
|
||||
* @throws ApplianceOfflineException appliance is not connected to the cloud
|
||||
*/
|
||||
public Data getBatteryLevel(String haId)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
return getStatus(haId, STATUS_BATTERY_LEVEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current map of cleaning robot.
|
||||
*
|
||||
* @param haId home appliance id
|
||||
* @return {@link Data}
|
||||
* @throws CommunicationException API communication exception
|
||||
* @throws AuthorizationException oAuth authorization exception
|
||||
* @throws ApplianceOfflineException appliance is not connected to the cloud
|
||||
*/
|
||||
public Data getCurrentMap(String haId)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
return getSetting(haId, SETTING_CURRENT_MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set current map of cleaning robot.
|
||||
*
|
||||
* @param haId home appliance id
|
||||
* @param map map value (e.g. ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map1)
|
||||
* @throws CommunicationException API communication exception
|
||||
* @throws AuthorizationException oAuth authorization exception
|
||||
* @throws ApplianceOfflineException appliance is not connected to the cloud
|
||||
*/
|
||||
public void setCurrentMap(String haId, String map)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
putSettings(haId, new Data(SETTING_CURRENT_MAP, map, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get operation state of device.
|
||||
*
|
||||
@@ -652,6 +694,21 @@ public class HomeConnectApiClient {
|
||||
sendDelete(haId, BASE_PATH + haId + "/programs/active");
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a command to the active program.
|
||||
*
|
||||
* @param haId home appliance id
|
||||
* @param commandKey the command key (e.g. BSH.Common.Command.PauseCommand)
|
||||
* @throws CommunicationException API communication exception
|
||||
* @throws AuthorizationException oAuth authorization exception
|
||||
* @throws ApplianceOfflineException appliance is not connected to the cloud
|
||||
*/
|
||||
public void putCommand(String haId, String commandKey)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
putData(haId, BASE_PATH + haId + "/commands/" + commandKey, new Data(commandKey, Boolean.TRUE.toString(), null),
|
||||
VALUE_TYPE_BOOLEAN);
|
||||
}
|
||||
|
||||
public List<AvailableProgram> getPrograms(String haId)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
return getAvailablePrograms(haId, BASE_PATH + haId + "/programs");
|
||||
|
||||
+2
@@ -130,6 +130,8 @@ public class HomeConnectDiscoveryService extends AbstractThingHandlerDiscoverySe
|
||||
thingTypeUID = THING_TYPE_COOKTOP;
|
||||
} else if (THING_TYPE_WASHER.getId().equalsIgnoreCase(appliance.getType())) {
|
||||
thingTypeUID = THING_TYPE_WASHER;
|
||||
} else if (THING_TYPE_CLEANING_ROBOT.getId().equalsIgnoreCase(appliance.getType())) {
|
||||
thingTypeUID = THING_TYPE_CLEANING_ROBOT;
|
||||
}
|
||||
|
||||
return thingTypeUID;
|
||||
|
||||
+12
-1
@@ -20,6 +20,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.openhab.binding.homeconnect.internal.handler.HomeConnectBridgeHandler;
|
||||
import org.openhab.binding.homeconnect.internal.handler.HomeConnectCleaningRobotHandler;
|
||||
import org.openhab.binding.homeconnect.internal.handler.HomeConnectCoffeeMakerHandler;
|
||||
import org.openhab.binding.homeconnect.internal.handler.HomeConnectCooktopHandler;
|
||||
import org.openhab.binding.homeconnect.internal.handler.HomeConnectDishwasherHandler;
|
||||
@@ -32,6 +33,8 @@ import org.openhab.binding.homeconnect.internal.handler.HomeConnectWasherHandler
|
||||
import org.openhab.binding.homeconnect.internal.servlet.HomeConnectServlet;
|
||||
import org.openhab.binding.homeconnect.internal.type.HomeConnectDynamicStateDescriptionProvider;
|
||||
import org.openhab.core.auth.client.oauth2.OAuthFactory;
|
||||
import org.openhab.core.i18n.LocaleProvider;
|
||||
import org.openhab.core.i18n.TranslationProvider;
|
||||
import org.openhab.core.io.net.http.HttpClientFactory;
|
||||
import org.openhab.core.thing.Bridge;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@@ -60,19 +63,24 @@ public class HomeConnectHandlerFactory extends BaseThingHandlerFactory {
|
||||
private final OAuthFactory oAuthFactory;
|
||||
private final HomeConnectDynamicStateDescriptionProvider dynamicStateDescriptionProvider;
|
||||
private final HomeConnectServlet homeConnectServlet;
|
||||
private final TranslationProvider i18nProvider;
|
||||
private final LocaleProvider localeProvider;
|
||||
|
||||
@Activate
|
||||
public HomeConnectHandlerFactory(@Reference HttpClientFactory httpClientFactory,
|
||||
@Reference ClientBuilder clientBuilder, @Reference SseEventSourceFactory eventSourceFactory,
|
||||
@Reference OAuthFactory oAuthFactory,
|
||||
@Reference HomeConnectDynamicStateDescriptionProvider dynamicStateDescriptionProvider,
|
||||
@Reference HomeConnectServlet homeConnectServlet) {
|
||||
@Reference HomeConnectServlet homeConnectServlet, @Reference TranslationProvider i18nProvider,
|
||||
@Reference LocaleProvider localeProvider) {
|
||||
this.httpClient = httpClientFactory.getCommonHttpClient();
|
||||
this.clientBuilder = clientBuilder;
|
||||
this.eventSourceFactory = eventSourceFactory;
|
||||
this.oAuthFactory = oAuthFactory;
|
||||
this.dynamicStateDescriptionProvider = dynamicStateDescriptionProvider;
|
||||
this.homeConnectServlet = homeConnectServlet;
|
||||
this.i18nProvider = i18nProvider;
|
||||
this.localeProvider = localeProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,6 +113,9 @@ public class HomeConnectHandlerFactory extends BaseThingHandlerFactory {
|
||||
return new HomeConnectHoodHandler(thing, dynamicStateDescriptionProvider);
|
||||
} else if (THING_TYPE_COOKTOP.equals(thingTypeUID)) {
|
||||
return new HomeConnectCooktopHandler(thing, dynamicStateDescriptionProvider);
|
||||
} else if (THING_TYPE_CLEANING_ROBOT.equals(thingTypeUID)) {
|
||||
return new HomeConnectCleaningRobotHandler(thing, dynamicStateDescriptionProvider, i18nProvider,
|
||||
localeProvider);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
+17
-2
@@ -1008,6 +1008,17 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
|
||||
.ifPresent(channel -> updateState(channel.getUID(), new PercentType(event.getValueAsInt())));
|
||||
}
|
||||
|
||||
protected EventHandler defaultStringEventHandler(String channelId) {
|
||||
return event -> getLinkedChannel(channelId).ifPresent(channel -> {
|
||||
String value = event.getValue();
|
||||
if (value != null) {
|
||||
updateState(channel.getUID(), new StringType(value));
|
||||
} else {
|
||||
updateState(channel.getUID(), UnDefType.UNDEF);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected ChannelUpdateHandler defaultDoorStateChannelUpdateHandler() {
|
||||
return (channelUID, cache) -> updateState(channelUID, cache.putIfAbsentAndGet(channelUID, () -> {
|
||||
Optional<HomeConnectApiClient> apiClient = getApiClient();
|
||||
@@ -1427,13 +1438,17 @@ public abstract class AbstractHomeConnectThingHandler extends BaseThingHandler i
|
||||
Map.of(CHANNEL_WASHER_TEMPERATURE, OPTION_WASHER_TEMPERATURE, CHANNEL_WASHER_SPIN_SPEED,
|
||||
OPTION_WASHER_SPIN_SPEED, CHANNEL_WASHER_IDOS1_LEVEL, OPTION_WASHER_IDOS_1_DOSING_LEVEL,
|
||||
CHANNEL_WASHER_IDOS2_LEVEL, OPTION_WASHER_IDOS_2_DOSING_LEVEL, CHANNEL_DRYER_DRYING_TARGET,
|
||||
OPTION_DRYER_DRYING_TARGET)
|
||||
OPTION_DRYER_DRYING_TARGET, CHANNEL_CLEANING_MODE_STATE, OPTION_CLEANING_MODE,
|
||||
CHANNEL_SUCTION_POWER_STATE, OPTION_SUCTION_POWER, CHANNEL_WATER_FLOW_RATE_STATE,
|
||||
OPTION_WATER_FLOW_RATE, CHANNEL_CLEANING_PASSES_STATE, OPTION_CLEANING_PASSES,
|
||||
CHANNEL_CLEANING_SPEED_STATE, OPTION_CLEANING_SPEED)
|
||||
.forEach((channel, option) -> setStringChannelFromOption(channel, options, option, UnDefType.UNDEF));
|
||||
|
||||
Map.of(CHANNEL_WASHER_IDOS1, OPTION_WASHER_IDOS_1_ACTIVE, CHANNEL_WASHER_IDOS2, OPTION_WASHER_IDOS_2_ACTIVE,
|
||||
CHANNEL_WASHER_LESS_IRONING, OPTION_WASHER_LESS_IRONING, CHANNEL_WASHER_PRE_WASH,
|
||||
OPTION_WASHER_PRE_WASH, CHANNEL_WASHER_SOAK, OPTION_WASHER_SOAK, CHANNEL_WASHER_RINSE_HOLD,
|
||||
OPTION_WASHER_RINSE_HOLD)
|
||||
OPTION_WASHER_RINSE_HOLD, CHANNEL_CARPET_BOOST, OPTION_CARPET_BOOST, CHANNEL_MOP_EXTENSION,
|
||||
OPTION_MOP_EXTENSION)
|
||||
.forEach((channel, option) -> setOnOffChannelFromOption(channel, options, option, OnOffType.OFF));
|
||||
|
||||
setStringChannelFromOption(CHANNEL_HOOD_INTENSIVE_LEVEL, options, OPTION_HOOD_INTENSIVE_LEVEL,
|
||||
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2026 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.homeconnect.internal.handler;
|
||||
|
||||
import static org.openhab.binding.homeconnect.internal.HomeConnectBindingConstants.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeconnect.internal.client.HomeConnectApiClient;
|
||||
import org.openhab.binding.homeconnect.internal.client.exception.ApplianceOfflineException;
|
||||
import org.openhab.binding.homeconnect.internal.client.exception.AuthorizationException;
|
||||
import org.openhab.binding.homeconnect.internal.client.exception.CommunicationException;
|
||||
import org.openhab.binding.homeconnect.internal.client.model.Data;
|
||||
import org.openhab.binding.homeconnect.internal.client.model.Program;
|
||||
import org.openhab.binding.homeconnect.internal.type.HomeConnectDynamicStateDescriptionProvider;
|
||||
import org.openhab.core.i18n.LocaleProvider;
|
||||
import org.openhab.core.i18n.TranslationProvider;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.binding.builder.ThingBuilder;
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openhab.core.types.StateOption;
|
||||
import org.openhab.core.types.UnDefType;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* The {@link HomeConnectCleaningRobotHandler} is responsible for handling commands, which are
|
||||
* sent to one of the channels of a cleaning robot.
|
||||
*
|
||||
* @author Jonas Brüstel - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class HomeConnectCleaningRobotHandler extends AbstractHomeConnectThingHandler {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(HomeConnectCleaningRobotHandler.class);
|
||||
private final TranslationProvider i18nProvider;
|
||||
private final LocaleProvider localeProvider;
|
||||
private final Bundle bundle;
|
||||
|
||||
@Nullable
|
||||
private CleaningRobotType type;
|
||||
|
||||
public HomeConnectCleaningRobotHandler(Thing thing,
|
||||
HomeConnectDynamicStateDescriptionProvider dynamicStateDescriptionProvider,
|
||||
TranslationProvider i18nProvider, LocaleProvider localeProvider) {
|
||||
super(thing, dynamicStateDescriptionProvider);
|
||||
this.i18nProvider = i18nProvider;
|
||||
this.localeProvider = localeProvider;
|
||||
this.bundle = FrameworkUtil.getBundle(getClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshThingStatus() {
|
||||
super.refreshThingStatus();
|
||||
if (updateCleaningRobotType()) {
|
||||
updateCleaningModeStateOptions();
|
||||
updateBasicActionsStateOptions();
|
||||
removeUnsupportedChannels();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureChannelUpdateHandlers(Map<String, ChannelUpdateHandler> handlers) {
|
||||
// register default update handlers
|
||||
handlers.put(CHANNEL_OPERATION_STATE, defaultOperationStateChannelUpdateHandler());
|
||||
handlers.put(CHANNEL_POWER_STATE, defaultPowerStateChannelUpdateHandler());
|
||||
handlers.put(CHANNEL_SELECTED_PROGRAM_STATE, defaultSelectedProgramStateUpdateHandler());
|
||||
handlers.put(CHANNEL_ACTIVE_PROGRAM_STATE, defaultActiveProgramStateUpdateHandler());
|
||||
handlers.put(CHANNEL_BATTERY_LEVEL,
|
||||
(channelUID, cache) -> updateState(channelUID, cache.putIfAbsentAndGet(channelUID, () -> {
|
||||
Optional<HomeConnectApiClient> apiClient = getApiClient();
|
||||
if (apiClient.isPresent()) {
|
||||
Data data = apiClient.get().getBatteryLevel(getThingHaId());
|
||||
if (data.getValue() != null) {
|
||||
return new QuantityType<>(data.getValueAsInt(), Units.PERCENT);
|
||||
} else {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
} else {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
})));
|
||||
handlers.put(CHANNEL_CURRENT_MAP,
|
||||
(channelUID, cache) -> updateState(channelUID, cache.putIfAbsentAndGet(channelUID, () -> {
|
||||
Optional<HomeConnectApiClient> apiClient = getApiClient();
|
||||
if (apiClient.isPresent()) {
|
||||
Data data = apiClient.get().getCurrentMap(getThingHaId());
|
||||
if (data.getValue() != null) {
|
||||
return new StringType(data.getValue());
|
||||
} else {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
} else {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureEventHandlers(Map<String, EventHandler> handlers) {
|
||||
// register default SSE event handlers
|
||||
handlers.put(EVENT_OPERATION_STATE, defaultOperationStateEventHandler());
|
||||
handlers.put(EVENT_SELECTED_PROGRAM, defaultSelectedProgramStateEventHandler());
|
||||
handlers.put(EVENT_POWER_STATE, event -> getLinkedChannel(CHANNEL_POWER_STATE).ifPresent(
|
||||
channel -> updateState(channel.getUID(), OnOffType.from(STATE_POWER_ON.equals(event.getValue())))));
|
||||
handlers.put(EVENT_ACTIVE_PROGRAM, defaultActiveProgramEventHandler());
|
||||
handlers.put(EVENT_PROGRAM_PROGRESS, defaultPercentQuantityTypeEventHandler(CHANNEL_PROGRAM_PROGRESS_STATE));
|
||||
|
||||
// register cleaning robot specific SSE event handlers
|
||||
handlers.put(EVENT_BATTERY_LEVEL, defaultPercentQuantityTypeEventHandler(CHANNEL_BATTERY_LEVEL));
|
||||
handlers.put(EVENT_CURRENT_MAP, defaultStringEventHandler(CHANNEL_CURRENT_MAP));
|
||||
handlers.put(OPTION_CLEANING_MODE, defaultStringEventHandler(CHANNEL_CLEANING_MODE_STATE));
|
||||
handlers.put(OPTION_SUCTION_POWER, defaultStringEventHandler(CHANNEL_SUCTION_POWER_STATE));
|
||||
handlers.put(OPTION_WATER_FLOW_RATE, defaultStringEventHandler(CHANNEL_WATER_FLOW_RATE_STATE));
|
||||
handlers.put(OPTION_CLEANING_PASSES, defaultStringEventHandler(CHANNEL_CLEANING_PASSES_STATE));
|
||||
handlers.put(OPTION_CARPET_BOOST, defaultBooleanEventHandler(CHANNEL_CARPET_BOOST));
|
||||
handlers.put(OPTION_CLEANING_SPEED, defaultStringEventHandler(CHANNEL_CLEANING_SPEED_STATE));
|
||||
handlers.put(OPTION_MOP_EXTENSION, defaultBooleanEventHandler(CHANNEL_MOP_EXTENSION));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleCommand(final ChannelUID channelUID, final Command command,
|
||||
final HomeConnectApiClient apiClient)
|
||||
throws CommunicationException, AuthorizationException, ApplianceOfflineException {
|
||||
String channelId = channelUID.getId();
|
||||
boolean isProgramActive = OPERATION_STATE_RUN.equals(getOperationState());
|
||||
String commandString = command.toFullString();
|
||||
|
||||
if (!(command instanceof StringType && CHANNEL_BASIC_ACTIONS_STATE.equals(channelId))) {
|
||||
super.handleCommand(channelUID, command, apiClient);
|
||||
}
|
||||
|
||||
if (command instanceof StringType && CHANNEL_BASIC_ACTIONS_STATE.equals(channelId)) {
|
||||
updateState(channelUID, UnDefType.NULL);
|
||||
|
||||
if (COMMAND_START.equalsIgnoreCase(commandString)) {
|
||||
Program selectedProgram = apiClient.getSelectedProgram(getThingHaId());
|
||||
if (selectedProgram != null) {
|
||||
apiClient.startProgram(getThingHaId(), selectedProgram.getKey());
|
||||
}
|
||||
} else if (COMMAND_STOP.equalsIgnoreCase(commandString)) {
|
||||
apiClient.stopProgram(getThingHaId());
|
||||
} else if (COMMAND_PAUSE.equalsIgnoreCase(commandString)) {
|
||||
apiClient.putCommand(getThingHaId(), API_COMMAND_PAUSE);
|
||||
} else if (COMMAND_RESUME.equalsIgnoreCase(commandString)) {
|
||||
apiClient.putCommand(getThingHaId(), API_COMMAND_RESUME);
|
||||
} else if (COMMAND_GO_HOME.equalsIgnoreCase(commandString)) {
|
||||
apiClient.startProgram(getThingHaId(), PROGRAM_CLEANING_ROBOT_GO_HOME);
|
||||
}
|
||||
} else if (command instanceof StringType && CHANNEL_CLEANING_MODE_STATE.equals(channelId)) {
|
||||
apiClient.setProgramOptions(getThingHaId(), OPTION_CLEANING_MODE, command.toFullString(), null, false,
|
||||
isProgramActive);
|
||||
} else if (command instanceof StringType && CHANNEL_SUCTION_POWER_STATE.equals(channelId)) {
|
||||
apiClient.setProgramOptions(getThingHaId(), OPTION_SUCTION_POWER, command.toFullString(), null, false,
|
||||
isProgramActive);
|
||||
} else if (command instanceof StringType && CHANNEL_CURRENT_MAP.equals(channelId)) {
|
||||
apiClient.setCurrentMap(getThingHaId(), command.toFullString());
|
||||
}
|
||||
|
||||
handlePowerCommand(channelUID, command, apiClient, STATE_POWER_STANDBY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HomeConnectCleaningRobotHandler [haId: " + getThingHaId() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateSelectedProgramStateDescription() {
|
||||
if (isBridgeOffline() || isThingOffline()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
List<StateOption> stateOptions = getPrograms().stream()
|
||||
.filter(p -> !PROGRAM_CLEANING_ROBOT_GO_HOME.equals(p.getKey()))
|
||||
.map(p -> new StateOption(p.getKey(), mapStringType(p.getKey()))).collect(Collectors.toList());
|
||||
|
||||
getThingChannel(CHANNEL_SELECTED_PROGRAM_STATE).ifPresent(
|
||||
channel -> getDynamicStateDescriptionProvider().setStateOptions(channel.getUID(), stateOptions));
|
||||
} catch (CommunicationException | ApplianceOfflineException | AuthorizationException e) {
|
||||
logger.debug("Could not fetch available programs. thing={}, haId={}, error={}", getThingLabel(),
|
||||
getThingHaId(), e.getMessage());
|
||||
removeSelectedProgramStateDescription();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void resetProgramStateChannels(boolean offline) {
|
||||
super.resetProgramStateChannels(offline);
|
||||
getLinkedChannel(CHANNEL_ACTIVE_PROGRAM_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_PROGRAM_PROGRESS_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
|
||||
if (offline) {
|
||||
getLinkedChannel(CHANNEL_CLEANING_MODE_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_SUCTION_POWER_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_WATER_FLOW_RATE_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_CLEANING_PASSES_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_CARPET_BOOST).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_CLEANING_SPEED_STATE).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
getLinkedChannel(CHANNEL_MOP_EXTENSION).ifPresent(c -> updateState(c.getUID(), UnDefType.UNDEF));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean updateCleaningRobotType() {
|
||||
var previousType = this.type;
|
||||
if (isBridgeOnline() && isThingOnline() && previousType == null) {
|
||||
try {
|
||||
boolean hasCleanMap = getPrograms().stream()
|
||||
.anyMatch(p -> PROGRAM_CLEANING_ROBOT_CLEAN_MAP.equals(p.getKey()));
|
||||
this.type = hasCleanMap ? CleaningRobotType.ROXXTER : CleaningRobotType.SPOTLESS;
|
||||
logger.debug("Detected cleaning robot type: {}. haId={}", this.type, getThingHaId());
|
||||
} catch (CommunicationException | AuthorizationException | ApplianceOfflineException e) {
|
||||
logger.debug("Could not determine cleaning robot type. haId={}, error={}", getThingHaId(),
|
||||
e.getMessage());
|
||||
}
|
||||
}
|
||||
return this.type != previousType;
|
||||
}
|
||||
|
||||
private void updateCleaningModeStateOptions() {
|
||||
var type = this.type;
|
||||
if (type == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String keyPrefix = "channel-type.homeconnect.cleaning_mode_state.state.option.";
|
||||
List<StateOption> options;
|
||||
if (type == CleaningRobotType.ROXXTER) {
|
||||
options = Stream.of(CLEANING_MODE_SILENT, CLEANING_MODE_STANDARD, CLEANING_MODE_POWER)
|
||||
.map(key -> new StateOption(key, translate(keyPrefix + key, mapStringType(key)))).toList();
|
||||
} else {
|
||||
options = Stream
|
||||
.of(CLEANING_MODE_INTELLIGENT, CLEANING_MODE_VACUUM_ONLY, CLEANING_MODE_MOP_ONLY,
|
||||
CLEANING_MODE_VACUUM_AND_MOP, CLEANING_MODE_MOP_AFTER_VACUUM)
|
||||
.map(key -> new StateOption(key, translate(keyPrefix + key, mapStringType(key)))).toList();
|
||||
}
|
||||
|
||||
getThingChannel(CHANNEL_CLEANING_MODE_STATE)
|
||||
.ifPresent(channel -> getDynamicStateDescriptionProvider().setStateOptions(channel.getUID(), options));
|
||||
}
|
||||
|
||||
private void removeUnsupportedChannels() {
|
||||
List<String> channelsToRemove;
|
||||
if (this.type == CleaningRobotType.ROXXTER) {
|
||||
channelsToRemove = List.of(CHANNEL_SUCTION_POWER_STATE, CHANNEL_WATER_FLOW_RATE_STATE,
|
||||
CHANNEL_CLEANING_PASSES_STATE, CHANNEL_CARPET_BOOST, CHANNEL_CLEANING_SPEED_STATE,
|
||||
CHANNEL_MOP_EXTENSION);
|
||||
} else if (this.type == CleaningRobotType.SPOTLESS) {
|
||||
channelsToRemove = List.of(CHANNEL_CURRENT_MAP);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
ThingBuilder thingBuilder = editThing();
|
||||
boolean modified = false;
|
||||
|
||||
for (String channelId : channelsToRemove) {
|
||||
var channel = getThingChannel(channelId);
|
||||
if (channel.isPresent()) {
|
||||
logger.debug("Removing channel {} (not supported by {} series).", channel.get().getUID(), this.type);
|
||||
thingBuilder.withoutChannel(channel.get().getUID());
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
updateThing(thingBuilder.build());
|
||||
}
|
||||
}
|
||||
|
||||
private void updateBasicActionsStateOptions() {
|
||||
String keyPrefix = "channel-type.homeconnect.cleaning_robot_actions_state.state.option.";
|
||||
var baseOptions = List.of(COMMAND_START, COMMAND_STOP, COMMAND_PAUSE, COMMAND_RESUME, COMMAND_GO_HOME);
|
||||
|
||||
var options = new ArrayList<StateOption>();
|
||||
for (String cmd : baseOptions) {
|
||||
options.add(new StateOption(cmd, translate(keyPrefix + cmd, cmd)));
|
||||
}
|
||||
|
||||
getThingChannel(CHANNEL_BASIC_ACTIONS_STATE)
|
||||
.ifPresent(channel -> getDynamicStateDescriptionProvider().setStateOptions(channel.getUID(), options));
|
||||
}
|
||||
|
||||
private String translate(String key, String defaultValue) {
|
||||
String translated = i18nProvider.getText(bundle, key, defaultValue, localeProvider.getLocale());
|
||||
return translated != null ? translated : defaultValue;
|
||||
}
|
||||
|
||||
private enum CleaningRobotType {
|
||||
ROXXTER,
|
||||
SPOTLESS
|
||||
}
|
||||
}
|
||||
+51
@@ -25,6 +25,8 @@ thing-type.homeconnect.washer.label = Washer
|
||||
thing-type.homeconnect.washer.description = Home Connect connected washing machine (e.g. Bosch or Siemens).
|
||||
thing-type.homeconnect.washerdryer.label = Washer Dryer Combination
|
||||
thing-type.homeconnect.washerdryer.description = Home Connect connected combined washer dryer appliance.
|
||||
thing-type.homeconnect.cleaningrobot.label = Cleaning Robot
|
||||
thing-type.homeconnect.cleaningrobot.description = Home Connect connected cleaning robot.
|
||||
|
||||
# thing types config
|
||||
|
||||
@@ -52,6 +54,8 @@ thing-type.config.homeconnect.washer.haId.label = haId
|
||||
thing-type.config.homeconnect.washer.haId.description = Unique identifier representing a specific home appliance.
|
||||
thing-type.config.homeconnect.washerdryer.haId.label = haId
|
||||
thing-type.config.homeconnect.washerdryer.haId.description = Unique identifier representing a specific home appliance.
|
||||
thing-type.config.homeconnect.cleaningrobot.haId.label = haId
|
||||
thing-type.config.homeconnect.cleaningrobot.haId.description = Unique identifier representing a specific home appliance.
|
||||
|
||||
# channel types
|
||||
|
||||
@@ -285,3 +289,50 @@ channel-type.homeconnect.super_mode_freezer.label = Freezer Super Mode
|
||||
channel-type.homeconnect.super_mode_freezer.description = This setting has no impact on setpoint temperatures but will make the freezer compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the home appliance because of a timeout.
|
||||
channel-type.homeconnect.super_mode_refrigerator.label = Refrigerator Super Mode
|
||||
channel-type.homeconnect.super_mode_refrigerator.description = The setting has no impact on setpoint temperatures but will make the fridge compartment cool to the lowest possible temperature until it is disabled manually by the customer or by the HA because of a timeout.
|
||||
channel-type.homeconnect.battery_level.label = Battery Level
|
||||
channel-type.homeconnect.battery_level.description = This status describes the battery level of the home appliance.
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.label = Program Actions
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.state.option.start = Start program
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.state.option.stop = Stop program
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.state.option.pause = Pause program
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.state.option.resume = Resume program
|
||||
channel-type.homeconnect.cleaning_robot_actions_state.state.option.gohome = Go Home
|
||||
channel-type.homeconnect.cleaning_mode_state.label = Cleaning Mode
|
||||
channel-type.homeconnect.cleaning_mode_state.description = The cleaning mode of the cleaning robot.
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Silent = Silent
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Standard = Standard
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Power = Power
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.IntelligentMode = Intelligent Mode
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.VacuumOnly = Vacuum Only
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.MopOnly = Mop Only
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.VacuumAndMop = Vacuum and Mop
|
||||
channel-type.homeconnect.cleaning_mode_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningMode.MopAfterVacuum = Mop after Vacuum
|
||||
channel-type.homeconnect.suction_power_state.label = Suction Power
|
||||
channel-type.homeconnect.suction_power_state.description = The suction power of the cleaning robot (Spotless series only).
|
||||
channel-type.homeconnect.suction_power_state.state.option.ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Silent = Silent
|
||||
channel-type.homeconnect.suction_power_state.state.option.ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Standard = Standard
|
||||
channel-type.homeconnect.suction_power_state.state.option.ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Max = Max
|
||||
channel-type.homeconnect.water_flow_rate_state.label = Water Flow Rate
|
||||
channel-type.homeconnect.water_flow_rate_state.description = The water flow rate of the cleaning robot (Spotless series only).
|
||||
channel-type.homeconnect.water_flow_rate_state.state.option.ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.Low = Low
|
||||
channel-type.homeconnect.water_flow_rate_state.state.option.ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.Medium = Medium
|
||||
channel-type.homeconnect.water_flow_rate_state.state.option.ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.High = High
|
||||
channel-type.homeconnect.cleaning_passes_state.label = Cleaning Passes
|
||||
channel-type.homeconnect.cleaning_passes_state.description = The number of cleaning passes of the cleaning robot (Spotless series only).
|
||||
channel-type.homeconnect.cleaning_passes_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningPasses.Once = Once
|
||||
channel-type.homeconnect.cleaning_passes_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleaningPasses.Twice = Twice
|
||||
channel-type.homeconnect.carpet_boost.label = Carpet Boost
|
||||
channel-type.homeconnect.carpet_boost.description = Indicates whether the carpet boost mode of the cleaning robot is enabled (Spotless series only).
|
||||
channel-type.homeconnect.cleaning_speed_state.label = Cleaning Speed
|
||||
channel-type.homeconnect.cleaning_speed_state.description = The cleaning speed of the cleaning robot (Spotless series only).
|
||||
channel-type.homeconnect.cleaning_speed_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Quick = Quick
|
||||
channel-type.homeconnect.cleaning_speed_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Default = Default
|
||||
channel-type.homeconnect.cleaning_speed_state.state.option.ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Intensive = Intensive
|
||||
channel-type.homeconnect.mop_extension.label = Mop Extension
|
||||
channel-type.homeconnect.mop_extension.description = Indicates whether the mop extension of the cleaning robot is enabled (Spotless series only).
|
||||
channel-type.homeconnect.current_map.label = Current Map
|
||||
channel-type.homeconnect.current_map.description = The current map of the cleaning robot.
|
||||
channel-type.homeconnect.current_map.state.option.ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.TempMap = Temporary map
|
||||
channel-type.homeconnect.current_map.state.option.ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map1 = User-defined map 1
|
||||
channel-type.homeconnect.current_map.state.option.ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map2 = User-defined map 2
|
||||
channel-type.homeconnect.current_map.state.option.ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map3 = User-defined map 3
|
||||
|
||||
+176
@@ -330,6 +330,40 @@
|
||||
</config-description>
|
||||
</thing-type>
|
||||
|
||||
<!-- Cleaning Robot -->
|
||||
<thing-type id="cleaningrobot">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="api_bridge"/>
|
||||
</supported-bridge-type-refs>
|
||||
<label>Cleaning Robot</label>
|
||||
<description>Home Connect connected cleaning robot.</description>
|
||||
<semantic-equipment-tag>CleaningRobot</semantic-equipment-tag>
|
||||
<channels>
|
||||
<channel id="power_state" typeId="system.power"/>
|
||||
<channel id="operation_state" typeId="operation_state"/>
|
||||
<channel id="active_program_state" typeId="active_program_state"/>
|
||||
<channel id="selected_program_state" typeId="selected_program_state"/>
|
||||
<channel id="basic_actions_state" typeId="cleaning_robot_actions_state"/>
|
||||
<channel id="cleaning_mode_state" typeId="cleaning_mode_state"/>
|
||||
<channel id="suction_power_state" typeId="suction_power_state"/>
|
||||
<channel id="water_flow_rate_state" typeId="water_flow_rate_state"/>
|
||||
<channel id="cleaning_passes_state" typeId="cleaning_passes_state"/>
|
||||
<channel id="carpet_boost" typeId="carpet_boost"/>
|
||||
<channel id="cleaning_speed_state" typeId="cleaning_speed_state"/>
|
||||
<channel id="mop_extension" typeId="mop_extension"/>
|
||||
<channel id="program_progress_state" typeId="program_progress_state"/>
|
||||
<channel id="current_map" typeId="current_map"/>
|
||||
<channel id="battery_level" typeId="battery_level"/>
|
||||
</channels>
|
||||
<representation-property>haId</representation-property>
|
||||
<config-description>
|
||||
<parameter name="haId" type="text" required="true">
|
||||
<label>haId</label>
|
||||
<description>Unique identifier representing a specific home appliance.</description>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</thing-type>
|
||||
|
||||
<!-- Channel types -->
|
||||
<channel-type id="basic_actions_state">
|
||||
<item-type>String</item-type>
|
||||
@@ -949,4 +983,146 @@
|
||||
</tags>
|
||||
<state readOnly="false"/>
|
||||
</channel-type>
|
||||
<channel-type id="battery_level">
|
||||
<item-type>Number:Dimensionless</item-type>
|
||||
<label>Battery Level</label>
|
||||
<description>This status describes the battery level of the home appliance.</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
<tag>Energy</tag>
|
||||
</tags>
|
||||
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
|
||||
</channel-type>
|
||||
<channel-type id="cleaning_robot_actions_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Program Actions</label>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Mode</tag>
|
||||
</tags>
|
||||
<state>
|
||||
<options>
|
||||
<option value="start">Start program</option>
|
||||
<option value="stop">Stop program</option>
|
||||
<option value="pause">Pause program</option>
|
||||
<option value="resume">Resume program</option>
|
||||
<option value="gohome">Go Home</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="cleaning_mode_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Cleaning Mode</label>
|
||||
<description>The cleaning mode of the cleaning robot.</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Mode</tag>
|
||||
</tags>
|
||||
<state>
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Silent">Silent</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Standard">Standard</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.Power">Power</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.IntelligentMode">Intelligent Mode</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.VacuumOnly">Vacuum Only</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.MopOnly">Mop Only</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.VacuumAndMop">Vacuum and Mop</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningMode.MopAfterVacuum">Mop after Vacuum</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="suction_power_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Suction Power</label>
|
||||
<description>The suction power of the cleaning robot (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Mode</tag>
|
||||
</tags>
|
||||
<state>
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Silent">Silent</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Standard">Standard</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.SuctionPower.Max">Max</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="water_flow_rate_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Water Flow Rate</label>
|
||||
<description>The water flow rate of the cleaning robot (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
</tags>
|
||||
<state readOnly="true">
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.Low">Low</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.Medium">Medium</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.WaterFlowRate.High">High</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="cleaning_passes_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Cleaning Passes</label>
|
||||
<description>The number of cleaning passes of the cleaning robot (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
</tags>
|
||||
<state readOnly="true">
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningPasses.Once">Once</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleaningPasses.Twice">Twice</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="carpet_boost">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Carpet Boost</label>
|
||||
<description>Indicates whether the carpet boost mode of the cleaning robot is enabled (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
</tags>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="cleaning_speed_state">
|
||||
<item-type>String</item-type>
|
||||
<label>Cleaning Speed</label>
|
||||
<description>The cleaning speed of the cleaning robot (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
</tags>
|
||||
<state readOnly="true">
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Quick">Quick</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Default">Default</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.CleanSpeed.Intensive">Intensive</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="mop_extension">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Mop Extension</label>
|
||||
<description>Indicates whether the mop extension of the cleaning robot is enabled (Spotless series only).</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
</tags>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="current_map">
|
||||
<item-type>String</item-type>
|
||||
<label>Current Map</label>
|
||||
<description>The current map of the cleaning robot.</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
</tags>
|
||||
<state>
|
||||
<options>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.TempMap">Temporary map</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map1">User-defined map 1</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map2">User-defined map 2</option>
|
||||
<option value="ConsumerProducts.CleaningRobot.EnumType.AvailableMaps.Map3">User-defined map 3</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
</thing:thing-descriptions>
|
||||
|
||||
Reference in New Issue
Block a user