Released RedBot 1.0

A new version of RedBot was released today, the biggest change is Mission Control: a persistance layer and pluggable control panel for RedBot’s bots.

Key features:

  • Storage for inbound and outbound messages (SQLite)
  • Chatbot user management and persisted chat context (SQLite)
  • Admins management with multiple roles
  • Basic Content Management System with custom fields
  • Chatbot simulator
  • GraphQL endpoint to access SQLite database
  • New Node-RED nodes (MC GraphQL, MC Simulator, etc)
  • Plugins repository for additional features
  • Pluggable and open architecture
  • Docker image

Read more about this new release here

Currently have Node-Red as add-on through HA.

Attempting to get mission-control option to pop up within Nodes but can’t seem to get it into env variable/then install. HA setup on Rpi4 standalone so no docker available to install that way and unable to install through terminal.

Help would be greatly appreciated (newbie alert)

Hi, try this

The problem is that HA is running on Arm and not all dependencies have binaries for Arm, then a compilation is needed, but the default container that runs the installation doesn’t have all the stuff to run a compilation.

There’s now a Docker image for RedBot (guidone/redbot) it’s compiled for arm and amd (don’t know if it works on a RP)

Guido

Tried to run an example from this page but every time a new message is created instead of editing previous. As I can see in this repo, messageId is not used at all. Am I correct? @guido.bellomo

Hi @igormartynov,

this is an inconsistency fixed with the new release, the originalMessage.messageId is the id of in inbound message, while sentMessage.messageId is the id of the outbound message (it’s available after the sender node if you enable the pass thru option)

This example is quite old and needs to be updated, thanks for pointing out

Guido

Guido, thanks a lot!

Now I see the sentMessage object, but clicking “Pass Through” option disables “Track” option and makes two step chain tracking from that example impossible - every new inline button reply starts from the beginning.

However, trying to set messageId manually (n-1) before the conversation node didn’t work either. It fires a new message all the time :frowning:

Ok, there are two problems here:

  1. The “modify message” example is not working, I’ll fix that shortly (update the help page and send a working example).
    This should be quick

  2. The pass-thru pin should not be alternative to the track, otherwise in a track scenario there’s no way to know the id of the sent message
    It should not have a great impact, but I’ve to test this a little in order to not break any existing bots

1 Like

Ok, try this workaround.

The messageId of the sent message is already in the context, the following flow does this: takes the messageId from the chat context and uses it to configure the Params node (which is the canonical way to edit a previously sent message).

The params nodes needs a fix, also I need to fix this ambiguity for this messageId key (sometimes is the id of the inbound message, sometimes the id of the outbound message)

For the moment the workaround is this (will also work in the future)

[
    {
        "id": "d28a227e26fc15ed",
        "type": "chatbot-telegram-receive",
        "z": "27b3570b012befb9",
        "bot": "ece4ecb.f25621",
        "botProduction": "",
        "x": 410,
        "y": 600,
        "wires": [
            [
                "7fe9c7edd2c5906e"
            ]
        ]
    },
    {
        "id": "7fe9c7edd2c5906e",
        "type": "chatbot-message",
        "z": "27b3570b012befb9",
        "name": "",
        "message": [
            {
                "message": "send"
            }
        ],
        "language": "none",
        "x": 620,
        "y": 600,
        "wires": [
            [
                "27a9765db29ff6ae"
            ]
        ]
    },
    {
        "id": "27a9765db29ff6ae",
        "type": "chatbot-telegram-send",
        "z": "27b3570b012befb9",
        "bot": "ece4ecb.f25621",
        "botProduction": "",
        "track": true,
        "passThrough": false,
        "errorOutput": false,
        "outputs": 1,
        "x": 810,
        "y": 600,
        "wires": [
            [
                "7a7a578b870c59f7"
            ]
        ]
    },
    {
        "id": "7a7a578b870c59f7",
        "type": "chatbot-message",
        "z": "27b3570b012befb9",
        "name": "Modify message",
        "message": [
            {
                "message": "modified!"
            }
        ],
        "language": "none",
        "x": 400,
        "y": 720,
        "wires": [
            [
                "5b66582b3d0a7460"
            ]
        ]
    },
    {
        "id": "fd619aadeaecb2c5",
        "type": "chatbot-telegram-send",
        "z": "27b3570b012befb9",
        "bot": "ece4ecb.f25621",
        "botProduction": "",
        "track": false,
        "passThrough": true,
        "errorOutput": false,
        "outputs": 1,
        "x": 890,
        "y": 720,
        "wires": [
            []
        ]
    },
    {
        "id": "5b66582b3d0a7460",
        "type": "function",
        "z": "27b3570b012befb9",
        "name": "set sent message id",
        "func": "const chat = msg.chat();\n\n(async () => {\n    const messageId = await chat.get('messageId');\n    msg.payload.params = {\n        modifyMessageId: messageId\n    };\n    node.send(msg);\n})();\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 640,
        "y": 720,
        "wires": [
            [
                "fd619aadeaecb2c5"
            ]
        ]
    },
    {
        "id": "ece4ecb.f25621",
        "type": "chatbot-telegram-node",
        "botname": "Guidone TEST",
        "usernames": "",
        "polling": "1000",
        "store": "99497719.973138",
        "log": "",
        "debug": true,
        "skipMediaFiles": true,
        "webHook": "https://bd97e3ceea05.ngrok.io/redbot/telegram",
        "connectMode": "polling"
    },
    {
        "id": "99497719.973138",
        "type": "chatbot-context-store",
        "name": "memory",
        "contextStorage": "memory",
        "contextParams": ""
    }
]
1 Like

Cool! Thank you, Guido. In this workaround there is no Conversation node, but it works!) It uses modifyMessageId param which I didn’t see before. I’ll try to implement it in my case. Also, i’m using another way of receiving messageId from chat: var chat = msg.chat();var messageId = await chat.get('messageId'); is it valid?

The modifyMessageId param is set by the params node (now it has a bug, that’s why I’m using a function node).
It works (but you have to wrap it in an async function).

The param node is meant to be used anywhere, it doesn’t matter if the conversation was started by the user or with a conversation node, it just adds a flag telling “change this message” and can be applied after the message (any message text, button, erc)

1 Like

I’ve updated the docs about the structure of a message

Hope it helps