1.3.0 • Published 4 days ago

iobroker.roomba v1.3.0

Weekly downloads
70
License
MIT
Repository
github
Last release
4 days ago

Logo

ioBroker.roomba

Connect your iRobot Roomba to ioBroker.

Based on the dorita980 library https://github.com/karlvr/dorita980#readme

Number of Installations Stable Version NPM Version Commits since last release Travis CI Downloads

NPM

Table of contents 1. Features 2. Installation 3. Setup instructions 4. Supported Roomba's / Firmware versions 5. Channels & States 6. Description of Preferences (incomplete) 7. Smart Home / Alexa integration using ioBroker.javascript 8. Changelog 9. Credits 10. Licence

Features

The following features come with this adapter:

  • Send commands (start, stop, resume, pause, dock) to your Roomba
  • Retrieve device states, such as battery, docked, full / inserted bin (see Channels & States for full list)
  • Retrieve device configuration, such as preferences, network or schedule settings (see Channels & States for full list)
  • Retrieve device statistics, such as total missions, hours on docking station, etc. (see Channels & States for full list)
  • Retrieve information about current mission (when your Roomba is cleaning), such as start and end time, total runtime, sqm cleaned, etc. (only on supported Roomba\'s see Supported Roomba's / Firmware versions)
  • Draw map based on the mission data received (only on supported Roomba\'s)
  • Web Interface that shows the status and map of the current as well as previous / archived missions: Roomba Interface

Installation

ioBroker.roomba needs canvas in order to draw maps of the Roomba missions. ioBroker will try to install this dependency with ioBroker.roomba installation.

Though, you probably have to install package dependencies of canvas (and canvas itself) with the following command:

Linux

sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

Furthermore, run the following command in the ioBroker.roomba directory (/opt/iobroker/node_modules/iobroker.roomba):

sudo npm install canvas --unsafe-perm=true

Windows

  1. Make sure you have node-gyp installed via

    npm install -g node-gyp
  2. Make sure you have build essentials installed via

    npm install --global --production windows-build-tools
  3. Download GTK 2 (for Win32 or Win64) and unzip it (e.g. to C:\path\to\GTK2)

  4. Run
    node-gyp rebuild --GTK_Root=C:\path\to\GTK2
  5. Install canvas from within the iobroker.roomba folder
    cd C:\path\to\iobroker\node_modules\iobroker.roomba
    npm install canvas

For details, see https://github.com/Automattic/node-canvas/wiki/Installation:-Windows.

Setup instructions

Automated setup

To automatically setup ioBroker.roomba following the instructions in the admin panel of ioBroker.roomba.

ATTENTION: The authentication credentials are not the same as you are using in the smartphone app!

  1. Make sure the ioBroker.roomba adapter is started.
  2. Make sure your robot is on the Home Base and powered on (green lights on).
  3. Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds).
  4. Release the button and your robot will flash WIFI light.
  5. Then come back here press the button to retrieve IP and credentials.

If the automated process fails retrieving your credentials, please use the manual setup.

Manual setup

For manual setup see https://github.com/karlvr/dorita980#how-to-get-your-usernameblid-and-password.

Supported Roomba's / Firmware versions

Supported Firmware versions

Software-VersionFirmware InfoSupported
v1.4Release Notes#c5f015 supported (#c5f015 incl. map)
v2.4.6-xRelease Notes#c5f015 supported (#c5f015 incl. map)
v3.2.xxRelease Notes#c5f015 supported (#f03c15 NO map)

Supported Roomba's

SerieModels (incomplete)Software-VersionFirmware InfoSupported
Roomba® 6xx605, 606, 612, 616, 671, 676, 680, 696v3.2.40Release Notes(most likely)
Roomba® 6xx675, 690v3.2.40Release Notes#c5f015 supported (#f03c15 NO map)
Roomba® 6xx692v3.5.62Release Notes#c5f015 supported (#f03c15 NO map)
Roomba® 7xx774, 785,-#f03c15 Model does not offer Wifi connectivity, thus no support
Roomba® 8xx880, 886, 891, 896-Release Notes(most likely)
Roomba® 8xx895v3.2.10 / 40 / 69Release Notes#c5f015 supported (#f03c15 NO map)
Roomba® 9xx965, 981-Release Notes(most likely)
Roomba® 9xx960, 966, 980v2.4.6-3Release Notes#c5f015 supported (incl. map)
Roomba® ii7 (7150), i7+ (7550)v1.4Release Notes#c5f015 supported (incl. map)
Roomba® e5e5v3.4.42Release Notes#c5f015 supported (#f03c15 NO map)
Roomba® sS9+v3.2.4Release Notes#c5f015 supported (incl. map)

