good morning,
i use NodeRED3.0.2 on docker
i installed node-red-contrib-alexa-cakebaked
i have mosquitto and domoticz
How do I make an alexa logger, that is, make alexa upon receiving the word 'external', activate the (working) procedure below?
Summary
[
{
"id": "fdedac607f20a384",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5253a127667fc9a5",
"type": "alexa-remote-event",
"z": "fdedac607f20a384",
"name": "",
"account": "47f699050b265e92",
"event": "ws-device-activity",
"x": 630,
"y": 660,
"wires": [
[
"11bffad747f3f612"
]
]
},
{
"id": "f8efa717343628cc",
"type": "mqtt in",
"z": "fdedac607f20a384",
"name": "temperatura esterna",
"topic": "tele/wemos/SENSOR",
"qos": "2",
"datatype": "json",
"broker": "22f544be.780a3c",
"nl": false,
"rap": false,
"inputs": 0,
"x": 630,
"y": 500,
"wires": [
[
"baf5fe3e71a1b2fc",
"d3a282d36b3d0d32"
]
]
},
{
"id": "11bffad747f3f612",
"type": "switch",
"z": "fdedac607f20a384",
"name": "Filter",
"property": "payload.alexaResponse",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "temperatura è",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 830,
"y": 660,
"wires": [
[
"59a455c2845c1f98",
"e56b1b4bfdd3e432"
]
]
},
{
"id": "f3af5c6c1ae94823",
"type": "alexa-remote-routine",
"z": "fdedac607f20a384",
"name": "",
"account": "47f699050b265e92",
"routineNode": {
"type": "speak",
"payload": {
"type": "announcement",
"text": {
"type": "msg",
"value": "payload"
},
"devices": [
"G090XG07936518WL"
]
}
},
"x": 1440,
"y": 660,
"wires": [
[]
]
},
{
"id": "e56b1b4bfdd3e432",
"type": "function",
"z": "fdedac607f20a384",
"name": "Read variable(s) and format message for Alexa",
"func": "// Get the flow variable(s) to be used in the message\nvar temperature = flow.get(\"temperature\") || 0;\n\n// Convert them to a string\ntemperature = temperature.toString();\n\n// Start building the message\nvar message = \"<break time='0.25s'/>Ciao,<break time='0.5s'/>\";\n\nmessage += \"la temperatura esterna è di <break time='0.1s'/>\"+temperature+ \"gradi celsius <break time='0.25s'/>\";\n\n// This the footer for the message\nmessage += \"<break time='0.75s'/> timeout tra un minuto \";\n\nmsg.payload = message;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1120,
"y": 660,
"wires": [
[
"f3af5c6c1ae94823",
"7f88b08aed61d571"
]
]
},
{
"id": "baf5fe3e71a1b2fc",
"type": "debug",
"z": "fdedac607f20a384",
"name": "6",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 590,
"y": 460,
"wires": []
},
{
"id": "59a455c2845c1f98",
"type": "debug",
"z": "fdedac607f20a384",
"name": "7",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 720,
"wires": []
},
{
"id": "7f88b08aed61d571",
"type": "debug",
"z": "fdedac607f20a384",
"name": "11",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1090,
"y": 720,
"wires": []
},
{
"id": "d3a282d36b3d0d32",
"type": "function",
"z": "fdedac607f20a384",
"name": "",
"func": "// Save the reading(s) in a flow variable\n\nflow.set(\"temperature\",msg.payload.BMP280.Temperature);\n\nreturn null;\n",
"outputs": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 800,
"y": 500,
"wires": []
},
{
"id": "08b43918836be61e",
"type": "function",
"z": "fdedac607f20a384",
"name": "Prova di impostazione della temperatura a 21",
"func": "flow.set(\"temperature\",msg.payload);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 910,
"y": 560,
"wires": [
[]
]
},
{
"id": "84d618598d0b0934",
"type": "inject",
"z": "fdedac607f20a384",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "21",
"payloadType": "num",
"x": 610,
"y": 560,
"wires": [
[
"08b43918836be61e"
]
]
},
{
"id": "c9173e06c5b4a993",
"type": "inject",
"z": "fdedac607f20a384",
"name": "Fare clic per verificare il testo inviato ad Alexa",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 730,
"y": 620,
"wires": [
[
"e56b1b4bfdd3e432"
]
]
},
{
"id": "47f699050b265e92",
"type": "alexa-remote-account",
"name": "opt",
"authMethod": "proxy",
"proxyOwnIp": "10.0.0.202",
"proxyPort": "3456",
"cookieFile": "authFile",
"refreshInterval": "3",
"alexaServiceHost": "alexa.amazon.it",
"amazonPage": "amazon.it",
"acceptLanguage": "it-IT",
"userAgent": "",
"useWsMqtt": "on",
"autoInit": "on"
},
{
"id": "22f544be.780a3c",
"type": "mqtt-broker",
"name": "Mosquitto",
"broker": "10.0.0.202",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"compatmode": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]