New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[romyrobot][WIP] Initial contribution #15738
Open
xeniter
wants to merge
45
commits into
openhab:main
Choose a base branch
from
xeniter:romyrobot-binding
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
862f861
initial commit of skeleton
wzbfyb 622f7d1
defined initial thing types
wzbfyb 24bb8f2
remaining skeleton files
wzbfyb 6cde35a
initial implementation to read most channels
wzbfyb 6ac0bd2
fixed notnull warnings
wzbfyb e493b91
implemented clean all, start, continue, go_home and stop.
wzbfyb a6c72c6
fixed wrong assignement of selected map options
wzbfyb b903ca5
added protocol detection and refactored classname to fit naming
wzbfyb 416d561
spotless + unused import removed
wzbfyb d282015
discovery started
xeniter 131eb0b
added to codeowners + clean up bundles/pom.xml
xeniter 5ab17cb
increased version
xeniter 2d4a59f
wip
xeniter ded9bd2
wip
xeniter eb8914b
wip discovery
xeniter 637d050
wip hostname discovery
xeniter fa082da
wip hostname discovery
xeniter 467440b
initial commit of skeleton
wzbfyb dfcc8f1
defined initial thing types
wzbfyb 313a8a4
initial implementation to read most channels
wzbfyb b5d3584
fixed notnull warnings
wzbfyb 4e32908
implemented clean all, start, continue, go_home and stop.
wzbfyb 4445f14
fixed wrong assignement of selected map options
wzbfyb e4b84fc
added protocol detection and refactored classname to fit naming
wzbfyb 8136c86
spotless + unused import removed
wzbfyb 7a23053
discovery started
xeniter 8e2d4e2
added to codeowners + clean up bundles/pom.xml
xeniter 1b3d767
wip
xeniter 4447c78
wip
xeniter 6df0d86
wip discovery
xeniter 206712b
wip hostname discovery
xeniter 966010e
lock wip
xeniter 58b13d5
old wip
xeniter 8a275d1
correct http request to unlock properly
xeniter ce8395f
cleanup
xeniter 0c0e3c0
adding romy again
xeniter 49c5579
cleanup
xeniter 34523a3
cleanup
xeniter 7013886
wip cleanup
xeniter eaf5715
wip cleanup
xeniter a4b0381
wip cleanup
xeniter 80505de
version readout fixed
xeniter 40da662
codestyle cleanup
xeniter 90df8a0
more checkstyle cleanup
xeniter 9d7de4c
more checkstyle cleanup...
xeniter File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This content is produced and maintained by the openHAB project. | ||
|
||
* Project home: https://www.openhab.org | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/openhab/openhab-addons |
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,95 @@ | ||
# romyRobot Binding | ||
|
||
_Give some details about what this binding is meant for - a protocol, system, specific device._ | ||
|
||
_If possible, provide some resources like pictures (only PNG is supported currently), a video, etc. to give an impression of what can be done with this binding._ | ||
_You can place such resources into a `doc` folder next to this README.md._ | ||
|
||
_Put each sentence in a separate line to improve readability of diffs._ | ||
|
||
## Supported Things | ||
|
||
_Please describe the different supported things / devices including their ThingTypeUID within this section._ | ||
_Which different types are supported, which models were tested etc.?_ | ||
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._ | ||
|
||
- `bridge`: Short description of the Bridge, if any | ||
- `sample`: Short description of the Thing with the ThingTypeUID `sample` | ||
|
||
## Discovery | ||
|
||
_Describe the available auto-discovery features here._ | ||
_Mention for what it works and what needs to be kept in mind when using it._ | ||
|
||
## Binding Configuration | ||
|
||
_If your binding requires or supports general configuration settings, please create a folder ```cfg``` and place the configuration file ```<bindingId>.cfg``` inside it._ | ||
_In this section, you should link to this file and provide some information about the options._ | ||
_The file could e.g. look like:_ | ||
|
||
``` | ||
# Configuration for the romyRobot Binding | ||
# | ||
# Default secret key for the pairing of the romyRobot Thing. | ||
# It has to be between 10-40 (alphanumeric) characters. | ||
# This may be changed by the user for security reasons. | ||
secret=openHABSecret | ||
``` | ||
|
||
_Note that it is planned to generate some part of this based on the information that is available within ```src/main/resources/OH-INF/binding``` of your binding._ | ||
|
||
_If your binding does not offer any generic configurations, you can remove this section completely._ | ||
|
||
## Thing Configuration | ||
|
||
_Describe what is needed to manually configure a thing, either through the UI or via a thing-file._ | ||
_This should be mainly about its mandatory and optional configuration parameters._ | ||
|
||
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._ | ||
|
||
### `sample` Thing Configuration | ||
|
||
| Name | Type | Description | Default | Required | Advanced | | ||
|-----------------|---------|---------------------------------------|---------|----------|----------| | ||
| hostname | text | Hostname or IP address of the device | N/A | yes | no | | ||
| password | text | Password to access the device | N/A | yes | no | | ||
| refreshInterval | integer | Interval the device is polled in sec. | 600 | no | yes | | ||
|
||
## Channels | ||
|
||
_Here you should provide information about available channel types, what their meaning is and how they can be used._ | ||
|
||
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._ | ||
|
||
| Channel | Type | Read/Write | Description | | ||
|---------|--------|------------|-----------------------------| | ||
| control | Switch | RW | This is the control channel | | ||
|
||
## Full Example | ||
|
||
_Provide a full usage example based on textual configuration files._ | ||
_*.things, *.items examples are mandatory as textual configuration is well used by many users._ | ||
_*.sitemap examples are optional._ | ||
|
||
### Thing Configuration | ||
|
||
```java | ||
Example thing configuration goes here. | ||
``` | ||
|
||
### Item Configuration | ||
|
||
```java | ||
Example item configuration goes here. | ||
``` | ||
|
||
### Sitemap Configuration | ||
|
||
```perl | ||
Optional Sitemap configuration goes here. | ||
Remove this section, if not needed. | ||
``` | ||
|
||
## Any custom content here! | ||
|
||
_Feel free to add additional sections for whatever you think should also be mentioned about your binding!_ |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.openhab.addons.bundles</groupId> | ||
<artifactId>org.openhab.addons.reactor.bundles</artifactId> | ||
<version>4.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>org.openhab.binding.romyrobot</artifactId> | ||
|
||
<name>openHAB Add-ons :: Bundles :: RomyRobot Binding</name> | ||
|
||
</project> |
9 changes: 9 additions & 0 deletions
9
bundles/org.openhab.binding.romyrobot/src/main/feature/feature.xml
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<features name="org.openhab.binding.romyrobot-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"> | ||
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository> | ||
|
||
<feature name="openhab-binding-romyrobot" description="romyRobot Binding" version="${project.version}"> | ||
<feature>openhab-runtime-base</feature> | ||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.romyrobot/${project.version}</bundle> | ||
</feature> | ||
</features> |
45 changes: 45 additions & 0 deletions
45
...robot/src/main/java/org/openhab/binding/romyrobot/internal/RomyRobotBindingConstants.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,45 @@ | ||
/** | ||
* Copyright (c) 2010-2023 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.romyrobot.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.openhab.core.thing.ThingTypeUID; | ||
|
||
/** | ||
* The {@link romyRobotBindingConstants} class defines common constants, which are | ||
* used across the whole binding. | ||
* | ||
* @author Bernhard Kreuz - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class RomyRobotBindingConstants { | ||
|
||
private static final String BINDING_ID = "romyrobot"; | ||
|
||
// List of all Thing Type UIDs | ||
public static final ThingTypeUID ROMYROBOT_DEVICE = new ThingTypeUID(BINDING_ID, "aicu"); | ||
|
||
// List of all Channel ids | ||
public static final String CHANNEL_FW_VERSION = "fwversion"; | ||
public static final String CHANNEL_COMMAND = "command"; | ||
public static final String CHANNEL_MODE = "mode"; | ||
public static final String CHANNEL_ACTIVE_PUMP_VOLUME = "activepumpvolume"; | ||
public static final String CHANNEL_STRATEGY = "strategy"; | ||
public static final String CHANNEL_SUCTION_MODE = "suctionmode"; | ||
public static final String CHANNEL_BATTERY = "battery"; | ||
public static final String CHANNEL_CHARGING = "charging"; | ||
public static final String CHANNEL_RSSI = "rssi"; | ||
public static final String CHANNEL_POWER_STATUS = "powerstatus"; | ||
public static final String CHANNEL_SELECTED_MAP = "selectedmap"; | ||
public static final String CHANNEL_AVAILABLE_MAPS_JSON = "availablemapsjson"; | ||
} |
33 changes: 33 additions & 0 deletions
33
...omyrobot/src/main/java/org/openhab/binding/romyrobot/internal/RomyRobotConfiguration.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,33 @@ | ||
/** | ||
* Copyright (c) 2010-2023 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.romyrobot.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* The {@link RomyRobotConfiguration} class contains fields mapping thing configuration parameters. | ||
* | ||
* @author Bernhard Kreuz - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class RomyRobotConfiguration { | ||
|
||
/** | ||
* Sample configuration parameters. Replace with your own. | ||
*/ | ||
public String hostname = ""; | ||
public String password = ""; | ||
public int refreshInterval = 600; | ||
public int port = 8080; | ||
public int timeout = 5; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.