Please help us regarding the supported devices and let me know via an issue, whether your Roomba model is supported!

Channels & States

After sucessful setup the following channels and states will be created:

ChannelFolderStateDescription
cleaning--Commands and information regarding cleaning process
cleaninglast-Last commands sent to robot
cleaninglastcommandLast command sent to robot
cleaninglasttimestampTimestamp last command was sent
cleaninglastdatetimeDateTime last command was sent
cleaninglastinitiatorInitiator of last command
cleaninglastcycleCycle
cleaninglastphasePhase
cleaninglasterrorIndicates an error during last mission
cleaningschedule-Schedule information
cleaningschedulecycleSchedule cycle (Sunday to Saturday)
cleaningschedulehoursHour to start cycle (Sunday to Saturday)
cleaningscheduleminutesMinute to start cycle (Sunday to Saturday)
cleaning-dockSend the robot to the docking station
cleaning-pausePause the current cleaning process
cleaning-resumeResume the current cleaning process
cleaning-startStart a cleaning process
cleaning-stopStop the current cleaning process
device--Device information
devicenetwork-Network information
devicenetworkdhcpState whether DHCP is activated
devicenetworkrouterMac address of router
devicenetworkipIP address
devicenetworksubnetSubnet adress
devicenetworkgatewayGateway address
devicenetworkdns1Primary DNS address
devicenetworkdns2Secondary DNS address
devicepreferences-Set preferences
devicepreferencesbinPauseUNKNOWN
devicepreferencescarpetBoostAutoAutomatic: Roomba will automatically boost its vacuum power to deep clean carpets.
devicepreferencescarpetBoostHighPerformance Mode: Roomba will always boost its vacuum to maximise cleaning performance on all floor surfaces.
devicepreferencesecoChargeUNKNOWN
devicepreferencesnoAutoPassesOne Pass: Roomba will cover all areas with a single cleaning pass.
devicepreferencesnoPPUNKNOWN
devicepreferencesopenOnlyUNKNOWN
devicepreferencesschedHoldUNKNOWN
devicepreferencestwoPassRoomba will cover all areas a second time. This may be helpful in homes with pets or for occasional deep cleaning.
deviceversions-Version information
deviceversionshardwareRevHardware Revision
deviceversionsbatteryTypeBattery Type
deviceversionssoundVerUNKNOWN
deviceversionsuiSwVerUNKNOWN
deviceversionsnavSwVerUNKNOWN
deviceversionswifiSwVerUNKNOWN
deviceversionsmobilityVerUNKNOWN
deviceversionsbootloaderVerBootloader Version
deviceversionsumiVerUNKNOWN
deviceversionssoftwareVerSoftware Version
device-_rawDataRaw preferences data as json
device-macMac address of the robot
device-nameName of the robot
device-typeType of the robot
states--Status information
states-_connectedConnection state
states-batteryBattery level of the robot
states-binFullState whether bin status is full
states-binInsertedState whether bin is inserted
states-dockedState whether robot is docked
states-signalSignal strength
states-statusCurrent status of the robot
statistics--Statistic Information
statisticsmissions-Mission Statistics
statisticsmissionsfailedNumber of failed cleaning jobs
statisticsmissionssucceedNumber of successful cleaning jobs
statisticsmissionstotalNumber of cleaning jobs
statisticstime-Time Statistics
statisticstimeavgMinUNKNOWN
statisticstimehOnDockUNKNOWN
statisticstimenAvailUNKNOWN
statisticstimeestCapUNKNOWN
statisticstimenLithChrgUNKNOWN
statisticstimenNimhChrgUNKNOWN
statisticstimenDocksUNKNOWN
--refreshedDateTimeDateTime of last update
--refreshedTimestampTimestamp of last update

Description of Preferences (incomplete)

