forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ecovacs] Add support for new API for fetching cleaning logs (openhab…
…#16524) The existing cleaning logs API is only populated for devices older than the T9/N9 generation; all newer devices use a new API. Since the new API isn't populated for older devices, select the correct API depending on device type. Signed-off-by: Danny Baumann <dannybaumann@web.de>
- Loading branch information
Showing
15 changed files
with
279 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...g/openhab/binding/ecovacs/internal/api/impl/dto/response/portal/PortalCleanLogRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (c) 2010-2024 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.ecovacs.internal.api.impl.dto.response.portal; | ||
|
||
import org.openhab.binding.ecovacs.internal.api.model.CleanMode; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* @author Danny Baumann - Initial contribution | ||
*/ | ||
public class PortalCleanLogRecord { | ||
@SerializedName("ts") | ||
public final long timestamp; | ||
|
||
@SerializedName("last") | ||
public final long duration; | ||
|
||
public final int area; | ||
|
||
public final String id; | ||
|
||
public final String imageUrl; | ||
|
||
public final CleanMode type; | ||
|
||
// more possible fields: | ||
// aiavoid (int), aitypes (list of something), aiopen (int), aq (int), mapName (string), | ||
// sceneName (string), triggerMode (int), powerMopType (int), enablePowerMop (int), cornerDeep (int) | ||
|
||
PortalCleanLogRecord(long timestamp, long duration, int area, String id, String imageUrl, CleanMode type) { | ||
this.timestamp = timestamp; | ||
this.duration = duration; | ||
this.area = area; | ||
this.id = id; | ||
this.imageUrl = imageUrl; | ||
this.type = type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.