All terrific input and much appreciated.
It was a doh' moment when @e1cid pointed out that I was saving objects. But I am still having a problem with extracting the command.
@zenofmud - The node is "Alexa Event" from "node-red-contrib-alexa-remote2", V3.10.4
The flow:
[{"id":"3bcee00cd20bb90b","type":"function","z":"cc2b243f.efbf58","name":"Build the log file line","func":"const devicetime = flow.get('timestamp');\nconst devicename = flow.get('name');\nconst devicecommand = flow.get('command');\n\nconst str = `${devicetime},${devicename},${devicecommand}`;\nmsg.payload = str;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":740,"wires":[["4eefd537527fd7b6"]]},{"id":"1dcdac75e08018e9","type":"alexa-remote-event","z":"cc2b243f.efbf58","name":"","account":"4627f780.84a6a8","event":"ws-device-activity","x":150,"y":600,"wires":[["f211df871972ea36","b75fa357259ba43c","ac8ec3cc9bf0e97e","97e94defad52ded1"]]},{"id":"f211df871972ea36","type":"function","z":"cc2b243f.efbf58","name":"Get name","func":"flow.set(\"name\",msg.payload.name);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":600,"wires":[["102b0745cea8db28"]]},{"id":"b75fa357259ba43c","type":"function","z":"cc2b243f.efbf58","name":"Get Command","func":"var a={payload:msg.payload.description.summary};\nflow.set(\"command\",a);\nreturn [a];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":640,"wires":[["c8426b41292c2a67"]]},{"id":"c8426b41292c2a67","type":"ui_text","z":"cc2b243f.efbf58","group":"30106f26816982fe","order":2,"width":0,"height":0,"name":"Command","label":"Command","format":"{{msg.payload}}","layout":"row-spread","className":"","x":790,"y":640,"wires":[]},{"id":"102b0745cea8db28","type":"ui_text","z":"cc2b243f.efbf58","group":"30106f26816982fe","order":1,"width":0,"height":0,"name":"","label":"Originating Device","format":"{{msg.payload}}","layout":"row-spread","className":"","x":810,"y":600,"wires":[]},{"id":"ac8ec3cc9bf0e97e","type":"function","z":"cc2b243f.efbf58","name":"Get Timestamp","func":"var a={payload:msg.payload.creationTimestamp.mydate};\nreturn [a];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":200,"y":680,"wires":[["bedfa4ed716e3f76"]]},{"id":"d71e4d59e2e1b75e","type":"ui_text","z":"cc2b243f.efbf58","group":"30106f26816982fe","order":3,"width":0,"height":0,"name":"Timestamp","label":"Tmestamp","format":"{{msg.payload}}","layout":"row-spread","className":"","x":810,"y":680,"wires":[]},{"id":"bedfa4ed716e3f76","type":"moment","z":"cc2b243f.efbf58","name":"","topic":"","input":"","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"\"dddd, MMMM Do YYYY, h:mm:ss a\"","locale":"C","output":"","outputType":"msg","outTz":"America/New_York","x":400,"y":680,"wires":[["f6dc1de10ed24cc1"]]},{"id":"4eefd537527fd7b6","type":"file","z":"cc2b243f.efbf58","name":"","filename":"/share/logs/alexa.log","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":740,"y":740,"wires":[[]]},{"id":"f6dc1de10ed24cc1","type":"function","z":"cc2b243f.efbf58","name":"Save timestamp","func":"flow.set(\"timestamp\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":680,"wires":[["d71e4d59e2e1b75e"]]},{"id":"97e94defad52ded1","type":"delay","z":"cc2b243f.efbf58","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":290,"y":740,"wires":[["3bcee00cd20bb90b"]],"info":"Allows all data to be flow.saved."},{"id":"4627f780.84a6a8","type":"alexa-remote-account","name":"","authMethod":"proxy","proxyOwnIp":"192.168.1.57","proxyPort":"3456","cookieFile":"alexa.txt","refreshInterval":"1","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"off"},{"id":"30106f26816982fe","type":"ui_group","name":"Last Command Summary","tab":"cc8daca91241397e","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"cc8daca91241397e","type":"ui_tab","name":"Alexa","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
However, I am still having a problem extracting the command. In my flow the output of the Get Command function node is the command: "turn on the office light", for example. But in my log file it is: "Friday, July 15th 2022, 7:20:57 pm",Stephen,[object Object]
Here is the output from the Alexa Event node when I say "Alexa turn off the office light"
{"payload":{"data":{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1657927436872,"description":"{\"summary\":\"alexa turn off office light\",\"firstUtteranceId\":\"A4ZP7ZC4PI6TO:1.0/2022/07/15/23/DEVICE_UNSPECIFIED/23:55::TNIH_2V.35e9ccc3-a187-48f0-906b-b44fbe308a6eZXV/0\",\"firstStreamId\":\"A4ZP7ZC4PI6TO:1.0/2022/07/15/23/DEVICE_UNSPECIFIED/23:55::TNIH_2V.35e9ccc3-a187-48f0-906b-b44fbe308a6eZXV\"}","domainAttributes":null,"domainType":null,"feedbackAttributes":null,"id":"A3FOLKQ9ENDI49#1657927436872#A4ZP7ZC4PI6TO#G0911B0592850CN1","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A3FOLKQ9ENDI49","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"A4ZP7ZC4PI6TO","serialNumber":"G0911B0592850CN1"}],"utteranceId":"A4ZP7ZC4PI6TO:1.0/2022/07/15/23/DEVICE_UNSPECIFIED/23:55::TNIH_2V.35e9ccc3-a187-48f0-906b-b44fbe308a6eZXV","version":1},"description":{"summary":"alexa turn off office light","firstUtteranceId":"A4ZP7ZC4PI6TO:1.0/2022/07/15/23/DEVICE_UNSPECIFIED/23:55::TNIH_2V.35e9ccc3-a187-48f0-906b-b44fbe308a6eZXV/0","firstStreamId":"A4ZP7ZC4PI6TO:1.0/2022/07/15/23/DEVICE_UNSPECIFIED/23:55::TNIH_2V.35e9ccc3-a187-48f0-906b-b44fbe308a6eZXV"},"deviceSerialNumber":"G0911B0592850CN1","name":"Stephen","deviceType":"A4ZP7ZC4PI6TO","deviceAccountId":null,"creationTimestamp":1657927436872,"activityStatus":"SUCCESS","domainAttributes":null,"destinationUserId":"A3FOLKQ9ENDI49"},"_msgid":"049d1cff8aa6a4ab"}