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

Room / Zone Cleaning #10

Open
gorzan14 opened this issue Jul 16, 2020 · 3 comments
Open

Room / Zone Cleaning #10

gorzan14 opened this issue Jul 16, 2020 · 3 comments

Comments

@gorzan14
Copy link

We would like to see this feature implemented. Neato-homebridge plugin does have it. Would be nice to call Siri to clean kitchen.

@gorzan14
Copy link
Author

@nicoh88 would it be possible to implement Rooms?

@CarlAmbroselli
Copy link

I just checked https://github.com/nicoh88/node-kobold/blob/master/lib/robot.js, seems like this feature needs to be implemented upstream first.

This is how you can get a list of all maps:

Request:
GET https://beehive.ksecosys.com/users/me/robots/<robot_id>/persistent_maps

Response:
[
  {
    "id": "2020-01-01T12:34:56Z", # <-- this is what we are looking for
    "name": "<name_of_the_floor_map",
    "url": "<url>",
    "raw_floor_map_url": "<url>",
    "url_valid_for_seconds": 300
  }
]

We can then use the id to get all rooms (boundaries):

POST https://nucleo.ksecosys.com:4443/vendors/vorwerk/robots/<robot_id>/messages
{
  "reqId": "1",
  "cmd": "getMapBoundaries",
  "params": {
    "mapId": "2020-01-01T12:34:56Z" # <-- Insert ID here
  }
}

Response:
{
	"version": 1,
	"reqId": "1",
	"result": "ok",
	"data": {
		"boundaries": [{
			"id": "<id>",
			"type": "polygon",
			"vertices": [
				[0.4816, 0.258],
				[0.6539, 0.258],
				[0.6539, 0.5068],
				[0.4816, 0.5068]
			],
			"name": "Flur",
			"color": "#CF3464",
			"enabled": true
		}, {
			"id": "<id2>",
			"type": "polyline",
			"vertices": [
				[0.7712, 0.4176],
				[0.8118, 0.4198]
			],
			"name": "Line 2",
			"color": "#D0021B",
			"enabled": true
		}, {
			"id": "<id3>",
			"type": "polyline",
			"vertices": [
				[0.5581, 0.573],
				[0.5591, 0.6557]
			],
			"name": "Line 1",
			"color": "#D0021B",
			"enabled": true
		}, {
			"id": "<id5>",
			"type": "polygon",
			"vertices": [
				[0.185, 0.2625],
				[0.4949, 0.2625],
				[0.4949, 0.7233],
				[0.185, 0.7233]
			],
			"name": "Wohnzimmer",
			"color": "#8B1A9A",
			"enabled": true
		}, {
			"id": "<id6>",
			"type": "polygon",
			"vertices": [
				[0.6412, 0.2459],
				[0.8216, 0.2459],
				[0.8216, 0.742],
				[0.6412, 0.742]
			],
			"name": "Schlafzimmer",
			"color": "#9F9557",
			"enabled": true
		}, {
			"id": "<id7>",
			"type": "polygon",
			"vertices": [
				[0.5107, 0.496],
				[0.639, 0.496],
				[0.639, 0.6517],
				[0.5107, 0.6517]
			],
			"name": "Bad",
			"color": "#009A3C",
			"enabled": true
		}]
	}
}

We can then use one of these IDs of polygons (the other IDs are the no-go lines):

POST https://nucleo.ksecosys.com:4443/vendors/vorwerk/robots/<robot_id>/messages
{
	"reqId": "1",
	"params": {
		"boundaryId": "<boundary_id_from_previous_request>",
		"navigationMode": 1,
		"mode": 2,
		"category": 4
	},
	"cmd": "startCleaning"
}

I think you also need to supply a date somewhere, but I haven't had the time now to figure this out.

@himbeles
Copy link

himbeles commented Dec 13, 2020

I have created a new fork of naofireblade's most recent homebridge-neato, merged with the oAuth authentication mechanism from this package.

The interaction with the Vorwerk Server is handled by the underlying node-kobold-control module, based on a fork of Pmant's most recent node-botvac, merged with the oAuth authentication mechanism from nicoh88's node-kobold.

Like naofireblade's package, it has support for zones and no-go lines.
I have published it as a new package homebridge-kobold on npm for now, but I'd be happy to help merge the changes here via pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants