Author Topic: Roomba Roowifi Plugin  (Read 63403 times)

Offline Aegis

  • Full Member
  • ***
  • Posts: 141
  • Karma: +1/-0
Re: Roomba Roowifi Plugin
« Reply #15 on: February 21, 2014, 06:51:19 am »
The plugin still works for me.

What I don't understand that you say you entered Ip and MAC, I never ask for a mac address in the advanced settings of the plugin.

After creating the device, please reload (sometimes up to 3 reloads) until the advanced settings look like the attached screenshot.

The only thing you have to do is enter the IP of the roowifi and than save and reload.

Important! the current version of the plugin isn't compatible with a Password protected Roowifi (yet). You have to clear the User and Password field in the Roowifi and save the config.

The reason I haven't continued the development of the plugin is because the current version satisfies my needs :-) and after the 1.3 release i haven't got a single reply/question until yours today.

If there are more wishes for the plugin just post them and I'll see what I can do.


That did it.  I had not cleared the PW.  Thanks!

Offline Aegis

  • Full Member
  • ***
  • Posts: 141
  • Karma: +1/-0
Re: Roomba Roowifi Plugin
« Reply #16 on: February 21, 2014, 06:53:58 am »
Can this plugin be made to show up in Vera Mobile?

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Roomba Roowifi Plugin
« Reply #17 on: February 21, 2014, 07:31:52 am »
All 3rd party plug-ins require the app developers to add support. You'll need to contact the developer to make the request.

- Garrett


Offline Aegis

  • Full Member
  • ***
  • Posts: 141
  • Karma: +1/-0
Re: Roomba Roowifi Plugin
« Reply #18 on: February 21, 2014, 01:37:13 pm »
Works fine in Vera Mobile via scene creation.

Offline nullx8

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +9/-3
  • Trouble !
Re: Roomba Roowifi Plugin
« Reply #19 on: February 21, 2014, 11:06:55 pm »
Short question,
If i send the roomba away usijng its remote or the clean button on the case, will cera know about that at some stage ?
1 VeraLite, 2 RaspberryPI, Harmony Remote, openLuup, 85 Devices, 34Nodes, 63 Triggers, 49 Scenes

Offline nitehawk

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +1/-1
Re: Roomba Roowifi Plugin
« Reply #20 on: February 22, 2014, 05:19:19 am »
Not at the moment.

The only status it reads from the roomba is the battery status and if Roowifi is pingable.

Problem with this is that withing the json data the roowifi reports (http://iproowifi/roomba.json) there isn't a value for the state (clean/dock) of roowifi/roomba.

I will look into this if I can get this to work in another way.
« Last Edit: February 22, 2014, 05:38:26 am by nitehawk »

Offline nullx8

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +9/-3
  • Trouble !
Re: Roomba Roowifi Plugin
« Reply #21 on: February 23, 2014, 10:11:16 pm »
well there is no "direct" indication of the robot is on dock or cleaning.
but the values do hint some of its statuses.

here is the response i got regarding this:
Quote
"r14": { "name": "Charging State", "value": "VALUE" } //This is one of the inforamtion that you need and the possible values are described in SCI as:
-          0 No charging
-          1 Charging Recovrey
-          2 Charging
-          3 Trickle Charging
-          4 Waiting
-          5 Charging Error
 
When the roomba is cleanning the state of the battery could be 0 (no charging) or 4 (waiting) depending of the firmware version of the robot and the model. In any case to be sure if is cleanning or only staying quite the Indigo plugin developer used
 
"r16": { "name": "Current", "value": "VALUE" }  which tells the current gived by the battery. If it?s between -100 and -500 the robot is without charger and stying quite, If it?s between -500 or less (normally -1200) the motors are running and it means that the robot is working and cleaning. If its between positive or -100 is connected to the charger.

more details SCI Manual

so:
Code: [Select]
if ($json->r16->value < -500) {
  $cleaning = true; // only the motors require much power
  $dock = false; // it does not clean while docked
}
elseif (($json->r16->value > -500) && ($json->r14->value != "0") && ($json->r14->value != "4")) {
  // include the idle power .. but check on charge-state to make sure
  $cleaning = false; // cant charge and clean at the same time
  $dock = true; // its gets power (so must be docked)
}
else {
  $cleaning = false; $dock = false; // its just idle or unclear status (better set both buton to 0)
}

i guess ;)
« Last Edit: February 23, 2014, 10:55:20 pm by nullx8 »
1 VeraLite, 2 RaspberryPI, Harmony Remote, openLuup, 85 Devices, 34Nodes, 63 Triggers, 49 Scenes

Offline nitehawk

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +1/-1
Re: Roomba Roowifi Plugin
« Reply #22 on: February 24, 2014, 12:35:26 pm »

thnx for looking it up. I have mailed Roowifi also with the question. Haven't got a response yet.

I'm testing the code now. After that I will update the first post with the new version.

Offline nitehawk

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +1/-1
Re: Roomba Roowifi Plugin
« Reply #23 on: February 24, 2014, 01:28:50 pm »
@nullx8

Would you like to test? Just upload attached file and reload.

The buttons are updated based on the received data, this means that when you click Clean or Dock the button gets selected after the first poll.
The default poll is 120 seconds, I currently have set it to 10 but i will test if this will cause a significant cpu load.

