# Connect iHost devices to Alexa/GA via Node-Red

**URL:** <https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909>\
**Category:** eWeLink CUBE\
**Created:** [April 22, 2023, 8:15pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909 "2023-04-22T20:15:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 8:15pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/1 "2023-04-22T20:15:35Z")

</div>

Hi guys. I am very new to Node-Red. Since iHost does not have native support for Alexa or Google Assistant, I am looking at options which connect iHost devices to Alexa/GA via Node-Red. I found one such service known as Sinric Pro.

Below is a link to how to use Sinric virtual devices in Node-Red.  
[https://help.sinric.pro/pages/node-red](https://help.sinric.pro/pages/node-red)

This is what I want to do:

1. Use voice command to turn on/off Sinric virtual device
2. Connect this Sinric virtual device via node red to a zigbee switch in iHost
3. This would enable voice control of Zigbee devices in iHost.

Can anyone who is an experienced Node-Red user help create this flow?

Thank You,  
Sri

---

<div class="post-metadata">

**Author:** ![dr.m.i.bell](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dr.m.i.bell](https://forum.ewelink.cc/u/dr.m.i.bell)\
**Post date:** [April 22, 2023, 9:15pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/2 "2023-04-22T21:15:45Z")

</div>

I am an experienced Node-RED user and would be happy to offer advice if you run into difficulties. Unfortunately, I do not use Alexa or Google Assistant, so I would not be able to do any of the actual development.

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 9:25pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/3 "2023-04-22T21:25:41Z")

</div>

Thanks for offering your help.

I have since abandoned Sinric and currently planning to use Node-RED Google Assistant Bridge.

Below is my sequence

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/c/c526f9dc598e31fa90c95496377cc9894fa33e2b.png)

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/4/47bd77f2fb40354b7888adeed68015a062a7e356.png)

My switch in iHost is turning on. But not turning off.

Below is the documentation from Node-RED Google Assistant Bridge.

[https://googlehome.hardill.me.uk/docs#configNodes](https://googlehome.hardill.me.uk/docs#configNodes)

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/3/30a4347d47766cd067f6c2dab4580c8dd38c5dd5.png)

Can you tell me why I unable to turn off my switch?

Thanks  
Sri

---

<div class="post-metadata">

**Author:** ![dr.m.i.bell](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dr.m.i.bell](https://forum.ewelink.cc/u/dr.m.i.bell)\
**Post date:** [April 22, 2023, 9:31pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/4 "2023-04-22T21:31:58Z")

</div>

That was quick progress. The first thing I would check is the message sent to turn off the switch. I would expect it to contain `payload.params.on:false`, but that’s just a guess.

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 9:39pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/5 "2023-04-22T21:39:16Z")

</div>

I appreciate your prompt reply. Tried the following but it did not work. Did I follow your suggestion correctly?

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/7/727a339bec499987ac17ce13561e2309059ad038.png)

---

<div class="post-metadata">

**Author:** ![dr.m.i.bell](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dr.m.i.bell](https://forum.ewelink.cc/u/dr.m.i.bell)\
**Post date:** [April 22, 2023, 9:51pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/6 "2023-04-22T21:51:04Z")

</div>

OK. Since I can’t see inside your nodes or run them myself, I would suggest two things. First add `debug` nodes to the outputs of the `switch` node so that you can see exactly what the GA Bridge is sending. Then attach `inject` nodes to the inputs of the `control-device` nodes and try to construct messages that turn the switches on and off. Then, of course, get everything to match up.

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 10:34pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/8 "2023-04-22T22:34:16Z")

</div>

I tried the following as per your suggestion:

Debug Node revealed the following:

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/a/a8acf04d55a7e2c927c1ae33a7d7a77822cd360b.png)

Inject Nodes:

I was able to turn on the switch with the following command

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/d/d5033500a7e8bb74d8aa3e7f3a63798bb17f6728.png)

I was able to turn off the switch with the following command

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/f/fd5e99b6a534f3c899fa827d960994c20d5c7eae.png)

