rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

[Bug] MQTT command "return_home" does not work #224

Closed Luncher91 closed 4 years ago

Luncher91 commented 4 years ago

Describe the bug

I got Version 0.9.2 and got MQTT working but the return_home command does not trigger the vacuum. Start, Pause and Stop are working just fine.

How to Reproduce

send "return_home" to the command topic

Expected behavior

The vaccum starts to go to the dock.

Screenshots

Vacuum Model: S5

Valetudo Version: Valetudo RE 0.9.2

User-Agent

Additional context

Maybe i got something configured not quite right. Here is my config:

{
  "spots": [],
  "areas": [],
  "ztimers": [],
  "mqtt": {
    "enabled": true,
    "identifier": "rockrobo",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.178.210",
    "provideMapData": false,
    "caPath": ""
  },
  "dummycloud": {
    "spoofedIP": "203.0.113.1",
    "bindIP": "127.0.0.1"
  },
  "webInterface": {
    "localization": "en",
    "style": "dark",
    "hideMapReload": true
  },
  "httpAuth": {
    "enabled": false,
    "username": "valetudo",
    "password": "valetudo"
  },
  "telegramBot": {
    "enabled": false,
    "token": "",
    "password": "",
    "host": "",
    "proxy": "",
    "clients": [],
    "sendConsumables": true,
    "sendConsumablesEvery": false
  },
  "allowSSHKeyUpload": true,
  "map_upload_host": "http://127.0.0.1"
}

MQTT Topic: homeassistant/vacuum/valetudo_rockrobo/config

{
    "name": "rockrobo",
    "unique_id": "rockrobo",
    "schema": "state",
    "supported_features": [
        "start",
        "pause",
        "stop",
        "return_home",
        "battery",
        "status",
        "locate",
        "clean_spot",
        "fan_speed",
        "send_command"
    ],
    "command_topic": "valetudo/rockrobo/command",
    "state_topic": "valetudo/rockrobo/state",
    "set_fan_speed_topic": "valetudo/rockrobo/set_fan_speed",
    "fan_speed_list": [
        "min",
        "medium",
        "high",
        "max",
        "mop"
    ],
    "send_command_topic": "valetudo/rockrobo/custom_command",
    "json_attributes_topic": "valetudo/rockrobo/attributes"
}
rand256 commented 4 years ago

That's because command is "return_to_base".

rand256 commented 4 years ago

Probably it should understand both versions though.

Luncher91 commented 4 years ago

Thank you, that worked :-) Now I only need to figure out how to send commands which are not part of the "supported_features" in Openhab.

Can you fix the supported_features list?

"return_home" does not work for me.

rand256 commented 4 years ago

That was once "fixed" but that broke something in other automation systems, so it was reverted. I'm not using any HA-like system myself so... As I said, looks it would be simpler to just add return_home as an alias to return_to_base. Or maybe someone confident with different automations would suggest a better approach.

Luncher91 commented 4 years ago

Okay, thank you very much. I did not found that information :-)