Skip to content
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
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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 May 25, 2023
622f7d1
defined initial thing types
wzbfyb May 25, 2023
24bb8f2
remaining skeleton files
wzbfyb May 25, 2023
6cde35a
initial implementation to read most channels
wzbfyb May 25, 2023
6ac0bd2
fixed notnull warnings
wzbfyb May 25, 2023
e493b91
implemented clean all, start, continue, go_home and stop.
wzbfyb May 26, 2023
a6c72c6
fixed wrong assignement of selected map options
wzbfyb May 26, 2023
b903ca5
added protocol detection and refactored classname to fit naming
wzbfyb May 26, 2023
416d561
spotless + unused import removed
wzbfyb May 26, 2023
d282015
discovery started
xeniter Jun 30, 2023
131eb0b
added to codeowners + clean up bundles/pom.xml
xeniter Sep 7, 2023
5ab17cb
increased version
xeniter Sep 7, 2023
2d4a59f
wip
xeniter Sep 7, 2023
ded9bd2
wip
xeniter Sep 11, 2023
eb8914b
wip discovery
xeniter Sep 18, 2023
637d050
wip hostname discovery
xeniter Sep 18, 2023
fa082da
wip hostname discovery
xeniter Sep 19, 2023
467440b
initial commit of skeleton
wzbfyb May 25, 2023
dfcc8f1
defined initial thing types
wzbfyb May 25, 2023
313a8a4
initial implementation to read most channels
wzbfyb May 25, 2023
b5d3584
fixed notnull warnings
wzbfyb May 25, 2023
4e32908
implemented clean all, start, continue, go_home and stop.
wzbfyb May 26, 2023
4445f14
fixed wrong assignement of selected map options
wzbfyb May 26, 2023
e4b84fc
added protocol detection and refactored classname to fit naming
wzbfyb May 26, 2023
8136c86
spotless + unused import removed
wzbfyb May 26, 2023
7a23053
discovery started
xeniter Jun 30, 2023
8e2d4e2
added to codeowners + clean up bundles/pom.xml
xeniter Sep 7, 2023
1b3d767
wip
xeniter Sep 7, 2023
4447c78
wip
xeniter Sep 11, 2023
6df0d86
wip discovery
xeniter Sep 18, 2023
206712b
wip hostname discovery
xeniter Sep 19, 2023
966010e
lock wip
xeniter Sep 19, 2023
58b13d5
old wip
xeniter Oct 4, 2023
8a275d1
correct http request to unlock properly
xeniter Oct 4, 2023
ce8395f
cleanup
xeniter Oct 4, 2023
0c0e3c0
adding romy again
xeniter Oct 4, 2023
49c5579
cleanup
xeniter Oct 11, 2023
34523a3
cleanup
xeniter Oct 18, 2023
7013886
wip cleanup
xeniter Oct 18, 2023
eaf5715
wip cleanup
xeniter Oct 18, 2023
a4b0381
wip cleanup
xeniter Oct 18, 2023
80505de
version readout fixed
xeniter Nov 2, 2023
40da662
codestyle cleanup
xeniter Nov 3, 2023
90df8a0
more checkstyle cleanup
xeniter Nov 3, 2023
9d7de4c
more checkstyle cleanup...
xeniter Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -294,6 +294,7 @@
/bundles/org.openhab.binding.rme/ @kgoderis
/bundles/org.openhab.binding.robonect/ @reyem
/bundles/org.openhab.binding.roku/ @mlobstein
/bundles/org.openhab.binding.romyrobot/ @wzbfyb @xeniter
/bundles/org.openhab.binding.rotel/ @lolodomo
/bundles/org.openhab.binding.russound/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.sagercaster/ @clinique
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Expand Up @@ -1456,6 +1456,11 @@
<artifactId>org.openhab.binding.roku</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.romyrobot</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.rotel</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.romyrobot/NOTICE
@@ -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
95 changes: 95 additions & 0 deletions bundles/org.openhab.binding.romyrobot/README.md
@@ -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!_
17 changes: 17 additions & 0 deletions bundles/org.openhab.binding.romyrobot/pom.xml
@@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>4.1.0-SNAPSHOT</version>
<version>4.2.0-SNAPSHOT</version>

</parent>

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

<name>openHAB Add-ons :: Bundles :: RomyRobot Binding</name>

</project>
@@ -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>
@@ -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";
}
@@ -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;
}