How to begin creating a Roomba wifi remote plugin?

Hello people,

I’m Xavi, the designer of RooWifi (Roomba Wi-Fi Remote). Sorry If I didn’t participate in this post line before, I didn’t see it. I will look every day to try to help Chuck or anybody wants help. In the case of strangely the only way to switch off totally the led the wifi remote is when the router signal disapears. In this case could be when the router shutsdown or when the power of wifi signal is not enought. I tried to reproduce it in my home and it happens in these two cases. I will try to reproduce another time doing other things.

here another pics:
[url=http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_001.jpg]http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_001.jpg[/url]
[url=http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_003.jpg]http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_003.jpg[/url]
[url=http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_005.jpg]http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_005.jpg[/url]
[url=http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_007.jpg]http://www.hoekstraonline.net/wordpress/wp-content/uploads/2013/02/WP_20130211_007.jpg[/url]

The blog of the developer from Netherlands Matthijs Hoekstra:
[url=http://www.hoekstraonline.net/2013/02/11/wifi-enabled-my-roomba/]http://www.hoekstraonline.net/2013/02/11/wifi-enabled-my-roomba/[/url]

Nice to see you on here Xavi!

Hello Chuck! Nice to be here :slight_smile:

I’m writing happy because Apple aproved my app to control roomba from iPhone like a car I put here the link to the itunes store app. I supose it will be findable on app store in a few days:

https://itunes.apple.com/us/app/roowifi/id607062309?l=es&ls=1&mt=8

Let’s play :slight_smile: (Before connects to your roomba on the bottom left switch configure the IP on the config page and save configuration, after that you could switch on the main screen and let’s play XD)

Hi All,

Hope everyone well.

I have been trying to add one of the cgi comands to a bit of code and notice i need to add the username and password. I am useing:

http://192.168.xxx.xxx/roomba.cgi?button=DOCK&user=xxxxxx&pwd=xxxxx

but no luck?

how do I parse the string to include username and passwrod details? anybody know?

thansk again all.

Kind regards,
LightsOn

[quote=“LightsOn, post:84, topic:174190”]I have been trying to add one of the cgi comands to a bit of code and notice i need to add the username and password. I am useing:

http://192.168.xxx.xxx/roomba.cgi?button=DOCK&user=xxxxxx&pwd=xxxxx

but no luck?

how do I parse the string to include username and passwrod details? anybody know?[/quote]

If your code is inside I_xxx.xml and you are giving it as a literal string, you have to make sure the ampersands (&) are given as [tt]&[/tt] . Likewise, if your code (in the .xml file) uses comparison operators like [tt]>[/tt] , [tt]<=[/tt] , etc., they have to appear as [tt]>[/tt] , [tt]<=[/tt] , etc. Otherwise the .xml file parsing will get confused. Lastly, if your username or password have odd characters, they have to be URL encoded before being passed in the URL, or the Roomba wifi’s built-in web server will have trouble parsing them. But what seems more likely to me is the issue with the Lua code embedding in the .xml file.

watou

Hi Watou,

Many thanks for the help.

I wanted to keep things simple and just use wget to send a command like i do with my ipcam. as such i just need a string that i can add the a web browser that has all relervant data in it.

I tried chnaging & to &amp but no joy sadly.

I will leave the lua dev work to you and chuck - a bit above me but learning fast :slight_smile:

[quote=“LightsOn, post:86, topic:174190”]Hi Watou,

Many thanks for the help.

I wanted to keep things simple and just use wget to send a command like i do with my ipcam. as such i just need a string that i can add the a web browser that has all relervant data in it.

I tried chnaging & to &amp but no joy sadly.

I will leave the lua dev work to you and chuck - a bit above me but learning fast :-)[/quote]

You’re very welcome. If you didn’t add the ; (semicolon) to &amp that could be it… watou

so I now have:

http://192.168.XXX.XXX/roomba.cgi?button=DOCK&amp;user=XXX&amp;pwd=XXXX

but no cigar :frowning:

[quote=“LightsOn, post:88, topic:174190”]so I now have:

http://192.168.XXX.XXX/roomba.cgi?button=DOCK&amp;user=XXX&amp;pwd=XXXX

