iRobot 9xx on openHAB

Hi,

which paltform you run on? Please, take a look here which ones are supported.

Greetings,

Alexander

I’m running on raspbian (albeit the docker version of openhab) so ARMv7. Your last update seems to have changed things a bit, now when starting or trying a discovery I just get this error. Unfortunately it seems that the discovery service won’t work then but the bundle itself shows active (as well as jts-core 1.18.1 and OpenPnP OpenCV 4.5.1.2). Is there maybe an update for the Google Json Library for Java that I need? here are my versions for that and the core google Java libraries:

27 │ Active │  80 │ 2.8.2.v20180104-1110    │ Gson: Google Json Library for Java
28 │ Active │  80 │ 27.1.0.jre              │ Guava: Google Core Libraries for Java
2021-03-21 14:48:31.889 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NoSuchMethodError: 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)'
	at org.openhab.binding.irobot.internal.discovery.IRobotDiscoveryService.lambda$0(IRobotDiscoveryService.java:114) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Hello @falkena
I’m running on OH S2271, but your new snapshot cannot connect:

2021-03-23 20:07:08.768 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'irobot:roomba:D0C5D38E4EF0' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-03-23 20:07:09.401 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'irobot:roomba:D0C5D38E4EF0' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-03-23 20:07:09.404 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'irobot:roomba:D0C5D38E4EF0' changed from INITIALIZING to UNKNOWN
2021-03-23 20:07:10.406 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'irobot:roomba:D0C5D38E4EF0' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Receive timed out

What’s really curious, binding find two new things now, but both cannot connect:

2021-03-23 20:10:45.809 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'irobot:roomba:D0C5D38E4EF0' to inbox.
2021-03-23 20:12:43.187 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'irobot:roomba:192_168_0_44' to inbox.

I just got a Braava M6, if i can help you out any please let me no

Hello everybody,

there is small update available. Change - Log:

  1. (Hopefully) Fix trigger for map generation
  2. Fix map rendering issue

@ tardismechanic: You need at least S2270 snapshot.
@davesen Please, check, if app is connected with roomba. IRobot allowes single MQTT connection only and app connects via mqtt if within same network. If no, please try to restart openhab: Sometime, openhab get ghost things. I “fix” the problem, that i remove roomba instance from thing file, restart openhab. And if openhab is started, add the roomba instance back to the things file.

seems to be the discovery from new binding and

old discovery.
@alacard Thanks! The first step would be, to check, if discovery and password fetch work for M6. Then i would need the JSON from robot: There is a channel for. I think, that common stuff, like network, language and so on shall work out of the box. Map visualisation will not work now. But i think, this issue is not a huge problem.

Kind regrads,

Alexander.

Hope this what you needed
afterPasswordDiscovery.txt (60.9 KB) beforePasswordDiscovery.log (2.1 KB)

P.S. both auto discovery and password discovery works, could not find a way to get the raw json from bundle so used “Roomba980-Python” to get it

Sorry, I saw that earlier but it didn’t click that you meant openhab snapshot build. I think I thought you meant a snapshot version of the opencv library or something. Switching to the openhab snapshot build of course fixed the issue and it’s working fine now. Thanks!

1 Like

Hi all,
I am very excited that I found this by accident.
I am running OH3.0.1, Roomba 960, i could download the binding plus jts-core plus OpenPNP and I could setup a thing that I see after a start the batterystatus and phase saying charing… so far so good.
But: I could not manage to trigger a control-command. Looking into the “offical” Binding I used the item plus Map … but no reaction with this binding. Any thoughts what I am doing wrong … sadly I do not see any negative response in the log…
THis is really an exciting piece of work - I looking forward to see the first MAP!!!
Thanks for any help / suggestion.

Same problem for me. Status items work, but not control command. When I set a command, connection get lost. Seems to be a wrong command enumeration?
Another question: How can I get map information? Where?

Hello everybody,

ok, let’s dive in. As i wrote above, i haven’t migrate start command with region support introduced here. Are another commands working?

Switch RoombaSearch       { channel="irobot:roomba:Roomba:control#find" }
Switch RoombaAlwaysFinish { channel="irobot:roomba:Roomba:control#always_finish" }
String RoombaCleanPasses  { channel="irobot:roomba:Roomba:control#clean_passes" }
String RoombaLanguage     { channel="irobot:roomba:Roomba:control#language" }
Switch RoombaUploadMap    { channel="irobot:roomba:Roomba:control#upload_map" }

If command was send successfully, then robot shall make a noise. Talk we only about?

String RoombaCommand      { channel="irobot:roomba:Roomba:control#command" }

Map can be found in mission group:

Image       RoombaMissionMap { channel="irobot:roomba:Roomba:mission#map" }

There are a lot of advanced channels. Please, be sure to activate the check box to seems them.

