Integrating Ecovacs Deebot D900 with OpenHAB2: A Step-by-Step Guide

I recently decided to integrate my Ecovacs Deebot D900 vacuum cleaner into my OpenHAB2 setup, and I must say, it was quite an exciting journey! While there were some initial hurdles, especially with the older ‘sucks’ library not working with newer Deebot models, I managed to find a workaround using the ‘ozmo’ library. Here’s how I did it, in case anyone else wants to give it a try!

1. Installing the Required Library

First off, I installed the ‘ozmo’ library, which is a fork of the ‘sucks’ library and supports newer Deebot models. This was done using pip3:
bash
pip3 install ozmo

I also cloned the GitHub repository for reference:
GitHub

2. Setting Up the Ozmo Configuration

Next, I ran the ozmo login command to configure my Deebot. This step is crucial as it fetches the necessary credentials and device information required for communication.

3. Installing the Exec Binding

To execute Python scripts from OpenHAB, I installed the Exec binding. This allows OpenHAB to run custom scripts that interact with the Deebot.

4. Creating Python Scripts

I created two Python scripts, deebot_clean.py and deebot_charge.py, to handle the ‘Clean’ and ‘Charge’ commands respectively. These scripts use the ‘ozmo’ library to connect to the Deebot and execute the desired actions.

5. Configuring OpenHAB Items and Rules

I added the necessary items to my OpenHAB configuration to represent the Deebot’s status and commands. I also set up a rule to trigger the appropriate actions based on user input.

6. Setting Up the Sitemap

Finally, I integrated the Deebot controls into my OpenHAB sitemap, making it easy to start or stop the vacuum cleaner directly from the interface.

Conclusion

This integration has been a game-changer for me, allowing me to control my Deebot seamlessly through OpenHAB. While the process required some trial and error, the end result is well worth the effort. If you’re looking to automate your home further, I highly recommend giving this a try!

Happy automating! :rocket: