iRobot 9xx on openHAB

@Sonic I’ve installed your binding yesterday and just wanted to say thanks for your efforts and let you know it’s working fine with my 980.
Earlier-on the log got a bit spammed with connection issues when my roomba ran out of battery, but that was with my first tentative setup. Roomba recharged binding reinstalled everything looking good.

Hi. I’m happy to see a dedicated binding for iRobot instead of some API calls as workaround. Kudos for this!
Do you have work in progress for making the binding compatible with OH3?
Would be ready to test the binding on OH3 with a Roomba 960.

Give me your email in a PM and i’ll send you a .jar for v3. It builds and even works, and i am currently struggling with submitting it to official repository.

2 Likes

i just got a i7 and love it so far but want to integrate it in to openhab to be able to auto turn on/off my smart light for a room when it enters or leave. i have a some what of a idea about doing this but ran in to a small (big?) problem im using @Sonic plugin/addon but for the life of me cant figure out how to get infromation about what room the roomba is in.

Doing a little digging on the mod/addon that its based on it seems that you can get that info from the roomba (Selective (Room Based) Cleaning · Issue #80 · NickWaterton/Roomba980-Python · GitHub) it seems that its in a “array” called “regions”

“regions”: [{“region_id”: “25”, “region_name”: “kitchy”, “region_type”: “custom”, “type”: “rid”}]

but for the life of me cant figure out how to pull that array to get the information i need. Any one mind pointing me in the right direction?

Thanks @Sonic for providing the OH3-compatible binding. I confirm that everything is working fine now with a Roomba 960. I had some issues loading the binding but the problem was between the keyboard and the chair (forgot to give read permissions on the jar for the group).

I just figured out, at least for OH3, you have to install the mqtt binding, else you will see an error:
Unresolved requirement: Import-Package: com.hivemq.client.mqtt; ...

Hello! I own 970, it doesn’t have this kind of navigation, so sorry, i cannot support that at least momentatily.
There has also been request from @nodnarb regarding similar thing, i remember this but sorry guys i can’t promise anything within near future. I am very busy with other things and such a remote debugging, when you ask a user to check for something, while not having the hardware handy, is a very tedious and slow process.

Known issue. On v2 too. Will likely dissolve when the binding goes upstream.

1 Like

Thanks @Sonic for writing this binding. I just installed it on OH2 and my 980 was found and works well. Its way less complicated than my previous exec binding and IFTTT maker solution. If only all bindings were this easy to get working :slight_smile:

Hi @Sonic, I have been testing a Roomba e5 with your binding in OH3 since a couple of weeks ago. In the beginning everything worked fine, but now the robot does not respond to commands. The read-only parameters are however correctly read out.
In your documentation you state that only a single connection can be made to the MQTT server of the robot.
My question is, how can I disable the MQTT connection from the iPhone app of Roomba?
I have also set logging for the binding to DEBUG, but the only messages I see are these:

2020-10-23 09:04:14.400 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Starting broadcast for /192.168.1.255

2020-10-23 09:04:14.405 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Received reply from 192.168.1.96

2020-10-23 09:05:15.407 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Starting broadcast for /172.17.255.255

2020-10-23 09:05:16.409 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Starting broadcast for /192.168.1.255

2020-10-23 09:05:16.423 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Received reply from 192.168.1.96

2020-10-23 09:05:17.424 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Starting broadcast for /192.168.1.255

2020-10-23 09:06:18.425 [DEBUG] [bot.discovery.IRobotDiscoveryService] - Starting broadcast for /172.17.255.255

Hope you can help trying to figure out why commands are now not working anymore.
Thanks!

Are you sure read-only parameters are correctly read ? Perhaps they are just reporting old values, from the last successful communication time.
Sporadically during testing the robot just stops talking to me. Happened twice. The cure is to reboot it. I don’t know the origin of the problem, it looks like there are some firmware bugs. Try to reboot your Roomba
From your log i see no attempts to re-establish the connection either. Perhaps it’s some OpebHAB 3’s internal instability. Don’t forget it’s in beta state. Personally i also had problems with changing Thing state, disable-enable the Thing helped.

Awesome work! will this binding work with mqtt binding v1 or does it require v2?

Actually it doesn’t care about mqtt binding version because it uses HiveMQ client directly. It has only been reported to require mqtt binding installed because of some dependency resolution quirks. This is unintentional and i have no idea how to fix it.

Just an update from my side with testing the binding in OH3, using the label cell with ‘action: command options’.
Commands are now working again.
The reason it failed before is that I listed the commands starting with capital letters.
They should be all small, then its working.

component: oh-label-cell

config:
item: iRobotWallE_Command
title: Command
action: options
actionItem: iRobotWallE_Command
actionOptions: clean,pause,stop,spot,dock
icon: f7:command

I wonder is it standard practice for openhab or not? Since it has caused difficulties for you, in fact, i could use case-insensitive matching for strings.

To be honest I don’t know what is standard practice.
But to me it sounds like a nice improvement if commands would be accepted case insensitive.
Thanks!

Someone is getting this same error when try to start irobot binding?

You have to install the mqtt binding first and then the problem will be solved.

1 Like

Can I do that manually since my binding tabs are missing in the paperUI?
and the “simple mode” is turned off.

You can add the binding into the addons.cfg file:
vi $OPENHAB_CONF/services/addons.cfg

Add the binding name “mqtt” in the binding list, e.g.
binding = knx,hue,km200,netatmo,sonos,icalendar,astro,ntp,samsungtv,unifi,hpprinter,airquality,mqtt

But you can also do it from the console. You will find all information here: https://www.openhab.org/docs/configuration/addons.html

Thank you for helping me out,

By just adding the mqtt in the binding list, i am installing it?
And my binding list is completely empty in the addons file and many binding I previously installed via paperUI are still active and working. How is that possible?