Closed FrankBlackMG closed 3 years ago
Same issue on my 980
I recently updated the dorita980
dependency to pull in some new devices and various fixes. Can you update and try again? If that doesn't work can you check the MagicMirror logs for any additional information?
I recently updated the
dorita980
dependency to pull in some new devices and various fixes. Can you update and try again? If that doesn't work can you check the MagicMirror logs for any additional information?
Thanks for the update, but it's still stuck on "Loading..." under the header for me. I did a fresh MMM-Roomba install from the beginning, re-checked my un, pw, and ip (still correct). Still stuck on "Loading..."
I can get Dorita commands to work like starting my Roomba through MM. How/what logs would you need to see to further troubleshoot?
MagicMirror manages the logs for all plugins. Depending how you start MagicMirror you'll access the logs in different ways
pm2
you should be able to access them via pm2 logs mm
npm run start
the logs should be right there in standard outI have a Roomba 976 and im also stuck at loading... I have doubled checked username, pw and ip and tried to run the fix: "ROBOT_CIPHERS=AES128-SHA npm start" but doesn't seem to fix the problem. Help would be very appriciated
@ChristianThingKnudsen are you able to locate the logs for the module?
@relm923 Yes. But the only thing I can see in the log when running in dev mode is the: "Starting module: MMM-Roomba". I also placed a console.log(self) in the getDom() function. This function looks like it's only being called once and retruns an object where the property loaded is false
I can improve the error logging in the future but for now can you try adding
self.sendSocketNotification(
'ERROR',
`Failed to connect to robot. IP: ${ipAddress}. Error: ${err}`
);
here - https://github.com/relm923/MMM-Roomba/blob/master/node_helper.js#L73
Thank you @relm923 for the suggestion. Unfortunately it doesn't seem like the function updateStats is getting called when i look in my log
@ChristianThingKnudsen lets first ensure we can talk to your Roomba at all (without MagicMirror)
In the MMM-Roomba
directory create a new file called debug.js
and add:
const Dorita980 = require('dorita980');
// Copied from your config
const username = '__YOUR_USERNAME__';
const password = '__YOUR_PASSWORD__';
const ipAddress = '__YOUR_ADDRESS__';
const test = async () => {
console.log(`Connecting`);
const roomba = new Dorita980.Local(username, password, ipAddress);
console.log(`Fetching Robot State`);
const { name } = await roomba.getRobotState(['name']);
console.log(`Name: ${name}`);
console.log(`Disconnecting`);
roomba.end();
};
test();
then run node debug.js
.
This should print out the name of your Roomba. If that works we can debug MagicMirror. If not we can debug the Roomba
@relm923 I'm stuck on Fetching Robot State. I am also using a homebridge plugin for my roomba, which is using the dorita980 repo. Before i was able to get my username and pw using the npm run getpassword <robotIP>
but now i just get a connection error. So maybe the error is caused by having two instances of dorita980 trying to fetch data from the same robot?
@ChristianThingKnudsen that will likely be the problem. Can you try disabling the Homebridge plugin for a bit to verify?
Unfortunately Roomba doesn't seem to support multiple connections to a robot at the same time. My module attempts to work around this by only connecting (and disconnecting) when it's actively polling for new information. If the Homebridge plugin maintains a constant connection nothing else will be able to ping the robot
Homebridge seems to be the issue, so you are welcome to close this issue
Hey :-) I got the same problem, but no homebridge! I startet your debu.js an get the following message:
Connecting Fetching Robot State /home/pi/MagicMirror/modules/MMM-Roomba/node_modules/dorita980/lib/v2/local.js:33 throw e; ^
Error: Connection refused: Not authorized at MqttClient._handleConnack (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/mqtt/lib/client.js:920:15) at MqttClient._handlePacket (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/mqtt/lib/client.js:350:12) at work (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/mqtt/lib/client.js:292:12) at Writable.writable._write (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/mqtt/lib/client.js:302:5) at doWrite (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/readable-stream/lib/_stream_writable.js:428:64) at writeOrBuffer (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/readable-stream/lib/_stream_writable.js:417:5) at Writable.write (/home/pi/MagicMirror/modules/MMM-Roomba/node_modules/readable-stream/lib/_stream_writable.js:334:11) at TLSSocket.ondata (node:internal/streams/readable:754:22) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at TLSSocket.Readable.push (node:internal/streams/readable:228:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) { code: 5
ahhh with the blid as USername i get:
Connecting Fetching Robot State Name: Roomba Disconnecting
But at the display still "Loading"
I was able to successfully retrieve the BLID and Password from my 960 but any other operations return nothing e.g. retrieving battery percentage or weekly schedule. The module just displays loading forever. In fact, my Pi Zero eventually needs to be rebooted. Any debugging suggestions?