hey guys,
just a quick question I guess about the telegram on reply node.
the idea is to send me a message when the lights are still on at 8PM with the question if I want to turn them off.
I do receive the message but the reply is not noticed by the reply node. the only thing I can think of is that there something wrong with the payload in the function node.
Hope you guys can help me.
[
{
"id": "4efa66c647b6a5d2",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "94e6c6a37ead33c3",
"type": "inject",
"z": "4efa66c647b6a5d2",
"name": "@ 20:00",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "00 20 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "ON",
"payloadType": "str",
"x": 120,
"y": 180,
"wires": [
[
"83590f1f3671fa9d"
]
]
},
{
"id": "83590f1f3671fa9d",
"type": "switch",
"z": "4efa66c647b6a5d2",
"name": "Bedlamp aan",
"property": "Big_Bedroom_Bedlight",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "ON",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 270,
"y": 180,
"wires": [
[
"6164b2f6f8a972ab"
]
]
},
{
"id": "f10fc8340d3ab77e",
"type": "telegram reply",
"z": "4efa66c647b6a5d2",
"name": "get reply",
"bot": "01444d293b516083",
"x": 780,
"y": 180,
"wires": [
[
"2a1c3cd8afcf5737"
]
]
},
{
"id": "e859102b524c4d39",
"type": "telegram sender",
"z": "4efa66c647b6a5d2",
"name": "Send question",
"bot": "01444d293b516083",
"haserroroutput": false,
"outputs": 1,
"x": 620,
"y": 180,
"wires": [
[
"f10fc8340d3ab77e"
]
]
},
{
"id": "2a1c3cd8afcf5737",
"type": "function",
"z": "4efa66c647b6a5d2",
"name": "switch answer",
"func": "if(msg.payload.content === 'Yes')\n{\n return [msg, null]; \n}\nelse\n{\n return [null, msg]; \n}\n",
"outputs": "2",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 940,
"y": 180,
"wires": [
[],
[]
]
},
{
"id": "6164b2f6f8a972ab",
"type": "function",
"z": "4efa66c647b6a5d2",
"name": "create question",
"func": "msg.payload = {\n \"chatId\": xxx, // << set to chat id\n \"type\": \"message\",\n \"content\": \"Moet het licht bij FĂ©line uit?\",\n \"options\": {reply_to_message_id: msg.payload.messageId}\n}\nreturn msg;",
"outputs": "1",
"noerr": 1,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 180,
"wires": [
[
"e859102b524c4d39"
]
]
},
{
"id": "01444d293b516083",
"type": "telegram bot",
"botname": "openhabbey_bot",
"usernames": "Enz0jacco",
"chatids": "xxx",
"baseapiurl": "",
"updatemode": "polling",
"pollinterval": "300",
"usesocks": false,
"sockshost": "",
"socksprotocol": "socks5",
"socksport": "6667",
"socksusername": "anonymous",
"sockspassword": "",
"bothost": "",
"botpath": "",
"localbotport": "8443",
"publicbotport": "8443",
"privatekey": "",
"certificate": "",
"useselfsignedcertificate": false,
"sslterminated": false,
"verboselogging": true
}
]