Building A Custom Alexa Skill – Part 7 - A Brand New approach (NO AWS / LAMBDA!) (Part 3)

https://community.home-assistant.io/t/building-a-custom-alexa-skill-part-7-a-brand-new-approach-no-aws-lambda-part-2/730815

Node Red Entry Point Configuration:

[{"id":"eeb740bcc0a3f668","type":"tab","label":"Chat GPT","disabled":false,"info":"sk-proj-O7TGUZpWnPLVaCLrUkEMT3BlbkFJ0ALZF5Cws1Ws0Ctotx2Z","env":[]},{"id":"114253f65ae3b452","type":"debug","z":"eeb740bcc0a3f668","name":"debug 9","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":120,"wires":[]},{"id":"c29cc473c9233ab6","type":"ha-webhook","z":"eeb740bcc0a3f668","name":"Jarvis IN","server":"4afbd465.07e87c","version":3,"exposeAsEntityConfig":"","outputs":1,"webhookId":"6HR2OmUVwjaX6krVu6c3kwWf3acdbde275f244798ae293c24d12732009DnH3cZ","method_get":true,"method_head":false,"method_post":true,"method_put":false,"outputProperties":[{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"payloadLocation":false,"payloadLocationType":false,"headersLocation":false,"headersLocationType":false,"x":80,"y":380,"wires":[["cd19d82ee4534e96","763ecb8dafee8631"]]},{"id":"cd19d82ee4534e96","type":"debug","z":"eeb740bcc0a3f668","name":"debug 18","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":260,"y":540,"wires":[]},{"id":"763ecb8dafee8631","type":"switch","z":"eeb740bcc0a3f668","name":"What to do based upon Alexa Intent","property":"payload.params.jsonobj.name","propertyType":"msg","rules":[{"t":"eq","v":"HouseLightsBrightnessPercent","vt":"str"},{"t":"eq","v":"YesIntentHandler","vt":"str"},{"t":"eq","v":"NoIntentHandler","vt":"str"},{"t":"eq","v":"LightTimerIntent","vt":"str"},{"t":"eq","v":"HouseLightsOnOffIntent","vt":"str"},{"t":"eq","v":"HouseLightsBrightnessIntent","vt":"str"},{"t":"eq","v":"CancelAndStopIntentHandler","vt":"str"},{"t":"eq","v":"FallbackIntentHandler","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":9,"x":420,"y":380,"wires":[["55688ef548b50c3b","114253f65ae3b452"],["0c89f187fdc707ef","e0ab682879caade1"],["dfdf1b46dc51ceba","a70d32f7142594cf"],["7c14767b5b0a34e4","5d2c4729b4d838cd"],["f82b0c46672a9535","fc3ded42a86e7e54"],["8c320c53cb1c70ab","a40db93cbddd8bf9"],["f9e4c580ae444cb0","6f0bd8e8bd1371e7"],["f09ce0c77bd4c8a0","be772aa4a91d4512"],["61ba5e97586343cf","ca071bc89e48b522"]]},{"id":"55688ef548b50c3b","type":"link call","z":"eeb740bcc0a3f668","name":"HouseLightsBrightnessPercent","links":["4e551c2f2aa851f9"],"linkType":"static","timeout":"30","x":750,"y":220,"wires":[["896e5196aa0b33e4"]]},{"id":"0c89f187fdc707ef","type":"link call","z":"eeb740bcc0a3f668","name":"YesIntentHandler","links":["91e8875edbc58fe3"],"linkType":"static","timeout":"30","x":710,"y":260,"wires":[["896e5196aa0b33e4"]]},{"id":"dfdf1b46dc51ceba","type":"link call","z":"eeb740bcc0a3f668","name":" NoIntentHandler","links":["9e974fc5287311b3"],"linkType":"static","timeout":"30","x":700,"y":300,"wires":[["896e5196aa0b33e4"]]},{"id":"7c14767b5b0a34e4","type":"link call","z":"eeb740bcc0a3f668","name":"LightTimerIntent","links":["19d4d17e3ead9b90"],"linkType":"static","timeout":"30","x":700,"y":340,"wires":[["896e5196aa0b33e4"]]},{"id":"f82b0c46672a9535","type":"link call","z":"eeb740bcc0a3f668","name":"HouseLightsOnOffIntent","links":["de3c5d4f2df4a11c"],"linkType":"static","timeout":"30","x":730,"y":380,"wires":[["896e5196aa0b33e4"]]},{"id":"8c320c53cb1c70ab","type":"link call","z":"eeb740bcc0a3f668","name":"HouseLightsBrightnessIntent","links":["d067d07807262868"],"linkType":"static","timeout":"30","x":740,"y":420,"wires":[["896e5196aa0b33e4"]]},{"id":"f9e4c580ae444cb0","type":"link call","z":"eeb740bcc0a3f668","name":"CancelAndStopIntentHandler","links":["1ceb2f0e737ead00"],"linkType":"static","timeout":"30","x":740,"y":460,"wires":[["896e5196aa0b33e4"]]},{"id":"f09ce0c77bd4c8a0","type":"link call","z":"eeb740bcc0a3f668","name":"FallbackIntentHandler","links":["8dccd90597b7dbeb"],"linkType":"static","timeout":"30","x":720,"y":500,"wires":[["896e5196aa0b33e4"]]},{"id":"61ba5e97586343cf","type":"link call","z":"eeb740bcc0a3f668","name":"Fallback","links":["99b42a6bdc17873b"],"linkType":"static","timeout":"30","x":680,"y":540,"wires":[["896e5196aa0b33e4"]]},{"id":"2963e960015d82c4","type":"api-call-service","z":"eeb740bcc0a3f668","name":"","server":"4afbd465.07e87c","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["sensor.last_alexa"],"data":"{\t   \"media_content_id\":\"{{payload.response}}\",   \t   \"media_content_type\":\"custom\"\t}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1290,"y":360,"wires":[[]]},{"id":"896e5196aa0b33e4","type":"fan","z":"eeb740bcc0a3f668","name":"","x":1090,"y":360,"wires":[["2963e960015d82c4"]]},{"id":"e0ab682879caade1","type":"debug","z":"eeb740bcc0a3f668","name":"debug 19","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":160,"wires":[]},{"id":"a70d32f7142594cf","type":"debug","z":"eeb740bcc0a3f668","name":"debug 20","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":200,"wires":[]},{"id":"5d2c4729b4d838cd","type":"debug","z":"eeb740bcc0a3f668","name":"debug 21","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":240,"wires":[]},{"id":"fc3ded42a86e7e54","type":"debug","z":"eeb740bcc0a3f668","name":"debug 22","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":280,"wires":[]},{"id":"a40db93cbddd8bf9","type":"debug","z":"eeb740bcc0a3f668","name":"debug 23","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":480,"wires":[]},{"id":"6f0bd8e8bd1371e7","type":"debug","z":"eeb740bcc0a3f668","name":"debug 24","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":520,"wires":[]},{"id":"be772aa4a91d4512","type":"debug","z":"eeb740bcc0a3f668","name":"debug 25","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":560,"wires":[]},{"id":"ca071bc89e48b522","type":"debug","z":"eeb740bcc0a3f668","name":"debug 26","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":600,"wires":[]},{"id":"73d437c97e9870cd","type":"debug","z":"eeb740bcc0a3f668","name":"debug 27","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":640,"wires":[]},{"id":"1493d57b4886963b","type":"function","z":"eeb740bcc0a3f668","name":"function 66","func":"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":160,"wires":[[]]},{"id":"4afbd465.07e87c","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":true}]

House Lights On Off Flow:

[{"id":"c5096757313324d2","type":"tab","label":"Yes Intent","disabled":false,"info":"","env":[]},{"id":"91e8875edbc58fe3","type":"link in","z":"c5096757313324d2","name":"Yes in","links":[],"x":125,"y":120,"wires":[["4fb0a6df52f0eb2c"]]},{"id":"cff88ce2005f76dd","type":"link out","z":"c5096757313324d2","name":"link out 8","mode":"return","links":[],"x":845,"y":140,"wires":[]},{"id":"f8dbba13dc5b9c8a","type":"switch","z":"c5096757313324d2","name":"","property":"payload.nextAction.action","propertyType":"msg","rules":[{"t":"eq","v":"set_timer","vt":"str"},{"t":"eq","v":"turn_on","vt":"str"},{"t":"eq","v":"turn_off","vt":"str"},{"t":"eq","v":"brighten","vt":"str"},{"t":"eq","v":"dim","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":6,"x":410,"y":140,"wires":[["a293d3b4bae8b937"],["c86b8b6fdfdf93a6"],["ec8fea76c2f1c7dc"],["b6efe3ae1d7d5794"],["b6efe3ae1d7d5794"],["86508d2b9161396f"]]},{"id":"4fb0a6df52f0eb2c","type":"function","z":"c5096757313324d2","name":"function 18","func":"var nextAction = global.get('ChatGPTFollowUpData');\n//node.warn(nextAction);\nmsg.payload = {};\nmsg.payload.nextAction ={};\nmsg.payload.nextAction = nextAction; \nreturn msg;\n\n/*\nnextAction.entity = obj.payload.entity_id;\nnextAction.action = obj.payload.action;\nnextAction.value = obj.payload.value ?? 'none';\nglobal.set(\"ChatGPTFollowUpData\", nextAction);\n*/","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":140,"wires":[["f8dbba13dc5b9c8a"]]},{"id":"55da6249fc45fc59","type":"inject","z":"c5096757313324d2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":180,"wires":[["4fb0a6df52f0eb2c"]]},{"id":"cb169a25dece6cf7","type":"debug","z":"c5096757313324d2","name":"debug 36","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":440,"y":380,"wires":[]},{"id":"86508d2b9161396f","type":"function","z":"c5096757313324d2","name":"function 19","func":"msg.payload = {};\nmsg.payload = \"I'm sorry, I don't know how to do that.\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":260,"wires":[["cff88ce2005f76dd"]]},{"id":"a293d3b4bae8b937","type":"link call","z":"c5096757313324d2","name":"Set Timer","links":["19d4d17e3ead9b90"],"linkType":"static","timeout":"30","x":620,"y":60,"wires":[["cff88ce2005f76dd"]]},{"id":"c86b8b6fdfdf93a6","type":"link call","z":"c5096757313324d2","name":"Lights On","links":["de3c5d4f2df4a11c"],"linkType":"static","timeout":"30","x":620,"y":100,"wires":[["cff88ce2005f76dd"]]},{"id":"ec8fea76c2f1c7dc","type":"link call","z":"c5096757313324d2","name":"Lights Off","links":["de3c5d4f2df4a11c"],"linkType":"static","timeout":"30","x":620,"y":140,"wires":[["cff88ce2005f76dd"]]},{"id":"b6efe3ae1d7d5794","type":"link call","z":"c5096757313324d2","name":"Brighten","links":["d067d07807262868"],"linkType":"static","timeout":"30","x":620,"y":180,"wires":[["cff88ce2005f76dd"]]}]

Yes Intent:

[{"id":"c5096757313324d2","type":"tab","label":"Yes Intent","disabled":false,"info":"","env":[]},{"id":"91e8875edbc58fe3","type":"link in","z":"c5096757313324d2","name":"Yes in","links":[],"x":125,"y":120,"wires":[["4fb0a6df52f0eb2c"]]},{"id":"cff88ce2005f76dd","type":"link out","z":"c5096757313324d2","name":"link out 8","mode":"return","links":[],"x":845,"y":140,"wires":[]},{"id":"f8dbba13dc5b9c8a","type":"switch","z":"c5096757313324d2","name":"","property":"payload.nextAction.action","propertyType":"msg","rules":[{"t":"eq","v":"set_timer","vt":"str"},{"t":"eq","v":"turn_on","vt":"str"},{"t":"eq","v":"turn_off","vt":"str"},{"t":"eq","v":"brighten","vt":"str"},{"t":"eq","v":"dim","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":6,"x":410,"y":140,"wires":[["a293d3b4bae8b937"],["c86b8b6fdfdf93a6"],["ec8fea76c2f1c7dc"],["b6efe3ae1d7d5794"],["b6efe3ae1d7d5794"],["86508d2b9161396f"]]},{"id":"4fb0a6df52f0eb2c","type":"function","z":"c5096757313324d2","name":"function 18","func":"var nextAction = global.get('ChatGPTFollowUpData');\n//node.warn(nextAction);\nmsg.payload = {};\nmsg.payload.nextAction ={};\nmsg.payload.nextAction = nextAction; \nreturn msg;\n\n/*\nnextAction.entity = obj.payload.entity_id;\nnextAction.action = obj.payload.action;\nnextAction.value = obj.payload.value ?? 'none';\nglobal.set(\"ChatGPTFollowUpData\", nextAction);\n*/","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":140,"wires":[["f8dbba13dc5b9c8a"]]},{"id":"55da6249fc45fc59","type":"inject","z":"c5096757313324d2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":180,"wires":[["4fb0a6df52f0eb2c"]]},{"id":"cb169a25dece6cf7","type":"debug","z":"c5096757313324d2","name":"debug 36","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":440,"y":380,"wires":[]},{"id":"86508d2b9161396f","type":"function","z":"c5096757313324d2","name":"function 19","func":"msg.payload = {};\nmsg.payload = \"I'm sorry, I don't know how to do that.\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":260,"wires":[["cff88ce2005f76dd"]]},{"id":"a293d3b4bae8b937","type":"link call","z":"c5096757313324d2","name":"Set Timer","links":["19d4d17e3ead9b90"],"linkType":"static","timeout":"30","x":620,"y":60,"wires":[["cff88ce2005f76dd"]]},{"id":"c86b8b6fdfdf93a6","type":"link call","z":"c5096757313324d2","name":"Lights On","links":["de3c5d4f2df4a11c"],"linkType":"static","timeout":"30","x":620,"y":100,"wires":[["cff88ce2005f76dd"]]},{"id":"ec8fea76c2f1c7dc","type":"link call","z":"c5096757313324d2","name":"Lights Off","links":["de3c5d4f2df4a11c"],"linkType":"static","timeout":"30","x":620,"y":140,"wires":[["cff88ce2005f76dd"]]},{"id":"b6efe3ae1d7d5794","type":"link call","z":"c5096757313324d2","name":"Brighten","links":["d067d07807262868"],"linkType":"static","timeout":"30","x":620,"y":180,"wires":[["cff88ce2005f76dd"]]}]

Look for Part 4 for the Helper node configuration.

@brokerandy25

Hello André, good evening… I read your documentary about the skill you created for Alexa, I’m trying to make one too to make her smarter but I can’t do it at all, errors and more errors, and everything… Will it be Could you share this wonderful feat of yours? I would like to not only be able to open a gate and have it ask me for the password, but also be able to be smarter if there is better. I’m still waiting for your response.
thanks