Page 2 of 3

Re: iRobot Roomba 980 integration

Posted: Sunday 01 March 2020 20:30
by damsmaa
I created a plugin for this:

https://github.com/damsma/rest980-domoticz

Re: iRobot Roomba 980 integration

Posted: Saturday 07 March 2020 11:29
by Garfield
bewo wrote: Saturday 18 January 2020 13:50 Hi Vondee,

yes that could be. ;-)

If you copied my script 1:1, just add this lines above the "end" of the for loop:

Code: Select all

-- Count the working time
if otherdevices[Roboter.Name] == 'Saugen' then
    working_time = tonumber(uservariables[Roboter.Name..'_Laufzeit']) + 1
    commandArray[#commandArray+1]={['Variable:'..Roboter.Name..'_Laufzeit'] = tostring(working_time)}
end
Hello bewo,

I copied your scripts 1:1 and also the part above.
The user variable Roboter.Name_Laufzeit is updated every minute (in Domoticz) but the RFXmetercounter stays at " 0"
When I add (to check if it's working) print(working_time) I see the same value as in Roboter.Name_Laufzeit so that works.
The RFXMeter name is: (Zähler (Roboter.Name) Laufzeit.
What's missing ?

Thanks in advance

Re: iRobot Roomba 980 integration

Posted: Sunday 08 March 2020 13:32
by bewo
Hi Garfield,

i've another script in use to count the working time time of several devices in my house, so i've count the robots there too.

To fill the RFXcounter with the robot script use this code instead the lines i wrote to vondee:

Code: Select all

-- Count the working time
if otherdevices[Roboter.Name] == 'Saugen' then
    counter = 'Zähler '..Roboter.Name..' Laufzeit'
    working_time_variable = tonumber(uservariables[Roboter.Name..'_Laufzeit']) + 1
    working_time_counter = tonumber(otherdevices_svalues[counter]) + 1
        commandArray[#commandArray+1]={['Variable:'..Roboter.Name..'_Laufzeit'] = tostring(working_time_variable)}
        commandArray[#commandArray+1]={['UpdateDevice'] = otherdevices_idx[counter]..'|1|'..tonumber(working_time_counter)}
end
Should work... ;-)

Re: iRobot Roomba 980 integration

Posted: Tuesday 17 March 2020 11:32
by jarmoboy
Vonde, can you please publish your script? Iam trying to use Bewo"s one but i cant repair it just for one roomba. Thank you

Re: iRobot Roomba 980 integration

Posted: Tuesday 17 March 2020 11:50
by bewo
Hi jarmoboy,

the number of robots doesn't matter for the script. It works with 100 robots or only with one.

What's the problem? What doesn't work? Let's repair or correct this together... ;)

Re: iRobot Roomba 980 integration

Posted: Friday 27 March 2020 23:24
by gikah
Hi! Trying to get it work, and I'm stuck on running rest980. It's my first 'deep dive' into scripts like that i have moderate knowledge about linux, so tryig to resolve my problems myself, but now I don't know where to start looking for what can be issue.
I successfully created config, but after trying to test that everything works I'll get this error:

Code: Select all

pi@raspberrypi:~/rest980 $ DEBUG=rest980:* npm start

> [email protected] start /home/pi/rest980
> node ./bin/www

/home/pi/rest980/node_modules/dorita980/lib/v2/cloud.js:7
  throw new Error('Not implemented.');
  ^

Error: Not implemented.
    at dorita980 (/home/pi/rest980/node_modules/dorita980/lib/v2/cloud.js:7:9)
    at new cloud (/home/pi/rest980/node_modules/dorita980/index.js:12:10)
    at /home/pi/rest980/routes/api.js:33:46
    at handleIP (/home/pi/rest980/routes/api.js:26:68)
    at Object.<anonymous> (/home/pi/rest980/routes/api.js:27:1)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/pi/rest980/app.js:11:16)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/pi/rest980/bin/www:7:11)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried to google for solution, but there is nothing or too many different (not connected to rest980) answers/different cases.

If someone of you will give me a hint where to search or what can make issue like that I'll be very honest.

I'm running domoticz on rpi2 with latest raspbian nodejs, etc (everything seems to be updated).

Cheers!

Edit:
When I set variable in my config:

Code: Select all

"enableCloud": "no",
It can successfully run

Code: Select all

wget http://127.0.0.1:3000/api/local/action/start > /dev/null
And my iRobot starts to clean. So the 'cloud' option seems to make some problems here.
It looks that working well.

Re: iRobot Roomba 980 integration

Posted: Friday 10 April 2020 21:02
by Vondee
After everyting works well for my 960 Irobot, I thought it was time to buy a nice frend for him (e5). I succesfully could get the BLID and so on, but now I am puzzling how to to get this in the 'default.json'. Or do I have to install a 2nd instance of the rest980 server?

Re: iRobot Roomba 980 integration

Posted: Saturday 11 April 2020 8:43
by bewo
Hi Vondee,

it depends on what solution you are using... The script/solution from BakSeeDaa, my script/solution, or the plugin which damsmaa created.

In case using still my script:
bewo wrote: Sunday 05 January 2020 16:16 ...In my house are working two roboters. So i've set up an instance of the restAPI for each robot....
Yes you need an instance for each robot. (Don't forget to use an different port. For example 3001 instead if 3000.)

Best regards! :D

Re: iRobot Roomba 980 integration

Posted: Sunday 12 April 2020 20:47
by Vondee
Got it working now and the robots are real friends now talking to Domoticz. The 'Status' script works well and I translated to Dutch. The 'Command' script I stumbled upon
dofile("/opt/domoticz/scripts/lua/Eigene_Funktionen.lua")
and I did not exactly do with it, so I used the 'old' version of the command script and works well!.

Thanks! :P

Re: iRobot Roomba 980 integration

Posted: Wednesday 06 May 2020 15:46
by Makss39
bewo wrote: Sunday 05 January 2020 16:16 Hi guys...
Thank's for the idea's, your scripts and the inspiration... I've did it in a different way.
The Rest API which offered beside dorita980 by koalazak (linked above) is updated and works.
So i thougt this an nicer way...

In my house are working two roboters. So i've set up an instance of the restAPI for each robot. Then i use two lua scripts. One time triggered for status updating and the other one device triggered to control the robots.

My comments are german. :-) So if there's somebody who want to use, or there is a question -> just ask, i will do my best @translating. ;)

Best regards and a Happy New Year together! :D
Hi Bewo,

Thanks for sharing, it looks great !
I'm trying to make it work, but unluckyly, i'm not able to !

I've a only one Roomba 980, and eveything is fine ith the dorita980 (i'me able to start the robot from the shell).

I copied your script 1/1 in Domoticz editor, modified the robot name, and commented the second line with the second robot.
I also created the var and the switch, and did a little bit of translation to try to understand how it works !


First point: what the line

Code: Select all

dofile("/opt/domoticz/scripts/lua/Eigene_Funktionen.lua")
does ?
Second point : the status script seems to run, but my customize var stays empty, is it normal ?

Thanks in advance,

Re: iRobot Roomba 980 integration

Posted: Sunday 14 June 2020 13:32
by lukev
Vondee wrote: Sunday 12 April 2020 20:47 Got it working now and the robots are real friends now talking to Domoticz. The 'Status' script works well and I translated to Dutch. The 'Command' script I stumbled upon
dofile("/opt/domoticz/scripts/lua/Eigene_Funktionen.lua")
and I did not exactly do with it, so I used the 'old' version of the command script and works well!.

Thanks! :P
Can you share your script with us maybe? :mrgreen:

Re: iRobot Roomba 980 integration

Posted: Friday 03 July 2020 14:11
by bewo
Hey guys,
Sorry for my late reply. I hope my answer helps anyway. ;)
Makss39 wrote: Wednesday 06 May 2020 15:46 First point: what the line

