Hi, I am trying to send a message to a ChatBot when a given event haven but for some reason, I am unable to get this working properly, need some more eyes on top of it maybe I am missing something.
This is a general idea of what I have done so far:
The above flow has two errors:
- The debug named
Output Text
does not output anything, no idea why - Even if the message says it was “success” I don’t get it on Telegram.
This is the JSON:
[
{
"id": "acc66eae0bd38f04",
"type": "tab",
"label": "Lights On",
"disabled": false,
"info": "",
"env": [
]
},
{
"id": "53068e834c06c590",
"type": "server-state-changed",
"z": "acc66eae0bd38f04",
"name": "Office Fan On",
"server": "e593dd3.052432",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "fan.office_switch",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"for": "2",
"forType": "num",
"forUnits": "seconds",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
}
],
"x": 110,
"y": 220,
"wires": [
[
"20ef09168211f89b"
],
[
]
]
},
{
"id": "20ef09168211f89b",
"type": "template",
"z": "acc66eae0bd38f04",
"name": "Get Friendly Name",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "{{payload.new_state.attributes.friendly_name}}",
"output": "str",
"x": 330,
"y": 220,
"wires": [
[
"45539f102a173ff4",
"905010c14ae31dc5",
"9e2c2f4782d6b56b"
]
]
},
{
"id": "9e2c2f4782d6b56b",
"type": "chatbot-conversation",
"z": "acc66eae0bd38f04",
"name": "",
"botDevelopment": "780d533fd55e876e",
"botProduction": "780d533fd55e876e",
"chatId": "1063333784",
"userId": "",
"transport": "telegram",
"x": 630,
"y": 320,
"wires": [
[
"4d13621c211594c8"
]
]
},
{
"id": "bce12a94f8d109d8",
"type": "debug",
"z": "acc66eae0bd38f04",
"name": "Message Success",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1050,
"y": 280,
"wires": [
]
},
{
"id": "45539f102a173ff4",
"type": "debug",
"z": "acc66eae0bd38f04",
"name": "Friendly Name",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 560,
"y": 160,
"wires": [
]
},
{
"id": "31e053355ae220e6",
"type": "debug",
"z": "acc66eae0bd38f04",
"name": "Message Failed",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1040,
"y": 360,
"wires": [
]
},
{
"id": "4d13621c211594c8",
"type": "chatbot-telegram-send",
"z": "acc66eae0bd38f04",
"bot": "780d533fd55e876e",
"botProduction": "780d533fd55e876e",
"track": false,
"passThrough": true,
"errorOutput": true,
"outputs": 2,
"x": 830,
"y": 320,
"wires": [
[
"bce12a94f8d109d8"
],
[
"31e053355ae220e6"
]
]
},
{
"id": "1f6e139f0eee4fcb",
"type": "debug",
"z": "acc66eae0bd38f04",
"name": "Output Text",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 710,
"y": 220,
"wires": [
]
},
{
"id": "905010c14ae31dc5",
"type": "chatbot-message",
"z": "acc66eae0bd38f04",
"name": "",
"message": [
{
"message": "{{payload}} has been on for more than 5 minutes!"
}
],
"language": "none",
"x": 530,
"y": 220,
"wires": [
[
"1f6e139f0eee4fcb",
"9e2c2f4782d6b56b"
]
]
},
{
"id": "e593dd3.052432",
"type": "server",
"name": "Home Assistant",
"addon": true
},
{
"id": "780d533fd55e876e",
"type": "chatbot-telegram-node",
"botname": "RPHomeIntegrationBot",
"usernames": "",
"polling": "1000",
"store": "",
"log": "",
"debug": true,
"skipMediaFiles": false,
"webHook": "",
"connectMode": "polling",
"storeMessages": true,
"enableMissionControl": false,
"inspectMessages": true,
"chatbotId": ""
}
]
What I am missing here?