-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep sleep #3
Comments
I've gotten the following code from Thinking Cleaner. Since their product is now EOL, they have been willing to share their source code.
Unfortunately, I don't have a 650 to test this with. I hope this helps. |
@Apocrathia got any more information ? |
I did it the following way: When Roomba is in dock:
When its not in dock and not cleaning:
But its not working perfectly. The Roomba doesnt go to sleep mode and wastes much power when not in dock. And when the battery got drained, the Arduino is not able to establish a connection until I unplug and replug it. And every few weeks it happens that the Roomba starts cleaning in the middle of the night. I think the "ROOSER.write(143);//DOCK" command was not received then. |
Thanks @AndiTheBest |
Just wanted to say that the current wakeup code works great for the 860 |
Great investigation @Apocrathia. I had also tried to reach out to Thinking Cleaner in the past but wasn't able to get ahold of them. I'm glad you were able to! I'll give this a shot on my 650 |
@Apocrathia did they share their whole source code or just this one bit? |
@johnboiles That was the only snippet that they gave to me when I asked. I simply emailed their thinkingcleanersales@thinkingbits.nl address and asked if they would be willing to share how they accomplished it, as their product is EOL and they can no longer benefit from keeping the source code closed. I'm sure someone could convince them to release the rest of it. |
@AndiTheBest when you're changing |
@Apocrathia's code from Thinking Cleaner definitely causes my Roomba to start cleaning. I'm also super curious what @AndiTheBest's code is working fine so far for me (only about 15 mins of testing at this point though). @AndiTheBest would you mind putting your full code on GitHub or submitting pull requests? You must have made some other changes to track the state of the roomba so that you can switch wakeup methods |
I went ahead and pushed up @AndiTheBest's fix to master. Might be good for some non-650 people to try it since it changes things a bit. You might want to comment out |
Sorry, i don't use the code of this project, as i've implemented my project on my own, using an Arduino Pro Micro with a HC-12 wireless transceiver. Just for infomation again: Every few weeks/months, the Roomba starts cleaning in the middle of the night, as i think it doesnt get the "DOCK" command after the "CLEAN" command (single serial communication fail). This is something that still needs to get prevented, but i didn't had time to play with my roomba the last few months :/ |
It would still be interesting to see your code if you wouldn’t mind sharing! Maybe some other ideas we could learn! |
@AndiTheBest's fix has been working reliably for me for a week or so. I still occasionally have an issue where i need to send the |
I got my first middle-of-the night roomba wake up last night and it sucked. I’m going to put some more effor into figuring out a better solution. |
Is there any update? I am super curious to get this running, but keeping the Roomba awake all the time and risking midnight cleaning does not sound perfect. My main use-case would be to stop the Roomba from cleaning if somebody is at home. One alternative approach I was thinking about: I could use the schedule of the Roomba to initiate cleaning. If I could detect the start quickly enough, I could immediately send a stop command if someone is home. Any comments whether this could be feasible? |
I‘m now thinking about two other workarounds:
|
I disabled the 650 wakeup workaround (because I want to make sure not to get woken up again). diff --git a/src/config.h b/src/config.h
index 9c26860..8c0b18f 100644
--- a/src/config.h
+++ b/src/config.h
@@ -2,10 +2,10 @@
#define HOSTNAME "roomba" // e.g. roomba.local
#define BRC_PIN 14
-#define ROOMBA_650_SLEEP_FIX 1
+//#define ROOMBA_650_SLEEP_FIX 1
#define ADC_VOLTAGE_DIVIDER 44.551316985
//#define ENABLE_ADC_SLEEP
#define MQTT_SERVER "10.0.0.2"
#define MQTT_USER "homeassistant"
diff --git a/src/main.cpp b/src/main.cpp
index 586783c..048d615 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -449,8 +449,7 @@ void loop() {
if (roombaState.docked) {
wakeOnDock();
} else {
- // wakeOffDock();
- wakeup();
+ wakeOffDock();
}
} else {
wakeup(); And it actually still sorta seems to work. I just have to issue the |
But I'm confident that with some experimentation, whatever is causing it to still wake up after issuing the turn_on command twice, could be adapted into a full-blown fix. |
You can solve multiple problems by using this:
Namely, this code works off the dock and on the dock. The only downside is that it stops the roomba from cleaning, but so would the proposed solution for waking up the roomba off the dock:
I've been using this solution for my code with checking to see whether the roomba is cleaning (is the brush spinning or the right wheel moving), and it works great. |
Update: Midnight cleaning problems, or in my case, mid-day. Anybody here have an idea to stop it from cleaning? |
I ended up doing something like
The weird thing is, when it starts cleaning, I can still issue the stop command and it'll stop. Might the past contributors want to help? |
Hi,
any updates from preventing the roomba going to deep sleep, so the serial comm doesn't get disabled?
Same problem here :/
The text was updated successfully, but these errors were encountered: