dorita980: j7+ with version 4 not connecting

Just got the j7+ and have been following the docs closely, however running Local and attempting to connect to my Roomba just hangs until I kill. Running nc -zv <roomba ip> 8883 rejects the connection while my script is running and hanging so I am assuming something is happening but not really resolving?

MacOS Monterey 12.2.1 Node 14.8.1 Dorita980 3.1.11 Roomba J7+ (iRobot app says “Robot Software 1.2.12 Updated February 10, 2022”. )

Running the discovery command yields:

{ ver: '4', hostname: 'iRobot-XXXX', robotname: 'XXXX', robotid: 'XXX', ip: '192.168.1.8', mac: 'XXXX', sw: 'sapphire+1.2.12+Firmware-Production+57', sku: 'XXXX', nc: 0, proto: 'mqtt', cap: { binFullDetect: 2, oMode: 2, odoa: 2, dockComm: 1, edge: 0, maps: 3, pmaps: 5, tLine: 2, area: 1, eco: 1, multiPass: 2, team: 1, pp: 0, lang: 2, '5ghz': 1, prov: 3, sched: 1, svcConf: 1, ota: 2, log: 2, langOta: 0, expectingUserConf: 1 }, cloudConnState: 14 }

My test script:

` const dorita980 = require(“dorita980”); const { blid, password, ip } = require(“./config.json”);

const roombaLocal = new dorita980.Local(blid, password, ip, 2);

roombaLocal.on(“connect”, () => { roombaLocal .getSys() .then((sys) => { console.log(sys); roombaLocal.end(); }) .catch((err) => console.error(err)); }); `

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 17 (3 by maintainers)

Most upvoted comments

I played with it today and I have some discoveries, hopefully somebody will manage to get closer than me.

First I applied PRs: node tls fix, cyphers fix and update of mqtt library. Can somebody help with them? Maybe @koalazak, can we merge them? 😊

Dorita client is managing to get Roomba J7+ into some weird state which causes, that nothing can connect anymore after some amount of tries. After Roomba J7+ reboot everything works normally; I’ll clarify that.

I managed to connect with MQTT Explorer app for MacOS with settings:

  • Protocol: mqtt://
  • Host: my roomba ip
  • Port: 8883
  • Validate Certificate: Disabled
  • Encryption (tls): Enabled
  • Username: my roomba username obtained through the script
  • Password: my roomba password obtained through the script
  • MQTT Client ID (in Advanced - must be set!): my roomba username obtained through the script

With these settings, after reboot of roomba I am able to connect and I can see messages from roomba about battery, signal strength, etc. So I am sure, it’s possible to connect there 😊

Unfortunately did not have same luck with Dorita client library where after vacuum reboot I am getting:

Error: connect ECONNREFUSED 192.168.2.13:8883
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1571:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '192.168.2.13',
  port: 8883
}

Did not find what is error -61. One way which should uncover how to fix it could be using some network sniffer tool like Wireshark or something else. It’s possible to capture traffic from MQTT Explorer, then capture traffic from Dorita library and compare them to find out differences and reasons why it works from one, but not another. Thou it’s almost 6 am here now, so it’s a job for another day … 😊 (actually probably another week/month, I’ll not have time to continue on it soon 😕 ).

hey guys, sorry im late (?) haha

The problem is that I don’t have a j7+ robot to test and troubleshoot this connection issue. You might need to play around with the connection options and certificates. I saw that you tried to upgrade mqtt from 2 to 4, keep in mind that there are breaking changes in error handling. Also, try to maintain compatibility with older versions of node.js and old robots if you are going to send PRs. Thank you!