node-red-contrib-neato-botvac

    0.2.2 • Public • Published

    node-red-contrib-neato-botvac

    Node-Red node for Neato Botvac robots

    Depends on node-botvac

    Important Information

    Due to add map supprt I had to rename the neato-botvac node to neato-status since Version 0.1.0. Sorry!

    Configuration

    1. Place "neato status" node
    2. Open configuration of node and click on the pencil button to create a new neato configuration
    3. Enter eMail and password of your neato account (you need to be registered!)
    4. Configure the index of the robot (0 - first robot, 1 - second robot, ...)

    Usage

    Status-Update

    If you want to get a status update of the robot the payload needs to be value 'true'. Following output is generated by the web api of neato:

    {
        "payload":
            {
                "version":1,
                "reqId":"77",
                "result":"ok",
                "data":{},
                "error":null,
                "alert":"nav_floorplan_load_fail",
                "state":1,
                "action":0,
                "cleaning":
                {
                    "category":2,
                    "mode":2,
                    "modifier":1,
                    "navigationMode":1,
                    "spotWidth":0,
                    "spotHeight":0
                },
                "details":
                {
                    "isCharging":false,
                    "isDocked":true,
                    "isScheduleEnabled":true,
                    "dockHasBeenSeen":false,
                    "charge":95
                },
                "availableCommands":
                {
                    "start":true,
                    "stop":false,
                    "pause":false,
                    "resume":false,
                    "goToBase":false
                },
                "availableServices":
                {
                    "findMe":"basic-1",
                    "generalInfo":"basic-1",
                    "houseCleaning":"basic-3",
                    "IECTest":"advanced-1",
                    "logCopy":"basic-1",
                    "maps":"macro-1",
                    "preferences":"basic-2",
                    "schedule":"minimal-1",
                    "softwareUpdate":"basic-1",
                    "spotCleaning":"minimal-2",
                    "wifi":"basic-1"
                },
                "meta":
                {
                    "modelName":"BotVacD5Connected",
                    "firmware":"4.5.0-179"
                }
            },
            "topic":"result",
            "_msgid":"f407cae1.707da8"
        }

    For more information about the possible output visit Neato Robot Remote Protocol or Neato Nucleo Api

    Commands

    The following commands are available at the moment:

    start

    All parameters which are not given will be preset with the internal settings of robot! Parameters are only examples here...

    {"command":"start","eco":true,"navigationmode":1,"nogolines":false}

    pause

    {"command":"pause"}

    resume

    {"command":"resume"}

    stop

    {"command":"stop"}

    sendtobase

    Available only on some models!

    {"command":"sendtobase"}

    findme

    {"command":"findme"}

    dismissCurrentAlert

    {"command":"dismissCurrentAlert"}

    enableSchedule

    {"command":"enableSchedule"}

    disableSchedule

    {"command":"disableSchedule"}

    getSchedule

    {"command":"getSchedule"}

    startSpotCleaning

    All parameters which are not given will be preset with the internal settings of robot! Parameters are only examples here...

    {"command":"startSpotCleaning","eco":true,"width":50, "height": 20, "repeat":false, "navigationmode":1}

    startManualCleaning

    All parameters which are not given will be preset with the internal settings of robot! Parameters are only examples here...

    {"command":"startManualCleaning","eco":true,"navigationmode":1}

    startCleaningBoundary

    All parameters (except boundaryId) which are not given will be preset with the internal settings of robot! To execute the command you have to set a boundaryId of a map! Parameters are only examples here...

    {"command":"startCleaningBoundary","eco":true, "extraCare":false, "boundaryId":"XXXXX"}

    Getting map information

    To get map information place the neato-maps node and configure the neato config as described above. Any command on the input side will cause to get the actual map data from your configured robot.

    Example of the output data of the node:

    {
        "payload":
        {
            "stats": {},
            "maps":[
                {
                    "id":"2019-10-16T07:00:01Z",
                    "url":"https://neatorobotics.s3.amazonaws.com/....",
                    "url_valid_for_seconds":300,
                    "version":1,
                    "generated_at":"2019-10-16T07:42:55Z",
                    "status":"complete",
                    "launched_from":"schedule",
                    "error":null,
                    "modifier":1,
                    "start_at":"2019-10-16T07:00:01Z",
                    "end_at":"2019-10-16T07:42:55Z",
                    "end_orientation_relative_degrees":4,
                    "run_charge_at_start":98,
                    "run_charge_at_end":67,
                    "persistent_map_id":null,
                    "cleaned_with_persistent_map_id":null,
                    "suspended_cleaning_charging_count":0,
                    "time_in_suspended_cleaning":0,
                    "time_in_error":0,
                    "time_in_pause":0,
                    "cleaned_area":36.4224,
                    "base_count":1,
                    "is_docked":true,
                    "delocalized":false,
                    "valid_as_persistent_map":false,
                    "category":2,
                    "mode":2,
                    "navigation_mode":1
                },
                //... Up to 20 entries
            ]
        }
    }

    Getting boundary information

    To get boundary information place the neato-boundary node and configure the neato config as described above. There are two commands to execute in this node:

    getMapBoundaries

    To get a mapID you have to look for it with the neato-map node! Parameters are only examples here...

    {"command":"startSpotCleaning","mapid":"-->Get this with the map node!"}

    setMapBoundaries

    To get a mapID you have to look for it with the neato-map node! Boundaries are given as array with the following data:

    • {string} color - color hex code for a type polygone or '#000000' for a type polyline
    • {bool} enabled - always true, unknown usage
    • {string} id - boundary id (uuid-v4)
    • {string} name - polygone name or empty string for a type polyline
    • {number[]} [relevancy] - array of 2 number, center of a type polygone
    • {string} type - either polyline (for a no go lines) or polygon (for a zone)
    • {number[][]} vertices - array of array of two points, coordinates of the points Parameters are only examples here...
    {"command":"startSpotCleaning","mapid":"-->Get this with the map node!", "boundaries":"-->see object definition above"}

    Error and Alerts

    To extract the errors and alerts out of the complete payload of the status node, I added the nodes neato-alerts and neato-errors. These two nodes will give you a human readable string of the enum which Neato offers. Simply connect these to the neato-status node.

    State and Action

    To extract the state and action out of the complete payload of the status node, I added the nodes neato-state and neato-action. These two nodes will give you a human readable string of the enum which Neato offers. Simply connect these to the neato-status node.

    ToDo

    Please open an issue to ask for new features!

    Install

    npm i node-red-contrib-neato-botvac

    DownloadsWeekly Downloads

    3

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    69.9 kB

    Total Files

    27

    Last publish

    Collaborators

    • thorsten2605