steedferns / homebridge-roomba980

Roomba 980 support for Homebridge
Apache License 2.0
11 stars 1 forks source link

Roomba 980 firmware 2.0.0-34 breaks the https API #2

Open twentworth12 opened 7 years ago

twentworth12 commented 7 years ago

The Roomba 980 now uses mqtt not https:. See https://github.com/koalazak/dorita980/issues/10.

steedferns commented 7 years ago

I'll work on changing everything to local this weekend

nitaybz commented 7 years ago

I did the change... feel free to pull my pull request :)

IngmarStein commented 7 years ago

@nitaybz we were doing the same thin in parallel :) Does your PR work without subscribing to the 'connect' event?

nitaybz commented 7 years ago

Yes... I actually didn't change much of it. Mostly turning everything to local and change the first function from getStatus to getMission...

IngmarStein commented 7 years ago

But you're not calling end() on the dorita980 object, so I guess this will block the mobile app from using the local API as well (it resorts to a cloud connection), right?

nitaybz commented 7 years ago

Well I'm not 100%... but I guess you are right... maybe you can take mine a step futrher and I'll use yours :)

nitaybz commented 7 years ago

@steedferns I tried your new version but it's not controlling the Roomba... the status is fine but I cannot start cleaning with the ON switch, it just keeps loading...

steedferns commented 7 years ago

I'm having the same problem. Dorita980 is not working as expected. I'm still working on it.

marcodesantis71 commented 7 years ago

Same problem here

koalazak commented 7 years ago

Im taking a look at your code. If you call .end() method, then you need to reconnect to send new commands, that means you need to call again new dorita980.Local(this.blid, this.robotpwd, this.robotIP); and wait for the on.connect event before send new commands.

I dont know why iRobot limit the number of connections to one ¬¬ it is a pain in the ass :p

steedferns commented 7 years ago

@koalazak

If I run this code, it never closes the connection and the program doesn't finish. Is that correct?

` var dorita980 = require('dorita980');

var myRobotViaLocal = new dorita980.Local('id', 'password', '192.168.2.49'); // robot IP address

myRobotViaLocal.on('connect', function () { // start! myRobotViaLocal.start().then(() => { myRobotViaLocal.end(); // disconnect to leave free the channel for the mobile app. }).catch((err) => { console.log(err); }); }); `

IngmarStein commented 7 years ago

The current HEAD should at least work once, but for me, it seems like the connect event is never fired.

koalazak commented 7 years ago

@steedferns in that code you are ending the connection, the connection is closed but the program doesnt finish cos a bug fixed in 3.0.6.

steedferns commented 7 years ago

Ok, upgrading to 3.0.6 fixed my test script.

Homekit makes multiple requests for status, on, off etc. The code needs to be revised because subsequent calls are being rejected. mqtt is only allowing 1 connection at a time. We need the cloud api back!

nitaybz commented 7 years ago

so should I update to the new version or wait until dorita980 will be updated again?

steedferns commented 7 years ago

I'm still working on it.

steedferns commented 7 years ago

It's working now. However, there is a problem if you have >1 irobot 980 on the same network. (I have 2)

The second one does not respond correctly to commands. I don't know why.

ifongie commented 7 years ago

I've not been able to connect to my Roomba for the last week. It was working before. Tried to reinstall Homebridge and reinstall the plugin but nothing works. Other accessory in Homebridge is working fine.

Roomba is displaying "No Response" in Home app. Homebridge console says "Initializing Roomba980 accessory...", but nothing after that.

Anybody having the same issue?

BTW, Roomba is connected to the network and I could still control Roomba from its own app. So nothing wrong with its connection :)