Using Node-Red for Google Home TTS announcements and other stuff eWeLink

Can you add an example url so it’s all there in one place.

I’ve added some example URLs

Blooming typical. I’ve been waiting for years for eWeLink to add diffuser controls to IFTTT. They just sent me an email today.

image

And this happens the same week I start using node-red and the eWeLink cloud API to control the diffuser LOL.

They have also added a whole host of new functionality in to their IFTTT service, as I’ve had about 24 emails from them about new stuff.

However maybe its not live yet, if I click the links in the emails I get page cannot be found on the IFTTT site.

1 Like

Least you don’t have to go through one cloud to get to the other
vera - (ifttt - ewelink)cloud
, now you go
vera - node-red - (ewelink)cloud

That’s true.

Some interesting new Triggers though

image

what does the ewelink event listener receive when you configure it with the diffuser deviceid?

Nothing at the moment the debug is just empty.

keep it running, you may get a debug message when the diffuser is low. There is a slim chance.

The new eWeLink triggers are all available on the IFTTT site now. For the first time ever I can select the Diffuser device in a trigger. I am just setting one up now for low water warning, but what to do with the THAT ? Perhaps run a Vera scene to do a TTS and maybe send me a notification.

Exciting LOL :crazy_face:

image

Still can’t believe I spent hours messing around with node-red to setup a eWeLink integration just to turn the diffuser on and off and then days later they release it in IFTTT service.

However if I hadn’t of done that , I wouldn’t of then discovered Google Home TTS in node-red.

Is there a way to send an HTTP request to node red if your node red server is using HTTPS?

Edit: I couldn’t get the default HTTP in nodes to work with either port 1880, or 8123, but using this:

lets you pick a random port and disable HTTPS on that port.

On my Vera I’m using:

local status, result = luup.inet.wget(“http://192.168.0.15:8096/nanotoggle”, 5)

which is fine for a toggle, because there is only one command, but how do I pass a payload of ‘on’ or ‘off’ for example?

local status, result = luup.inet.wget(“http://192.168.0.15:8096/nanotoggle?on”, 5)
seems to give a null payload.

local status, result = luup.inet.wget(“http://192.168.0.15:8096/nanotoggle?message=on”, 5)

gives me a payload buried somewhere, but how do I go about converting it to the usual msg.payload?

Thanks!

Stick a debug on the in node and set it to show the full msg object. Then you will see where your data is .

I enjoy using your function node.
I have 2 questions:

  • Is it possible that TuneIn resume playing after tts? Now it stops playing after tts.
  • Is it possible to increase the volume before tts and go back to the old volume after tts?

As i have said i do not use cast

1 I believe so, but i have no way to test as no google home. So i have no way of looking at status payload, which should hold previous media url.

2 yes , send msg.payload.volume with the msg.payload.ip
You could specify the volume in the url to. obviously the function would need editing.

I’m not familiar with node red. You may be able to help me. It would be nice if I could pass the volume when calling the function luup.inet.wget(“http://NODE-RED-IP:1880/sceneTrigger?message=TEST&ip=192.168.0.16”)

var IPS = msg.payload.ip.split("|");
for (var i in IPS) { 
msg.payload = {"message": msg.payload.message, "ip": IPS[i], "volume": msg.payload.volume};
node.send([null, [msg]]);
}
msg.payload = "ok"; // the response message
return [msg];

you should be able to set volume as well by not adding values(untested)

send message with volume (not sure of value as i do not use google home)

http://node-red-ip:1880/sceneTrigger?message=TEST&volume=30&ip=192.168.0.16

send just volume try

http://node-red-ip:1880/sceneTrigger?message=&volume=30&ip=192.168.0.16
or
http://node-red-ip:1880/sceneTrigger?volume=30&ip=192.168.0.16

I have also created a version that has url like
http://192.168.1.25:1880/castMessage/testing_this_message/50/23.34.23.45|23.34.23.46

Where 50 is volume
testing_this_message is the message.

I my post if i feel enough love.

It works great!! Thanks for the quick response.

do the volume url work?

Yes it works I just tested it.