Code: Select all

dofile("/opt/domoticz/scripts/lua/Eigene_Funktionen.lua")
does ?
This line loads a file with all my functions which i use multiple in several scripts. I think in the Roomba-Script only the timedifference-function ist called. So just replace the line with:

Code: Select all

function timedifference(timestamp)
  y, m, d, H, M, S = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)")
  difference = os.difftime(os.time(), os.time{year=y, month=m, day=d, hour=H, min=M, sec=S})
  return difference
end
Makss39 wrote: Wednesday 06 May 2020 15:46 Second point : the status script seems to run, but my customize var stays empty, is it normal ?
No it isn't. When the script runs, there must be an entry.

Re: iRobot Roomba 980 integration

Posted: Sunday 19 July 2020 12:50
by manuloup
Hi all,

I just bought a Roomba model i7556.

Do you think this script should be working too ?

Thanks.

Re: iRobot Roomba 980 integration

Posted: Tuesday 21 July 2020 14:55
by bewo
Hi manuloup,

yes i think it should work. Just try out. :-)

Re: iRobot Roomba 980 integration

Posted: Tuesday 21 July 2020 15:02
by manuloup
Bewo,

Thanks for your answer. Is there any translation in english or french of your scripts somewhere ?

Congratulation for the good work.

Re: iRobot Roomba 980 integration

Posted: Sunday 01 November 2020 23:07
by fgel
Hello Bewo,

Do you have the full instructions? Can't get my head around it.

Re: iRobot Roomba 980 integration

Posted: Friday 15 January 2021 23:56
by Svennie
Hello everyone,

I’m quite new to the integration of a Roomba into Domoticz. I’ve Rest980 working. But I want to see the status of the Roomba in Domoticz. So if the Roomba is going to work in de evening/night some lights will go on.

Is there anybody who can help me with that? Preferabele in Dutch. :D English is possible to. But is takes a little more time for me. :lol:

I’m using a RPi4 with domoticz.

Thank you in advance.

Re: iRobot Roomba 980 integration

Posted: Sunday 17 January 2021 11:21
by Filip
I made a plugin for the ROOMBA i7... Don't know if it works with the Roomba 980 however would be interesting if somebody can give it a try and give feedback. The plugin is available on https://github.com/FilipDem/Domoticz-iR ... MBA-plugin.

Re: iRobot Roomba 980 integration

Posted: Monday 18 January 2021 10:02
by manuloup
Hi filip,

I have a Roomba I7+ . I will install the plugin and let you know :)

Manu

Re: iRobot Roomba 980 integration

Posted: Monday 18 January 2021 15:39
by manuloup
Filip,

It is installed and works successfully ! :)

Just for your information, I followed the installation procedure :

https://github.com/FilipDem/Domoticz-iR ... MBA-plugin

When it comes to :
Start the service with sudo service roomba start
You can check if the service is correctly started with sudo service roomba status (should show active (running))
My service was failing and I added the debug parameter. It appears it was because the config.ini was not created yet, so may be you should add a word about it.

That's all, thanks for your work.