I haven't implemented the third option (idle or unclear) because I haven't found out how to do that yet :-)

Let me know the results.

Offline nullx8

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +9/-3
  • Trouble !
Re: Roomba Roowifi Plugin
« Reply #24 on: February 26, 2014, 09:49:15 am »
looks okay
it seems to fetch every 2 minutes
does change the status by itselff .. (i did not try a trigger yet) but no reason why this should not work .. since the vera does register the actions properly
Code: [Select]
06 02/26/14 21:41:12.210 Device_Variable::m_szValue_set device: 164 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 12 now: 12 #hooks: 0 upnp: 0 v:0xfa3fc8/NONE duplicate:1 <0x305cb680>
50 02/26/14 21:41:12.210 luup_log:164: Roomba Plugin #164 Updated Battery Status  <0x305cb680>
06 02/26/14 21:41:12.210 Device_Variable::m_szValue_set device: 164 service: urn:nitehawk-nl:serviceId:Roomba1 variable: Target was: 1 now: 0 #hooks: 0 upnp: 0 v:0x117d270/NONE duplicate:0 <0x305cb680>
06 02/26/14 21:41:12.245 Device_Variable::m_szValue_set device: 164 service: urn:nitehawk-nl:serviceId:Roomba1 variable: Status was: 1 now: 0 #hooks: 0 upnp: 0 v:0x117d2b0/NONE duplicate:0 <0x305cb680>
06 02/26/14 21:41:12.267 Device_Variable::m_szValue_set device: 164 service: urn:nitehawk-nl:serviceId:Roomba1 variable: PingStatus was: up now: up #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x305cb680>
50 02/26/14 21:41:12.268 luup_log:164: Roomba Plugin #164 Ping reply  <0x305cb680>

button is Green if its cleaning and red if its docked.
no charging indication ..

1 VeraLite, 2 RaspberryPI, Harmony Remote, openLuup, 85 Devices, 34Nodes, 63 Triggers, 49 Scenes

Offline nullx8

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +9/-3
  • Trouble !
Re: Roomba Roowifi Plugin
« Reply #25 on: February 26, 2014, 10:08:19 am »
btw, it would be REALLY Cool .. id the plugin could also store the additional variables provided by the roomba

via datamine they could provide some really nice analysing features.

like "distance traveled", dirt detected, virtual walls .. (so they could be "better placed" ..

and other geeky things no-one may need .. haha (just came to this conclution while writing that)
1 VeraLite, 2 RaspberryPI, Harmony Remote, openLuup, 85 Devices, 34Nodes, 63 Triggers, 49 Scenes

Offline nitehawk

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +1/-1
Re: Roomba Roowifi Plugin
« Reply #26 on: February 26, 2014, 11:19:32 am »
@nullx8

thnx for testing.

The plugins default poll interval is 120 seconds, you can change that in the advanced settings of the plugin. Just change the Poll variable (in seconds), save and reload.

I have Poll at 30 seconds at the moment.

Good idea about the extra variables, will look into that. My inner nerd is angry that I did not came up with that one myself  ;) ;)

The battery symbol reports the actual charge of the roomba but not the charge state (charge/trickle...).
Do you have an idea how you would like to see that on the plugin or is it enough to report it as a variable?
« Last Edit: February 26, 2014, 11:25:41 am by nitehawk »

Offline xmcarne

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Roomba Roowifi Plugin
« Reply #27 on: March 10, 2014, 06:30:45 pm »
Only for information:
The entire website of RooWifi: The Wifi Remote for Roomba was moved to http://www.roowifi.com

Said that, Wow! You are making an impressive plugin! Congratulations nitehawk and company!

Thank you and kind regards!

PD.- Really glad for it!

Offline undertoe

  • Full Member
  • ***
  • Posts: 225
  • Karma: +17/-2
Re: Roomba Roowifi Plugin
« Reply #28 on: June 09, 2014, 02:02:47 pm »
Just got my RooWifi today and installed this plugin. I wanted to not leave the password blank since that could be a bad thing.

Whats new in version 1.4.2
  • Clean/Pause and Dock button
  • True Dock support
  • Roomba battery status
  • Charging status in UI (charging or trickle)
  • improved Roomba availability (ping)
  • Username & Password Support
  • Realtime Device Status with UI label
  • Complete rewrite for optimized and rewrote code
  • New icons

Download Latest v1.4.2 https://github.com/undert03/vera-roomba/releases/latest
Project url: https://github.com/undert03/vera-roomba
Submit any issues here https://github.com/undert03/vera-roomba/issues
« Last Edit: June 13, 2014, 10:12:38 am by undertoe »
Check out my vera plugins: Roomba Plugin, Roomba Thinking Cleaner Plugin, Blue Iris Cam Plugin

Offline undertoe

  • Full Member
  • ***
  • Posts: 225
  • Karma: +17/-2
Re: Roomba Roowifi Plugin
« Reply #29 on: June 13, 2014, 10:07:42 am »
Also please post any feedback, would love to hear if anyone is using it and what they think.
Check out my vera plugins: Roomba Plugin, Roomba Thinking Cleaner Plugin, Blue Iris Cam Plugin