Apollon77 / alexa-remote

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Sending a basic command

abhatikar opened this issue · comments

How do i send a basic command to the echo device say asking whats the weather ?
I have completed the full process of setup and now the example code which you have shared is doing this

Alexa-Remote WS-MQTT: Send Ping
Alexa-Remote WS-MQTT: Received Pong

Also, when i press a button on the echo, i see some output as well. So definitely everything is connected.

Please help, thanks in advance.

In fact now you need to use the API methods .. yes unfortunately this is not documented very well :-(

e.g. you can use "createSequenceNode" (https://github.com/Apollon77/alexa-remote/blob/master/alexa-remote.js#L1500) to create one "command" and then use sendSequenceCommand (https://github.com/Apollon77/alexa-remote/blob/master/alexa-remote.js#L1715) or sendMultiSequenceCommand (https://github.com/Apollon77/alexa-remote/blob/master/alexa-remote.js#L1688) to send them ...

What you want to do?

First I want to get comfortable how could I make a simple call asking weather e.g.
Later, i want to see how can I call spotify to play a playlist and have alexa speak using ssml.
Would you mind helping me show how can I call your api and what is the websocket connection do in your case. How to interact with that websocket you have created. thanks in advance.

Sorry the lib is currently not ready for a "fully documented way" so to use you need to dig into code a bit ... Weather is calling crerateSequenceNode with command "weather (see https://github.com/Apollon77/alexa-remote/blob/master/alexa-remote.js#L1522) and then send that.
or more easy use sendSequenceCommand(deviceId, 'weather', true, cattback)

Sorry I currently do not have the time to fully document that "evolved monster" :-(

The Websocket connection received PUsh messages from Amazazon for devices like volume changes or interactions and you get events out of it that you can use

Okay, no problem. I will have a look and see how i progress. thanks for your time.