but no cigar :-([/quote]
Shoot. Wish I could test it here but if I had a Roomba my dog would try to kill it and bring me the broken pieces as his quarry. :slight_smile:

lol yes sounds about right - many vids of romba arguing with pets on youtube if you have 5 minutes to waste while having a cofee.

i will keep trying options and post if i have any joy.

thanks again.

Hello All.

Please try this:

http://username:password@IP_ADDRESS/roomba.cgi?button=CLEAN

In my case with IP 192.168.1.131 and default user and password:

http://admin:roombawifi@192.168.1.131/roomba.cgi?button=CLEAN

I did it now and it works fine, please try it and give feedback :slight_smile: I wish I helped you. From web browser it works.

If I can, I will write a little post about it in our website.

Have a great day :slight_smile:

This worked when I tried it from a browser last week, but it didn’t work in a scene when I tried it. I’ll try it again though.

nice development guys !
i was struggeling with understanding the making of a plugin like a lot of us and i find it very helpfull to read how to approach such.
the main thing is what you want the plugin to do and how to do it.
like for example do you wish to run it autonomicly or by adding a pre-defined route ?
wish for a notification telling the device got stuck.
sending mail to persons to notify about anything changed or happend
perhaps some mini-map like a square which tells you where the roomba is.
battery level reporting, signal reporting.

i have a samsung vacuumcleaner which has remote control and i like to implement this also to vera.
perhaps its wise to make a standard layout which can be adapted to different vacuumcleaners.
every robot cleaner of floorlicking machine uses the command clean and perhaps some directional pads.
and a command to return it to base. and some kind of programmability for more expensive ones.
and has a ON OFF button or sleep mode.

i was looking for this one LG Hom-Bot 2.0 Smart Robot Vacuum Cleaner hands-on (video) | Engadget
looks really cool and has a cam and android remote ^^

Hi xmcarne,

Thnak you for the reply - I tried:

http://username:password@IP_ADDRESS/roomba.cgi?button=CLEAN

and now works - tried this before but it was IE causing hasstle again, tried in naouther browser and hey presto - so my wget then worked fine. I relay must remebr to try other browsers I have been here before and will likly be again - such a silly error.

Thanks all.

I’m happy being useful. If you have any other question, please ask me without any inconvenience :slight_smile:

Thanks xcarne :slight_smile:

Sent from my HTC HD2 using Tapatalk 2

Hello guys!

Any improvement with your developments?

Sorry I fell of the radar for soooo long. I had a home improvement project that consumed all of my free time for the past month. Now having put this down, I almost need to start all over! Ugh… I could sure use some help.

Also, is anyone interested in a RooWifi Group Buy? I can work out the details, but I am not sure if I am allowed to do that here on the micasaverde forum?!? I sure don’t want to step on any toes as I really love the forum and do NOT want to be banned!!!

Chuck

Well, I thought I had it ready to go, but after uploading the files and creating the device… FAIL. I am frustrated!!! I think my device ID’s are part of the issue.

Anyway, I decided to use the Binary Light Device file and change it from “off” to “dock” and from “on” to “clean”… seemed simple enough to work as my D_Roomba device file. Then I took S_SwitchPower as the basis for my Roomba1 service file.

Roomba1 JSON FILE

{ "flashicon": "http://imageshack.us/a/img824/313/roombat.png", "imgIconBody": "", "imgIconDimmable": "", "imgIconTurnable": "", "imgIconMin": "http://imageshack.us/a/img17/6686/roombadock.png", "imgIconMax": "http://imageshack.us/a/img94/2310/roombaclean.png", "halloIconsDir": "pics/hallo", "state_icons": [ "Binary_Light_0.png", "Binary_Light_100.png" ], "x": "2", "y": "4", "inScene": "1", "DisplayStatus": { "Service": "urn:upnp-org:serviceId:Roomba1", "Variable": "Status", "MinValue": "0", "MaxValue": "1" },

D_Roomba1

[code]<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

  • 1 0
  • urn:irobot-com:device:Roomba:1 D_Roomba1.json RooWiFi Remote iRobot http://www.iRobot.com Roomba 700 Series 790 hmtl 0
  • urn:irobot-com:service:Roomba:1 urn:irobot-com:serviceId:Roomba1 S_Roomba1.xml
  • urn:schemas-upnp-org:service:SwitchPower:1 urn:upnp-org:serviceId:SwitchPower1 S_SwitchPower1.xml
  • urn:micasaverde-com:service:InputSelection:1 urn:micasaverde-com:serviceId:InputSelection1 S_InputSelection1.xml
  • urn:micasaverde-com:service:MenuNavigation:1 urn:micasaverde-com:serviceId:MenuNavigation1 S_MenuNavigation1.xml
  • urn:schemas-micasaverde-com:service:HaDevice:1 urn:micasaverde-com:serviceId:HaDevice1 S_HaDevice1.xml
  • I_Roomba1.xml [/code]

S_Roomba1

[code]xml version=“1.0”?>


1
0



Target
no
boolean
0


Status
boolean
0
status




SetTarget


newTargetValue
in
Target




GetTarget


RetTargetValue
out
Target




GetStatus


ResultStatus
out
Status




Clean

<action>
  <name>Dock</name>
  <argumentList></argumentList>
</action>
[/code]

I_Roomba1

[code]<?xml version="1.0" ?>

  • local ipAddress local ROOMBA_SID = "urn:irobot-com:serviceId:Roomba1" local deviceid = lul_device function clean () luup.inet.wget("http://" .. ipAddress .. "/roomba.cgi?button=CLEAN") end function dock () luup.inet.wget("http://" .. ipAddress .. "/roomba.cgi?button=DOCK") end function init(x) end -- well, not really but roughly init
  • urn:irobot-com:serviceId:Roomba1 Clean Clean ()
  • urn:irobot-com:serviceId:Roomba1 Dock Dock () [/code]

Just can’t seem to piece it all together just right !?! HELP!!! >:(

Glad to see you’re still plugging away at this one. I wish you luck and hope some of the good souls on the board can help you where you need!

I personally am interested in this group buy you propose.