Close

Quick update

A project log for Old Roomba, new tricks

Add mapping & MQTT-interfacing with ESP8266 and an IMU

simon-jansenSimon Jansen 08/21/2022 at 18:440 Comments

Out of office replies are great, no?

The roomba should have this too. I added "availability" to the button actions. See the buttons grey out? 

Also added more tunes 8-)

Docked:

Because of all the previous work, it was quite easy to add an event-trigger on "state-change" with callback in the library. Then add a function to check whether an action should be available or not, depending on the state of the roomba, and post this via MQTT. Add this availability to the MQTT-autodiscover, et voila! All latest files are uploaded:

https://hackaday.io/project/183524-controll-yer-roomba-600-series-with-esp8266#menu-files

I'm not sure how to display states in Home Assistant though. Should this be a sensor with a numeric value and templating to display it's corresponding state in text? 

Or a "select" without the ability to actually select? 

https://www.home-assistant.io/docs/mqtt/discovery/

If someone has any brilliant ideas, don't be shy.

I have decided how I want to handle the logging, correction and mapping of the positioning data:

On a seperate Pi (or the same, but outside of the HA-virtual enviroment) I will create a python script that runs as a service / daemon. This will subscribe to various MQTT-topics to check when a cleaning cycle (or callibration script) starts and ends. To start with, it will log (raw) sensordata to files. I can use these files to correct my positioning algorithms. 

Later on, I will have this piece of software do loop closing / resolving and the creation of map-images. 

These images can be posted with MQTT as "camera" to display the latest map. 

Discussions