@alacard Thanks for JSON :slight_smile: It helped a lot. Binding have a channel for:

String RoombaJSON  "Roomba JSON [%s]" { channel="irobot:roomba:Roomba:state#json" }

every change will be logged in events.log file

Greetings,
Alexander

Danke!
Thanks for your fast reply- I will try it out ASAP

Hi!
When switching control#find to ON no sound comes up and after ~10seconds the switch goes back to OFF.
The state#json does not show any messages and while cleaning.
A map is not generated at the of a mission.

Greetings - Michael

Hello! I am very happy that the binding found a new maintainer. I simply don’t have time for it, i moved on to other projects

I use the “original” binding, coming with openHAB 3.1.0 Build #2271.

When I trigger command from Stop to Clean, nothing happens, here the log:

2021-03-27 14:13:15.854 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RoombaKommando' received command clean
2021-03-27 14:13:15.858 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RoombaKommando' predicted to become clean
2021-03-27 14:13:15.861 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKommando' changed from stop to clean
==> /var/log/openhab2/openhab.log <==
2021-03-27 14:13:20.958 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.44'. Next attempt in 5000ms
2021-03-27 14:13:20.978 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.44' with clientid 3167031442422570
==> /var/log/openhab2/events.log <==
2021-03-27 14:13:22.732 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKommando' changed from clean to stop

Changed to latest GitHub version Fix map generation trigger as well rendering. · falkena/binaries@d18b530 · GitHub and now it works.
Command and map.

Only problem is, that there is always a disconnect after a command:

2021-03-27 15:06:47.842 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RoombaKommando' received command clean
2021-03-27 15:06:47.843 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RoombaKommando' predicted to become clean
2021-03-27 15:06:47.844 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKommando' changed from dock to clean
2021-03-27 15:06:49.103 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKarte' changed from raw type (image/png): 3750 bytes to UNDEF
2021-03-27 15:06:49.104 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaZustand' changed from charge to run
2021-03-27 15:06:49.109 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaReinigungAktiv' changed from OFF to ON
2021-03-27 15:07:01.069 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaDockingstation' changed from ON to OFF
2021-03-27 15:07:02.100 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaDockingstation' changed from OFF to ON
2021-03-27 15:07:04.963 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'RoombaKommando' received command dock
2021-03-27 15:07:04.964 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'RoombaKommando' predicted to become dock
2021-03-27 15:07:04.965 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKommando' changed from clean to dock
2021-03-27 15:07:06.038 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKommando' changed from dock to stop
2021-03-27 15:07:06.038 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaZustand' changed from run to stop
2021-03-27 15:07:07.192 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaKarte' changed from UNDEF to raw type (image/png): 2795 bytes
2021-03-27 15:07:07.193 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'RoombaZustand' changed from stop to hmUsrDock
==> /var/log/openhab2/openhab.log <==
2021-03-27 15:07:17.128 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.0.44'. Next attempt in 10000ms
2021-03-27 15:07:17.133 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.0.44' with clientid 3167031442422570

Thanks

Hi!

I still have the

Thing ‘irobot:roomba:staubinator’ changed from ONLINE (CONFIGURATION_PENDING): Robot authentication is successful to ONLINE

message - but blid and password are correct.
I can not send a command …

Any idea?

Hi,

just to make the things clear: I don’t maintaine the binding. I simply share my work with the community. The “offical” binding is broken since openHAB 3.1.0 build #2269 (at least as far i observed it).

@davesen Strange, i see no disconnect on my I7. I haven’t implement the dock “short cut” properly now. It seems, that, first “stop” command shall be send and only then “dock”. May be another models interpret “dock” without “stop” bevore as error and cut the connection.

Greetings,

Alexander.

Can you tell me what’s broken there ?

Hi,

yes: iRobot 9xx on openHAB - #239 by falkena

There was a bugfix in mqtt, that breaks command send. I refactored massively the handler and discovery. Additionally, the password fetching was fixed, that it works now for 980, I-Series and Braava M-Series:

May be it’s of interest: openhab-addons/bundles/org.openhab.binding.irobot at feature/irobot · falkena/openhab-addons · GitHub

EDIT: I’ve integrated the fix by @J-N-K for [iRobot] Make thing ID persistent · Issue #10116 · openhab/openhab-addons · GitHub into my fork too. It was merged into GitHub - J-N-K/openhab-addons: The next-generation open Home Automation Bus (openHAB) only.

Greetings,

Alexander

I bought a Roomba 697 recently. The binding works but it’s not sending the commands to the roomba.
I also turned all my devices in airplane mode, except the OpenHAB server. I’ve rebooted the Roomba several times, but it does not work. I really hope OpenHAB works with the 697 model of the Roomba.
(Also I hope I’m here in the right thread.)

Thank you in advance!