What about a mqtt vacuum cleaner.
Old roombas can be fitted with an esp8266 mqtt to roomba interface.
I’m open to working on this.
I took a look at this briefly this weekend, doesn’t look like it will be too hard. I think the config would need to specify at a minimum:
- Supported features (I found the following enumerated in the code already: TURN_ON, TURN_OFF, PAUSE, STOP, RETURN_HOME, FAN_SPEED, BATTERY, STATUS, SEND_COMMAND, LOCATE, CLEAN_SPOT, MAP).
- MQTT state topic
- MQTT command topic
- Name / Friendly Name
Anything else I’m missing?
You might also want to specify things like command and status payload templates, but I’m hesitant to include that in the first version. It’d be nice if the mqtt vacuum implementations running on the vacuums all handled the payloads in the same way.
Sounds like it would do.
Started on this here: https://github.com/johnboiles/home-assistant/blob/mqtt-vacuum/homeassistant/components/vacuum/mqtt.py
Patches / critiques / ideas welcome! Code is a bit messy. Sending commands works, but receiving state isn’t fully wired up yet.
This is what I’m thinking for the protocol:
basic commands
default MQTT topic: /vacuum/command
possible MQTT payloads:
turn_on
turn_off
toggle
stop
clean_spot
locate
return_to_base
status updates
default MQTT topic: /vacuum/state
example MQTT payload (json – all keys optional)
{"battery_level": 99, "state": "docked/cleaning/stopped", "cleaned_area": 45, "fan_speed": 50}
Here’s my work in progress firmware I’m building against. Currently works with my MQTT vacuum implementation.
I think sending a clean while it is cleaning, and a “go to dock” while it is cleaning will make the roomba stop. You can use the detection of the current level to decide what to send - should an extra clean be sent to stop the roomba before making a go to dock.
This way it will respond as expected.
@woodster you’re correct and that’s definitely the plan; I just haven’t fully implemented anything to keep track of the Roomba’s state in the firmware yet. I’ve been focusing on getting the Home Assistant code shipped then I want to work more on the firmware.