Have Alexa Speak Current Weather from Ecobee state

So what I’m trying to do is have my Amazon Echo announce the current weather conditions from State data in my Ecobee4 (weather.ecobee4_thermostat.state) when i turn on an input_boolean.

I’m using node-red-contrib-alexa-remote2 for my tts stuff, but i cant enter custom template data for Alexa to transcribe in those nodes.

Any way of accomplishing this? Or do i have to approach this from a different angle?

Thanks

Should be possible, what do you have so far?

Well, nothing. It’s usually a simple thing to do in any other scenario - A template would be best. But, as I said, the remote2 npm doesn’t allow for any call services, or data whatsoever — just plain text inputted into the node.

I don’t believe i can even send any sort of payload or the node either to tts its vars.

Remote2 will accept a json payload, via routine node setting as custom. So all you need to do is create the payload for the remote2 node.

{ type: 'speak', payload: { type: 'regular', text: 'Hello!', devices: ['My Echo']}
{ type: 'speakAtVolume', payload: { type: 'regular', text: 'Hello!', volume: 50 devices: ['My Echo']}

    type: regular, ssml, announcement
1 Like

Ah, perfect, I didn’t know I could do that. Thanks a lot

In addition to the above solution you can feed the text you want to speak as a payload into a change node with a JSONata expression:

[{"id":"2fd3778d.f48f58","type":"change","z":"3286579d.4381e8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t   \"type\": \"speak\",\t   \"payload\": {\t       \"type\": \"announcement\",\t       \"text\": payload,\t       \"volume\": \"50\",\t       \"devices\": [            \"Device\"        ]    \t   }\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":380,"wires":[["bcbe034a.0f9b1"]]}]

Saves hard coding every message.

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