Alexa custom list issues

I've been experimenting with the alexa lists sample code here

if you already have a custom list on your alexa it will show up in the list of lists when you are setting up this flow.

I have modified the flow to access the custom list and everything work with the exception of adding an item to the list via node red. Items added via alexa show up there but I get an error when trying to add an item to the custom list

2/8/2021, 6:52:40 AMnode: 1e3b9659.914dca
msg : string[35]
"expected a string 'list' and 'text'"
[{"id":"7c32a714.e15bb8","type":"inject","z":"b5403203.1867b","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":740,"wires":[["be903ca1.1ebe5"]]},{"id":"be903ca1.1ebe5","type":"alexa-remote-list","z":"b5403203.1867b","name":"lowes","account":"86d2b912.d18008","config":{"option":"getListItems","value":{"list":{"type":"str","value":"1f428b81-a368-41a2-ad3b-fae450608af1"}}},"x":210,"y":740,"wires":[["a7238f5a.e342a"]]},{"id":"18452fb6.b765c","type":"alexa-remote-list","z":"b5403203.1867b","name":"","account":"86d2b912.d18008","config":{"option":"removeItem","value":{"list":{"type":"str","value":"1f428b81-a368-41a2-ad3b-fae450608af1"},"item":{"type":"msg","value":"payload.id"}}},"x":890,"y":840,"wires":[[]]},{"id":"4c8cc9d5.668688","type":"ui_template","z":"b5403203.1867b","group":"ff399823.f53228","name":"","order":1,"width":6,"height":12,"format":"<!-- ITEMS -->\n<div layout\n    ng-repeat=\"item in msg.payload track by $index\" \n    style=\"height: 48px; overflow: hidden;\">\n    \n    <!-- COMPLETED -->\n    <div style=\"\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        height: 100%;\n        width: 48px;\n        \">\n        <md-button \n            ng-click=\"\n                item.completed = !item.completed; \n                send({payload: item, action: 'edit'})\n            \"\n            style=\"\n            background: transparent;\n            border-radius: 50%;\n            \">\n            <style scoped>\n                ng-md-icon[icon=\"check_box\"] path {\n                    fill: lightgray !important;\n                }\n                ng-md-icon[icon=\"check_box_outline_blank\"] path {\n                    fill: gray !important;\n                }\n            </style>\n            <ng-md-icon \n                icon=\"{{item.completed ? 'check_box' : 'check_box_outline_blank'}}\"\n                size=\"24\"\n                style=\"\n                    outline: none !important;\n                    border: 0 !important;\n                \">\n            </ng-md-icon>\n        </md-button>\n    </div>\n    \n    <!-- LABEL -->\n    <div layout\n        style=\"{{item.disabled \n            ? 'padding: 0 12px; flex: 1; align-items: center;' \n            : 'padding: 0 12px; flex: 1; align-items: center; color: gray;'\n        }}\">\n        <p>{{item.value}}</p>\n    </div>\n    \n    <!-- DELETE -->\n    <div style=\"\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        height: 100%;\n        width: 48px;\n        \">\n        <md-button \n            ng-click=\"\n                send({payload: item, action: 'delete'})\n            \" \n            style=\"\n            background: transparent;\n            border-radius: 50%;\n            \">\n            <style scoped>\n                ng-md-icon[icon=\"delete\"] path {\n                    fill: lightgray !important;\n                }\n            </style>\n            <ng-md-icon \n                icon=\"delete\"\n                size=\"24\"\n                style=\"\n                    outline: none !important;\n                    border: 0 !important;\n                \">\n            </ng-md-icon>\n        </md-button>\n    </div>\n</div>","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","x":520,"y":780,"wires":[["b6a25f0d.50e2a"]]},{"id":"7cad4c51.4c5334","type":"alexa-remote-list","z":"b5403203.1867b","name":"","account":"86d2b912.d18008","config":{"option":"editItem","value":{"list":{"type":"str","value":"1f428b81-a368-41a2-ad3b-fae450608af1"},"item":{"type":"msg","value":"payload.id"},"text":{"type":"msg","value":"payload.value"},"completed":{"type":"msg","value":"payload.completed"},"version":{"type":"msg","value":"payload.version"}}},"x":880,"y":780,"wires":[["8cc9164a.7bd628"]]},{"id":"b6a25f0d.50e2a","type":"switch","z":"b5403203.1867b","name":"","property":"action","propertyType":"msg","rules":[{"t":"eq","v":"edit","vt":"str"},{"t":"eq","v":"delete","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":730,"y":780,"wires":[["7cad4c51.4c5334"],["18452fb6.b765c","34edc667.26eafa"]]},{"id":"9ae0e2a2.4448c","type":"change","z":"b5403203.1867b","name":"","rules":[{"t":"set","p":"lowes","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":740,"wires":[["9d20cb63.27a0c8"]]},{"id":"9d20cb63.27a0c8","type":"change","z":"b5403203.1867b","name":"get flow.todo","rules":[{"t":"set","p":"payload","pt":"msg","to":"lowes","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":780,"wires":[["4c8cc9d5.668688"]]},{"id":"34edc667.26eafa","type":"function","z":"b5403203.1867b","name":"remove","func":"let list = flow.get('lowes');\nlist = list.filter(o => o.id != msg.payload.id);\nflow.set('lowes', list);\nreturn msg;","outputs":1,"noerr":0,"x":1040,"y":840,"wires":[["9d20cb63.27a0c8"]]},{"id":"8cc9164a.7bd628","type":"function","z":"b5403203.1867b","name":"update","func":"let list = flow.get('lowes');\nlist = list.filter(o => o.id != msg.payload.id);\nlist.push(msg.payload);\nflow.set('lowes', list);\nreturn msg;","outputs":1,"noerr":0,"x":1030,"y":780,"wires":[["95788a5b.2293f8"]]},{"id":"95788a5b.2293f8","type":"function","z":"b5403203.1867b","name":"sort","func":"let list = flow.get('lowes');\nlist = list.sort((a, b) => b.createdDateTime - a.createdDateTime)\nflow.set('lowes', list);\nreturn msg;","outputs":1,"noerr":0,"x":1190,"y":780,"wires":[["9d20cb63.27a0c8"]]},{"id":"9f1e330d.c0299","type":"ui_button","z":"b5403203.1867b","name":"Refresh","group":"ff399823.f53228","order":4,"width":6,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"refresh","payload":"","payloadType":"str","topic":"","x":100,"y":700,"wires":[["be903ca1.1ebe5"]]},{"id":"a7238f5a.e342a","type":"function","z":"b5403203.1867b","name":"sort","func":"msg.payload = msg.payload.sort((a, b) => b.createdDateTime - a.createdDateTime)\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":740,"wires":[["9ae0e2a2.4448c"]]},{"id":"988b1941.d4e728","type":"ui_text_input","z":"b5403203.1867b","name":"Item","label":"Add new item","tooltip":"Add new item","group":"ff399823.f53228","order":2,"width":5,"height":1,"passthru":true,"mode":"text","delay":300,"topic":"","x":90,"y":620,"wires":[["411c5156.8d328"]]},{"id":"73701a9a.3db6c4","type":"ui_button","z":"b5403203.1867b","name":"Add","group":"ff399823.f53228","order":3,"width":1,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"add","payload":"","payloadType":"str","topic":"","x":90,"y":660,"wires":[["1e3b9659.914dca"]]},{"id":"411c5156.8d328","type":"change","z":"b5403203.1867b","name":"","rules":[{"t":"set","p":"lowesitem","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":620,"wires":[[]]},{"id":"1e3b9659.914dca","type":"alexa-remote-list","z":"b5403203.1867b","name":"","account":"86d2b912.d18008","config":{"option":"addItem","value":{"list":{"type":"str","value":"1f428b81-a368-41a2-ad3b-fae450608af1"},"text":{"type":"flow","value":"lowesItem"}}},"x":220,"y":660,"wires":[["ba289fca.64c6"]]},{"id":"ba289fca.64c6","type":"function","z":"b5403203.1867b","name":"add","func":"let list = flow.get('lowes');\nlist.unshift(msg.payload);\nflow.set('lowes', list);\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":660,"wires":[["9d20cb63.27a0c8"]]},{"id":"86d2b912.d18008","type":"alexa-remote-account","z":"","name":"","authMethod":"proxy","proxyOwnIp":"localhost","proxyPort":"5678","cookieFile":"authlog","refreshInterval":"3","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"},{"id":"ff399823.f53228","type":"ui_group","z":"","name":"lowes","tab":"87d51ca2.ce0fa","order":3,"disp":true,"width":"6","collapse":false},{"id":"87d51ca2.ce0fa","type":"ui_tab","z":"","name":"Alexa Lists","icon":"list","order":12,"disabled":false,"hidden":false}]

The node expects strings, the error says that it's not getting a string. add some debugs to see what is being fed in.

not really sure what I did but its working now... I changed the add item from lowesitem to lowes still no good so I changed it back to lowesitem and it went to working... perhaps I had a typo in it... after reviewing it clearly had a typo lowesItem instead of lowesitem

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.