This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[Flow that works] Roomba 880

Just to share a flow that works :-)
Comments and suggestions are welcome, of course!

Case:
Controlling my Roomba vacuum cleaner (IR model) with Homey to reach:
- Only running when nobody are at home
- Only charge when necessary

Challenges:
- The Roomba is placed inside a cabinet (with a "retrofitted" base allowing it to drive in/out from its shelter)
- Ensuring the base station is turned on when Roomba is running - as docking is otherwise impossible
- Detecting when charging is finished

Equipment:
- Roomba 880 incl. remote (commands copied using Homeys "Add IR" as the Roomba 500-series commands in the database are not valid for the 880).
- An old IR-repeater incl. a battery powered receiver and a mains powered transmitter (the first placed in sight of Homey, the latter in the cabinet close to the Roomba).
- A Fibaro Wall Plug (for IR-repeater transmitter)
- PowerNode 6 (for Roomba base unit)
- Bette Logic-app

Flows:
Presence: Have some rather complicated (read: dumb and unpolished) flows to determine whether the house is empty or not and will not publish those, until they are cleaned up. Therefore the first flow is a flow trigged by antoher flow in the following.
While my "House empty"-flows take into consideration, that triggering the vacuuming-flow should only be initiated under circumstances that leave time enough for the work to be finished while nobody are at home, I couldn't help making a flow that initiate docking (such a shame to only use one command, when I teached Homey all of them)...
(The app Candy is used to ensure vacuuming only happens once every day - but that's another story).

The ground floor covered by the Roomba consists of four rooms in an "open" setting, that is, without doors. This makes it more than possible, that the Roomba is out of sight from both Homey and the IR-repeater-transmitter.
To increase the chance of success, I've made a loop that sends the "dock" command every 30 seconds for a total of 50 minutes (unless the dock is reached).
The limit is made to avoid a loop that potentially runs forever; the Roomba could get stuck somewhere, leave the house in an unattended moment whith a front door open in a desperate hope for freedom, or run out of power and never return to the dock - and therefore not trigger the flow that would otherwise terminate the loop...

1) R: Run
2) R: Dock
3) R: Reached dock
4) R: Charged

Variables (Better Logic):
- Roomba_running (Roomba_dock)
- Roomba_dock (number value)

Flow 1: Run

- Turns on AC to Roomba base unit (PowerNode 6)
- Turns on AC to IR-repeater (Fibaro Wall Plug)
- Sends "Clean"-signal (delayed five seconds to make sure the IR-transmitter has gone live)
- Sets Boolean variable "Roomba_running" to true
- Sends a push notification to me (Just because it's possible...)

Flow 2: Dock

Slightly more complicated :-)

If triggered and conditions "Roomba_running" = true and "Roomba_dock" < 10 then:
- Turns on AC to IR-repeater-transmitter (Fibaro Wall Plug)
- Sends "Dock"-signal
- Increase variable "Roomba_dock" by 0.01 (using the limit 10 and increments 0.1 just to make overview in "Insights" easier when on a graph including "Power")
- Start flow "R: Dock" (the name of this flow = the loop)

If triggered and conditions "Roomba_running" = false and/or "Roomba_dock" not <10 then:
- Variable "Roomba_dock" set to 0 (ready for next time)
- Turn off AC to IR-repeater-transmitter (Fibaro Wall Plug)
(And the loop reaches a dead-end)

Flow 3: R: Reached dock


Triggered by a change in the power consumption by the Roomba base unit measured by the PowerNode 6.
Looking at "Insights" I've found, that while Roomba is running, the base unit consumes somewhere around 1.1-1.2 W and when reaches the dock, power consumption increase momentarily to something around 25-28 W.
During charing, the power consumption lies around 25-28 W but sometimes it drops as low as 5-6 W - and then show a significant increase again.

This is the explanation of the Boolean variable "Roomba_running" introduced above:
To detect the happy reuninon of Roomba and base unit - and only this - the variable is set to "True" when vacuuming is initiated and "False" when the change in power consumption is detected for the first time.
Just for the sake of peace in mind, this flow also:
- Variable "Roomba_dock" set to 0 (ready for next time)
- Turn off AC to IR-repeater-transmitter (Fibaro Wall Plug)

Flow 4: R: Charged


When charging is finished, the base unit has a power consumption around 3 W (note: higher than when the Roomba is running).
Consequently, the limit for turning off AC to the base unit is set to 4 W and the condition "Roomba_running" = false must be met (otherwise power would be cut, when the Roomba leaves the base unit).

Bonus for those who reached the end:
A totalle uncomplicated flow triggered every 1:00 pm turns on AC to the base unit - just to make sure the battery is kept charged in case nobody left home for weeks or something like that)...
Sign In or Register to comment.