Right now I’m just wondering what I should use. I already got Rest980 working, but I’d like to get the amount of possibilities Roomba980-Python offers. Unfortunately it seems hard to setup and I can’t program in Python so I wouldn’t be able to create new functions easily. IFTTT is just to limited for my taste. But both Rest980 and Roomba980-Python aren’t as lightweight as a native MQTT binding.
What is the best option in terms of the factors below?
The amount of possibilties it offers (more is better)
Ease in setting up (easier is better)
Ease in using it (easier is better)
‘Server load’ for lack of a better term (less is better)
may I ask for your START & STOP rule(s)? I got my setup finally fixed - stupid typo in the channel setup - and working, curious to setup rules for home automation.
Thanks, Thomas
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
124
rule "Roomba MainFloor_Roomba_Home_Switch changed to ON"
when
Item MainFloor_Roomba_Home_Switch changed to ON
then
var mqttThing = getThingStatusInfo("mqtt:broker:roomba").getStatus()
if (systemStarted.state != ON && mqttThing.toString() == 'ONLINE') {
// val RuleRoombaActions = getActions("mqtt","mqtt:broker:roomba")
RuleRoombaActions.publishMQTT("cmd", GetCommandJSON.apply("dock"))
logInfo("Roomba", "MainFloor_Roomba_Home_Switch.state is " + MainFloor_Roomba_Home_Switch.state)
logInfo("Roomba", "Requested Roomba to go HOME")
MainFloor_Roomba_Switch.postUpdate(ON)
} else if (systemStarted.state != ON && mqttThing.toString() != 'ONLINE') {
logInfo("Roomba", "mqttThing is " + mqttThing)
logInfo("Roomba", "MainFloor_Roomba_Home_Switch did NOT execute due to mqttThing being OFFLINE.")
MainFloor_Roomba_Home_Switch.postUpdate(OFF)
}
end
rule "Roomba MainFloor_Roomba_Switch changed to ON"
when
Item MainFloor_Roomba_Switch changed to ON
then
var mqttThing = getThingStatusInfo("mqtt:broker:roomba").getStatus()
if (systemStarted.state != ON && mqttThing.toString() == 'ONLINE') {
// val RuleRoombaActions = getActions("mqtt","mqtt:broker:roomba")
RuleRoombaActions.publishMQTT("cmd", GetCommandJSON.apply("start"))
logInfo("Roomba", "MainFloor_Roomba_Switch.state is " + MainFloor_Roomba_Switch.state)
logInfo("Roomba", "Requested Roomba to START")
} else if (systemStarted.state != ON && mqttThing.toString() != 'ONLINE') {
logInfo("Roomba", "mqttThing is " + mqttThing)
logInfo("Roomba", "MainFloor_Roomba_Switch did NOT execute due to mqttThing being OFFLINE.")
MainFloor_Roomba_Switch.postUpdate(OFF)
}
end
rule "Roomba MainFloor_Roomba_Switch changed to OFF"
when
Item MainFloor_Roomba_Switch changed to OFF
then
var mqttThing = getThingStatusInfo("mqtt:broker:roomba").getStatus()
if (systemStarted.state != ON && mqttThing.toString() == 'ONLINE') {
// val RuleRoombaActions = getActions("mqtt","mqtt:broker:roomba")
RuleRoombaActions.publishMQTT("cmd", GetCommandJSON.apply("stop"))
logInfo("Roomba", "MainFloor_Roomba_Switch.state is " + MainFloor_Roomba_Switch.state)
logInfo("Roomba", "Requested Roomba to STOP")
MainFloor_Roomba_Home_Switch.postUpdate(OFF)
} else if (systemStarted.state != ON && mqttThing.toString() != 'ONLINE') {
logInfo("Roomba", "mqttThing is " + mqttThing)
logInfo("Roomba", "MainFloor_Roomba_Switch did NOT execute due to mqttThing being OFFLINE.")
MainFloor_Roomba_Home_Switch.postUpdate(OFF)
}
end
I’m still waiting for more Roomba examples myself from @ falkena.
interesting codes indeed. I tried Dorita980 and Rest980 and I had quite some fun with it. However, I was wondering: did someone succeed in accessing the camera and sensors data? Do you think it will ever be possible to command Roomba movements from Python?
After some updates, seems that I can’t get my roomba back online.
When I check online, seems it has something to do with python3 and SSL?
Any suggestions what I can do?
./getpassword.py -R 192.168.111.26
waiting on port: 5678 for data
found 1 Roomba(s)
Make sure your robot (Anastacia) at IP 192.168.111.26 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.
Press Enter to continue…
Received: {
“robotname”: “Anastacia”,
“sku”: “R960040”,
“nc”: 0,
“ver”: “3”,
“proto”: “mqtt”,
“ip”: “192.168.111.26”,
“hostname”: “Roomba-3164421080308590”,
“sw”: “v2.4.9-96”,
“mac”: “80:C5:F2:DF:69:CC”,
“cap”: {
“pp”: 1,
“multiPass”: 2,
“binFullDetect”: 1,
“ota”: 2,
“maps”: 1,
“pose”: 1,
“eco”: 1,
“langOta”: 1,
“edge”: 1,
“svcConf”: 1
}
}
Roomba (Anastacia) IP address is: 192.168.111.26
Connection Error TLS/SSL connection has been closed (EOF) (_ssl.c:727)
Traceback (most recent call last):
File “./getpassword.py”, line 39, in
main()
File “./getpassword.py”, line 36, in main
Password(arg.roombaIP,file=arg.configfile)
File “/etc/openhab2/scripts/roomba/password.py”, line 39, in init
self.get_password()
File “/etc/openhab2/scripts/roomba/password.py”, line 136, in get_password
wrappedSocket.send(packet)
File “/usr/lib/python2.7/ssl.py”, line 707, in send
v = self._sslobj.write(data)
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:1829)
Hey guys,
My usb died and now I’m trying to set up my system again. I have latest 2.5 release and I’m trying to set up roomba trough MQTT (2). Brooker works fine, I’m receiving wifi status messages and also some state of robot. But I’m not able to start any command. I receiving this message in console: [WARN ] [nhab.binding.mqtt.action.MQTTActions] - MQTT publish to cmd failed!
I seem to be running into the same issue as Yogi is running into. I’ve setup the Roomba with MQTT & Mosquitto on a RPI Zero and I can easily read any MQTT message that comes around. I have the battery and the bin registering and working through BasicUI. That said, I can’t send any command to the Roomba. I get the following in my logs:
2020-01-11 23:17:19.533 [INFO ] [clipse.smarthome.model.script.ROOMBA] - {"command":"cmd","time":1578813439,"initiator":"localApp"}
2020-01-11 23:17:19.713 [WARN ] [nhab.binding.mqtt.action.MQTTActions] - MQTT publish to cmd failed!
2020-01-11 23:17:29.693 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.1.142'. Next attempt in 60000ms
2020-01-11 23:17:29.907 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.1.142' with clientid 3176C01070504730
I’m not sure why it tries to reconnect right after the failure, but it does that consistently. My setup is pretty much a copy/paste of everyone’s setup here. I’ve created a single update rule just to make it work
rule "RoombaStateUpdated"
when
Item RoombaState received update
then
val RoombaActions = getActions("mqtt", "mqtt:broker:roomba")
// Commands: "start", "stop", "pause", "resume", "dock"
val GetCommandJSON = [ String command |
String::format("{\"command\":\"%s\",\"time\":%d,\"initiator\":\"localApp\"}", command, now.millis / 1000)
]
logInfo("ROOMBA", GetCommandJSON.apply("cmd"))
switch(RoombaState.state) {
case 0: RoombaActions.publishMQTT("cmd", GetCommandJSON.apply("start"))
case 1: RoombaActions.publishMQTT("cmd", GetCommandJSON.apply("stop"))
case 2: RoombaActions.publishMQTT("cmd", GetCommandJSON.apply("pause"))
case 3: RoombaActions.publishMQTT("cmd", GetCommandJSON.apply("resume"))
case 4: RoombaActions.publishMQTT("cmd", GetCommandJSON.apply("dock"))
}
end
I’d appreciate any direct help or hints about how I could go about debugging this issue.
Thanks
I used the dorita980 script to check that I can connect to my roomba and it works fine.
However when I try to use mqtt-spy, I simply cannot get it to connect to the roomba.
Has anyone managed to use mqtt-spy to connect to their roomba and can provide the connection properties?
I think, I’m, missing something in the “Security” tab.
I set the “TLS/SSL mode” to “Certificates & keys provided externally” and tried every possible protocol.
However I’m always getting “unable to find valid certificate path to requested target”.
Hi everyone! Would like to notify about my project: https://github.com/Sonic-Amiga/openhab2.roomba
I am unhappy with a need for a dedicated MQTT broker, especially considering that Roomba already contains a built-in one.
Currently the code doesn’t handle any commands yet, but it successfully discovers and connects to the robot. And it is able to automatically retrieve a password, no need for external scripts.
@wertzui Hi! Just read your message. Yes, Roomba uses a custom CA. It depends on your app whether you can connect or not. It should provide for unverified connections, or you’ll have to retrieve the CA cert from the Roomba or its app.
My binding is currently using the former option. See the code.
And be also aware about blid and password. blid is used as both client id and username.
Hello, I got Dorita980 and Rest980 working in a OH 2.5.4 Test with Openhabian and an Roomba 671 with firmware 3.3.47-77
I cant get Roomba980-Python working, to many errors so i will do with the rest980 i got working, but for that i now have to keep a putty session open to the pi that runs the rest980.
I found this link to make it run as a deamon? (I’m not a Linux man) in windows we would say as “a service” has anyone got this working on openhabian? https://community.smartthings.com/t/roomba-980-wifi-connectivity-reverse-engineering/44860/172
Hi! I am here. Didn’t have much time since that because i’ve got some more work for Devi binding. And now i’m too much exhausted due to corona lockdown. I work from home, and get completely exhausted of sitting in front of my computer in the evening. So on hold, sorry.
Pavel,
I tried to install your Roomba binding on openhab2, but I cannot find a .jar file on your github project, only a directory containing the code. Can you please provide me with a org.openhab.binding.vacuum.jar file?
Hi! There’s no .jar file released because the binding is not complete and does not actually do anything yet. It is able to discover the Roomba and establish communication, but does not send any commands.
Sorry, i’m too busy, i have a lot of things to do for my own home, and Roomba is currently not a priority.