However, I was unable to turn on or turn off the switch with the following

![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/0/08d81c858eda9e4a92f6a7946462148a5f66d74a.png)

Any further input?

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 10:43pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/10 "2023-04-22T22:43:51Z")

</div>

Also please note the below from GA bridge documentation:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/a/a952c58d61a23218853274eed4d41b0cca64e9a9.png)

---

<div class="post-metadata">

**Author:** ![dr.m.i.bell](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dr.m.i.bell](https://forum.ewelink.cc/u/dr.m.i.bell)\
**Post date:** [April 22, 2023, 11:01pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/11 "2023-04-22T23:01:29Z")

</div>

The `debug` node output looks like the `params` are booleans, not strings. So, in the `switch` node, try replacing the `property = msg.payload.command` with `property = msg.payload.command.params.on` and `is true` or `is false`.

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [April 22, 2023, 11:10pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/12 "2023-04-22T23:10:03Z")

</div>

Viola! It worked.

In the switch node: property = msg.payload.params.on and `is true` or `is false` successfully turned on and turned off the zigbee switch.

Thanks a lot for your help.

---

<div class="post-metadata">

**Author:** ![dr.m.i.bell](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dr.m.i.bell](https://forum.ewelink.cc/u/dr.m.i.bell)\
**Post date:** [April 23, 2023, 12:06am UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/13 "2023-04-23T00:06:56Z")

</div>

You’re welcome. Glad I could help.

---

<div class="post-metadata">

**Author:** ![joennuh](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.ewelink.cc/joennuh/32/454_2.png) [@joennuh](https://forum.ewelink.cc/u/joennuh)\
**Post date:** [April 27, 2023, 10:28pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/14 "2023-04-27T22:28:37Z")

</div>

> [@drsrinivasd69](#):
>
> I have since abandoned Sinric and currently planning to use **Node-RED Google Assistant Bridge**.

Thanks for sharing the name of this Node! I tried out this node and I have to say: What a great and fun node! I am now able to automate my Onkyo receiver that didn’t have any Google Assistant support, but does support sending special serial controls (EISCP) over the network with the help of an EISCP node. 🕶

---

<div class="post-metadata">

**Author:** ![y.shvager2021](https://avatars.discourse-cdn.com/v4/letter/y/b5e925/32.png) [@y.shvager2021](https://forum.ewelink.cc/u/y.shvager2021)\
**Post date:** [July 5, 2023, 1:23pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/15 "2023-07-05T13:23:11Z")

</div>

Great offer dr.  
I am also new to node red and would like to understand how i can control all my ewelink devices on ihost using node red for devices on other network not accessible to ihost.  
Can you give me a hint how to do it?  
I already have node red run on ihost and access local ewelink devices.  
Thanks

---

<div class="post-metadata">

**Author:** ![drsrinivasd69](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@drsrinivasd69](https://forum.ewelink.cc/u/drsrinivasd69)\
**Post date:** [July 5, 2023, 6:46pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/16 "2023-07-05T18:46:46Z")

</div>

The best way to currently expose cloud-based Ewelink devices to Node Red is via Homebridge.

1. Install Homebridge addon
2. Download Ewelink plugin for Homebridge
3. Download Homebridge node in Node-Red.

---

<div class="post-metadata">

**Author:** ![peter.marton0](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@peter.marton0](https://forum.ewelink.cc/u/peter.marton0)\
**Post date:** [June 27, 2024, 7:46pm UTC](https://forum.ewelink.cc/t/connect-ihost-devices-to-alexa-ga-via-node-red/16909/17 "2024-06-27T19:46:25Z")

</div>

I have some SNZB-03 Leak detectors. I want Alexa to tell me if any sensing leak. Unfortunately the STATE what I can get in Node-red is:  
“ALL  
Battery  
RSSI.”  
If I set to ALL, Im getting false indications very often.

Any idea to solve it.

Peter

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/ewelinkforum/original/2X/1/124df9a844ae0d09e63049ce1fe1595fc293c6e2.jpeg)