The following payload will be received when calling getPreferences() (see https://github.com/karlvr/dorita980#getpreferences):

ObjectIndexTypeDescriptionioBroker State
netinfo-objectNetwork Information of the Roomba connection-
netinfo.dhcpbooleanState whether DHCP is activateddevice.network.dhcp
netinfo.addripIP addressdevice.network.ip
netinfo.maskipSubnet adressdevice.network.subnet
netinfo.gwipGateway addressdevice.network.gateway
netinfo.dns1ipPrimary DNS addressdevice.network.dns1
netinfo.dns2ipSecondary DNS addressdevice.network.dns2
netinfo.bssidmacMac address of routerdevice.network.router
netinfo.secintegerUnknown(not mapped)
wifistat-objectUnknown-
wifistat.wifiintegerUnknown(not mapped)
wifistat.uapbooleanUnknown(not mapped)
wifistat.cloudintegerUnknown(not mapped)
wlcfg-objectUnknown-
wlcfg.secintegerUnknown(not mapped)
wlcfg.ssidstringUnknown(not mapped)
mac-macMac address of Roomba-
country-stringUnknown-
cloudEnv-stringUnknown-
svcEndpoints.svcDeplIdstringUnknown-
mapUploadAllowed-booleanUnknown-
localtimeoffset-integerUnknown-
...-......-

Please help us regarding the description of the preferences. If you know the meaning of preferences stated as unknown in the table, let me know their meaning via an issue!

Smart Home / Alexa integration using ioBroker.javascript

Send Map via Telegram when mission is finished

This requires the ioBroker adapter ioBroker.telegram to be installed (https://github.com/ioBroker/ioBroker.telegram).

Create a script in the "common" folder of ioBroker.javascript and add the following listener to it:

var _fs = require('fs');

/*
 * MISSION END: Send map
 * 
 */
var message = "%device.name% finished at %missions.current.endedDateTime% cleaning %missions.current.sqm% sqm in %missions.current.runtime% seconds (%missions.current.error% errors).";
var ns = 'roomba.0';
var imagePath = 'tmp/';

on({id: ns + '.missions.current.ended', change: 'any'}, function(obj)
{
    if (!obj.state || !obj.state.val) return;
    
    // replace variables with state values
    var pos, variable, state, value;
    while (message.indexOf('%') > -1)
    {
        pos = message.indexOf('%');
        variable = message.substring(pos, message.indexOf('%', pos+1)+1);
        state = getState(ns + '.' + variable.replace(/%/g, ''));
        
        if (state !== null && state.val !== null)
            value = state.val
        else
        {
            log('State ' + variable.replace(/%/g, '') + ' not found!', 'warn');
            value =  '';
        }

        if (typeof value === "boolean") value = value === true ? 'with' : 'no';
        message = message.replace(RegExp(variable, 'gi'), value);
    }
    
    // console
    log(message);
    
    // get image
    var img = getState(ns + '.missions.current.mapImage').val;

    if (img !== null && img.indexOf('data:image/png;base64,') > -1)
    {
        _fs.writeFile(imagePath + 'image.png', img.replace(/^data:image\/png;base64,/, ''), 'base64', function(err)
        {
            if (err !== null)
                log(err.message, 'warn');
            else
                sendTo('telegram', {text: imagePath + 'image.png', message: message});
        });
    }
});

2019-05-04 fixed error that prevented sending the map

You may edit the variable message to any notification you would like to receive with the map. You may use %name-of-state% to retrieve the value of a state within the ioBroker.roomba object tree.

Changelog

1.3.0 (2024-04-26)

  • (mcm1957) Adapter requires node.js >= 18 and js-controller >= 5 now
  • (mcm1957) Dependencies have been updated

1.2.2 (2023-09-03)

  • (mcm1957) some dependencies have been upgraded
  • (TheRealArthurDent) Background color of the adapter settings page has been removed to make it useable in dark mode.

1.2.1 (2023-08-09)

  • (mcm1957) dorita980 dependency has been upgraded
  • (mcm1957) some other dependencies have been upgraded
  • (mcm1957) Adapter now requires node 16 or newer and js-controller 4.0.24 or newer

1.2.0 (2023-08-09)

  • (TheRealArthurDent) dorita980 has been updated (see PR #144)
  • (mcm1957) Release script has been updated
  • (mcm1957) Several issues reported by adapter checker have been fixed

1.1.4 (2021-07-19)

  • (Apollon77) Adjust some types to prevent js-controller 3.3 warnings
  • (thost96) fix hanging state loading in frontend
  • (thost96) fixed link in canvas warning

1.1.1 (2020-02-16)

  • (Zefau) moved development to Community Repository

1.1.0 (2020-02-06)

  • (Zefau) added support to change schedule (see #36)
  • (Zefau) fixed bug with state commands.last.dateTime having incorrect value NaN
  • (Zefau) fixed error message shown when robot is on a mission but map is not given

1.1.0 (2020-02-06)

  • (Zefau) acknowledged support for S9+ (see #34)

1.0.7 (2019-09-03)

  • (Zefau) fixed bugs occurring when Roomba is on a mission
  • (Zefau) added additional debug logging

1.0.6 (2019-08-19)

  • (Zefau) added loading screen to web interface

1.0.5 (2019-08-18)

  • (Zefau) fixed failing secure connection
  • (Zefau) fixed broken credential retrieval
  • (Zefau) fixed broken refresh

1.0.4 (2019-08-15)

  • (Zefau) fixed password retrieval
  • (Zefau) fixed German translations
  • (Zefau) added donations button
  • (Zefau) updated dorita980 dependency to v3.1.3
  • (Zefau) updated canvas dependency to v2.6.0

1.0.3 (2019-07-23)

  • (Zefau) fixed bug uncaught exception: Cannot read property 'x' of undefined

1.0.2 (2019-07-20)

  • (Zefau) reworked placing home icon (#23)
  • (Zefau) updated dependencies to fix security vulnerabilities in depending packages

1.0.1 (2019-05-15)

  • (Zefau) fixed display error in Chrome (#19)
  • (@Apollon77) updated testing for Node.js v12 (#18)
  • (Zefau) updated dependencies

1.0.0 (2019-05-04)

  • (zefau) No changes, only bump to stable release

0.5.0 (2019-04-21)

  • (zefau) Added command buttons to map page / web interface (#17)
  • (zefau) Removed button to end mission manually missions.current._endMission
  • (zefau) Run stop command in the background when dock command is received (#14)
  • (zefau) Added Web Adapter as dependency

0.4.5 (2019-03-20)

  • Zefau) Refactored retrieval of preferences and added debug mode

0.4.4 (2019-03-15)

  • (@Apollon77) Core Files/Testing Update and introduce adapter-core (#8)

0.4.3 (2019-02-10)

  • (zefau) Improved compatibility for series 600

0.4.2 (2019-02-09)

  • (zefau) Bug fixing

0.4.1 (2019-02-03)

  • (zefau) Support for Compact Mode
  • (zefau) Bug fixing

0.4.0 (2019-01-08)

  • (zefau) Support for e5 and 600 series (due to support by dorita980)

0.3.0 (2019-01-06)

  • (zefau) Image / Map of the current cleaning mission will be created
  • (zefau) Removed encryption of password

0.2.3 (2018-12-03)

  • (zefau) Fixed an issue encrypting the password when entered by user (no automated retrieval)

0.2.2 (2018-12-02)

  • (zefau) Password will now be stored encrypted

Note: If you are coming from an earlier version, you have to (1) empty your settings, (2) save, (3) restart the adapter and (4) enter / fetch credentials again (duo to the fact that password will be stored encrypted now)

0.2.1 (2018-11-25)

  • (zefau) Fixed / improved automatically retrieving of authentication credentials

0.2.0 (2018-11-18)

  • (zefau) improved admin interface to automatically retrieve authentication credentials

0.1.0 (2018-11-04)

  • (zefau) initial version

Credits

unofficial API

Thanks to @koalazak for the unofficial iRobot Roomba 980 node.js library (SDK).

Icons

Icons made by Iconnice from www.flaticon.com is licensed by CC 3.0 BY

License

The MIT License (MIT)

Copyright (c) 2023-2024 ioBroker Community Developers iobroker-community-adapters@gmx.de
Copyright (c) 2018-2020 Zefau zefau@mailbox.org

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.3.0

4 days ago

1.2.2

8 months ago

1.2.0

9 months ago

1.2.1

9 months ago

1.1.4

3 years ago

1.1.1

4 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.2

5 years ago

0.4.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago