Hello, is it possible to use node-red to sending a command to turn on / off the device to the Google assistant or Alexa from Amazon?
yes you can use alexa remote2 node to turn on smart devices or run routines. Not sure aboiut google as i do not own one.
could I ask for help how to arrange it all to send Alexa a command to control Smart devices ?
simple as below
device is the device name in alexa app
action is turnOn/turnOff
there is more info on actions for dimming etc in the nodes help section.
[{"id":"ed093db6.d8a2e8","type":"inject","z":"5a245aa1.510164","name":"","props":[{"p":"payload.device","v":"lounge 1","vt":"str"},{"p":"payload.action","v":"turnOn","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":120,"y":3720,"wires":[["614f4c73.8bc11c"]]},{"id":"614f4c73.8bc11c","type":"function","z":"5a245aa1.510164","name":"create json","func":"msg.payload = [{\"entity\":msg.payload.device,\n \"action\": msg.payload.action\n }\n]\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":3720,"wires":[["89d4ab46.49c03"]]},{"id":"89d4ab46.49c03","type":"alexa-remote-smarthome","z":"5a245aa1.510164","name":"Smarthome Action","account":"b0877f3.836aa","config":{"option":"action","value":[]},"outputs":1,"x":510,"y":3720,"wires":[[]]},{"id":"b0877f3.836aa","type":"alexa-remote-account","name":"alexaremote2","authMethod":"proxy","proxyOwnIp":"192.168.1.25","proxyPort":"3456","cookieFile":"alexa-remote2.txt","refreshInterval":"14","alexaServiceHost":"layla.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-UK","userAgent":"","useWsMqtt":"on","autoInit":"off"}]
the device and action is set in the inject node.
and how to configure the last node? Because I still have the inscription that the account has not been initialized
it is configure you need to feed it the json payload that the function node creates, that makes it dynamic. read the help info it's all there.
all you need to do is config the amazon sign in via proxy method and then the node will instruct you to go to http://yourip:3456 to sign into amazon.
The details above are for UK amazon account, more info for others in help info.
And where to get this one
And how to set it up
As said the function node creates it from the info supplied in the inject node, or any other input, eg http/mqtt etc
So what else should I change?
[{"id":"4963bd5a.7f62e4","type":"inject","z":"5dcef20d.8a938c","name":"","props":[{"p":"payload.device","v":"radio fm","vt":"str"},{"p":"payload.action","v":"turnOff","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":100,"wires":[["215bc734.76f748"]]},{"id":"215bc734.76f748","type":"function","z":"5dcef20d.8a938c","name":"create json","func":"msg.payload = [{\"entity\":msg.payload.device,\n \"action\": msg.payload.action\n }\n]\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":290,"y":100,"wires":[["8e0c23cc.dacf4"]]},{"id":"8e0c23cc.dacf4","type":"alexa-remote-smarthome","z":"5dcef20d.8a938c","name":"Smarthome Action","account":"b0877f3.836aa","config":{"option":"action","value":[]},"outputs":1,"x":500,"y":100,"wires":[[]]},{"id":"b0877f3.836aa","type":"alexa-remote-account","name":"test","authMethod":"proxy","proxyOwnIp":"192.168.1.6","proxyPort":"3456","cookieFile":"","refreshInterval":"14","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"off"}]
To test the device on or off?
is radio fm a smart device ?
Yes it is a Smart device, I did it and I had to add
[{"id":"124e324b.5cd08e","type":"alexa-remote-init","z":"418c032.e1eeffc","name":"inicjalizacja alexy","account":"b0877f3.836aa","option":"initialise","x":190,"y":420,"wires":[[]]},{"id":"ffba50b9.5a9d1","type":"inject","z":"418c032.e1eeffc","name":"guzik aktywacyjny","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":360,"wires":[["124e324b.5cd08e"]]},{"id":"b0877f3.836aa","type":"alexa-remote-account","name":"alexaremote2","authMethod":"proxy","proxyOwnIp":"192.168.1.6","proxyPort":"3455","cookieFile":"","refreshInterval":"14","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"off"}]
Scenes can also be activated in this way but how to sync device statuses with Alexa in ha?