iRobot Roomba 980 integration

Moderator: leecollings

User avatar
damsmaa
Posts: 3
Joined: Sunday 01 March 2020 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post by damsmaa »

I created a plugin for this:

https://github.com/damsma/rest980-domoticz
Garfield
Posts: 5
Joined: Thursday 20 November 2014 12:14
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: iRobot Roomba 980 integration

Post 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
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Re: iRobot Roomba 980 integration

Post 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... ;-)
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
jarmoboy
Posts: 33
Joined: Wednesday 12 February 2020 6:39
Target OS: Linux
Domoticz version: v2022.2
Location: Czech
Contact:

Re: iRobot Roomba 980 integration

Post 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
DOCKERED v14824,NODE-RED,Tasmotized Sonoffs,Tasmoadmin,zigbee2mqtt,EWPE,REST980,WLED
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Re: iRobot Roomba 980 integration

Post 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... ;)
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
gikah
Posts: 5
Joined: Monday 27 May 2019 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: iRobot Roomba 980 integration

Post 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.
Vondee
Posts: 30
Joined: Sunday 12 January 2020 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post 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?
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Re: iRobot Roomba 980 integration

Post 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
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
Vondee
Posts: 30
Joined: Sunday 12 January 2020 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post 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
Makss39
Posts: 1
Joined: Tuesday 05 May 2020 7:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post 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,
lukev
Posts: 66
Joined: Friday 21 October 2016 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post 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:
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Re: iRobot Roomba 980 integration

Post 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.
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: iRobot Roomba 980 integration

Post by manuloup »

Hi all,

I just bought a Roomba model i7556.

Do you think this script should be working too ?

Thanks.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Re: iRobot Roomba 980 integration

Post by bewo »

Hi manuloup,

yes i think it should work. Just try out. :-)
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: iRobot Roomba 980 integration

Post by manuloup »

Bewo,

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

Congratulation for the good work.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
fgel
Posts: 1
Joined: Tuesday 27 November 2018 21:11
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post by fgel »

Hello Bewo,

Do you have the full instructions? Can't get my head around it.
Svennie
Posts: 13
Joined: Sunday 25 October 2020 14:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Helmond
Contact:

Re: iRobot Roomba 980 integration

Post 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.
Filip
Posts: 100
Joined: Thursday 03 November 2016 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: iRobot Roomba 980 integration

Post 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.
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: iRobot Roomba 980 integration

Post by manuloup »

Hi filip,

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

Manu
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
manuloup
Posts: 31
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: iRobot Roomba 980 integration

Post 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.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest