# Question about Nora, Google Home and Switch node

**URL:** <https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877>\
**Category:** Developing Nodes\
**Created:** [22 August 2020 11:54 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877 "2020-08-22T11:54:14Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 11:54 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/1 "2020-08-22T11:54:15Z")

</div>

Hi , i've got a flow which is almost working exept the beginning.  
I'm using the Nora plugin to capture commands like 'open blinds' and 'close blinds'.  
From there i'm using this to control my KM-Tronic lan switches.  
The question is i'm receiving an object: payload (see attachements) and don't know how to put this in the switch node.  
Any help or pointers are welcome ![Nora4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/c/ac5f1d9d2ff5fd80e21cdcd78d91e8f252e0dea9.png) ![Nora3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4ad507e2e2355f53612c9ab15ac9af810264ac29.png) ![Nora1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/be95d0ee00a9606507139ff9fd3a42f4572784ad.png) ![Nora2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74bc57e900791da16c8e5e08e1425adcb7f8c649.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [22 August 2020 13:01 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/2 "2020-08-22T13:01:57Z")

</div>

property  
msg.payload.openPercent

Then you want to check that the property is a number of value equal to 0 or 100.  
Select number and type in the value.  
Then select 2 outputs.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 13:15 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/3 "2020-08-22T13:15:55Z")

</div>

See the response i posted in [your previous topic](https://discourse.nodered.org/t/if-this-then-statement-in-node-red/31809/7) (looks like the same question??)

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 13:39 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/4 "2020-08-22T13:39:56Z")

</div>

Thx for your help, works like a charm

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 13:44 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/5 "2020-08-22T13:44:00Z")

</div>

is indeed one part of question , watched your video sugestion for hours , not helped tough.  
Everything is now solved, of course don't know if there's a simpler solution , but it works.  
Posted flow here (with the difference that Nora is replaced with injects for testing , don't know if you specialist can see any errors  
[flowblinds.json](https://discourse.nodered.org/uploads/short-url/nU12h6sXAieEMNuCXc26iha8RoY.json) (3.8 KB)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 13:45 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/6 "2020-08-22T13:45:52Z")

</div>

I posted a screenshot that showed the solution @E1cid indicated.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 14:04 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/7 "2020-08-22T14:04:03Z")

</div>

If you watched the videos you should not have come up with the flow you posted.

Try this flow:

```auto
[{"id":"684de79.0fac718","type":"switch","z":"9b9b8a14.a27ce8","name":"","property":"payload.openPercent","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"100","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":506,"y":672,"wires":[["5c134b4f.a5b7cc","c453aca4.5804a8"],["d8cd2dc4.3f631","d368933b.4e56e8"]]},{"id":"4a61b7fd.f8843","type":"inject","z":"9b9b8a14.a27ce8","name":"Close blinds","props":[{"p":"payload.openPercent","v":"100","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":696,"wires":[["684de79.0fac718"]]},{"id":"a8ba9e5f.859cc","type":"inject","z":"9b9b8a14.a27ce8","name":"Open blinds","props":[{"p":"payload.openPercent","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":648,"wires":[["684de79.0fac718"]]},{"id":"c453aca4.5804a8","type":"http request","z":"9b9b8a14.a27ce8","name":"Open FF0701","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0701","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":648,"wires":[[]]},{"id":"5c134b4f.a5b7cc","type":"http request","z":"9b9b8a14.a27ce8","name":"Open FF0601","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0601","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":600,"wires":[[]]},{"id":"d368933b.4e56e8","type":"http request","z":"9b9b8a14.a27ce8","name":"Close FF0600","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0600","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":768,"wires":[[]]},{"id":"d8cd2dc4.3f631","type":"http request","z":"9b9b8a14.a27ce8","name":"Close FF0700","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0700","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":720,"wires":[[]]}]

```

The idea is: whatever comes through port 1 or 2 it will trigger the http request node to fire.

 ![Screenshot 2020-08-22 at 16.03.50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/8685a246d4db3532764dcaafe8ce8940da215d67.jpeg)

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 14:04 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/8 "2020-08-22T14:04:06Z")

</div>

Jesus , sorry , completely missed that, tought it was a screenshot of mine 🥴

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 14:18 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/9 "2020-08-22T14:18:32Z")

</div>

> [@bakman2](#):
>
> `[{"id":"684de79.0fac718","type":"switch","z":"9b9b8a14.a27ce8","name":"","property":"payload.openPercent","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"100","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":506,"y":672,"wires":[["5c134b4f.a5b7cc","c453aca4.5804a8"],["d8cd2dc4.3f631","d368933b.4e56e8"]]},{"id":"4a61b7fd.f8843","type":"inject","z":"9b9b8a14.a27ce8","name":"Close blinds","props":[{"p":"payload.openPercent","v":"100","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":696,"wires":[["684de79.0fac718"]]},{"id":"a8ba9e5f.859cc","type":"inject","z":"9b9b8a14.a27ce8","name":"Open blinds","props":[{"p":"payload.openPercent","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":648,"wires":[["684de79.0fac718"]]},{"id":"c453aca4.5804a8","type":"http request","z":"9b9b8a14.a27ce8","name":"Open FF0701","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0701","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":648,"wires":[[]]},{"id":"5c134b4f.a5b7cc","type":"http request","z":"9b9b8a14.a27ce8","name":"Open FF0601","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0601","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":600,"wires":[[]]},{"id":"d368933b.4e56e8","type":"http request","z":"9b9b8a14.a27ce8","name":"Close FF0600","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0600","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":768,"wires":[[]]},{"id":"d8cd2dc4.3f631","type":"http request","z":"9b9b8a14.a27ce8","name":"Close FF0700","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.0.144/FF0700","tls":"","persist":false,"proxy":"","authType":"basic","x":800,"y":720,"wires":[[]]}]`

Thx, this is completely my fault, i've forgot to mention that the blinds are activated by a relais which pulses , this means, the relais stays on for one second and goes back off (like the push of a button)  
That's why i put the trigger of 1 second in my flow  
The KM-Tronic Lan relais with the name [http://192.168.0.144/FF0601](http://192.168.0.144/FF0601) will activate the relais and the [http://192.168.0.144/FF0600](http://192.168.0.144/FF0600) will disactivate the relais.  
Just to clarify my flow...

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 14:25 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/10 "2020-08-22T14:25:25Z")

</div>

Ok so FF0601 is a blind and FF0701 is also a blind ? Or is FF070x the trigger to open them ?

Then the flow can be even more simple:

```auto
[{"id":"684de79.0fac718","type":"switch","z":"9b9b8a14.a27ce8","name":"","property":"payload.openPercent","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"100","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":506,"y":672,"wires":[["1aa9df11.8eab11"],["591de3de.5733a4"]]},{"id":"4a61b7fd.f8843","type":"inject","z":"9b9b8a14.a27ce8","name":"Close blinds","props":[{"p":"payload.openPercent","v":"100","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":696,"wires":[["684de79.0fac718"]]},{"id":"a8ba9e5f.859cc","type":"inject","z":"9b9b8a14.a27ce8","name":"Open blinds","props":[{"p":"payload.openPercent","v":"0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":310,"y":648,"wires":[["684de79.0fac718"]]},{"id":"5c134b4f.a5b7cc","type":"http request","z":"9b9b8a14.a27ce8","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"basic","x":862,"y":672,"wires":[[]]},{"id":"1aa9df11.8eab11","type":"trigger","z":"9b9b8a14.a27ce8","name":"","op1":"{\"url\":\"http://192.168.0.144/FF0601\"}","op2":"{\"url\":\"http://192.168.0.144/FF0600\"}","op1type":"json","op2type":"json","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":660,"y":648,"wires":[["5c134b4f.a5b7cc"]]},{"id":"591de3de.5733a4","type":"trigger","z":"9b9b8a14.a27ce8","name":"","op1":"{\"url\":\"http://192.168.0.144/FF0701\"}","op2":"{\"url\":\"http://192.168.0.144/FF0700\"}","op1type":"json","op2type":"json","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":660,"y":696,"wires":[["5c134b4f.a5b7cc"]]}]

```

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 14:28 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/11 "2020-08-22T14:28:44Z")

</div>

No, It's the same blind but FF0601 is opening it and FF0701 is closing it by pulsing (therefore the 1 second delay with FF0600 or FF0700

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 14:37 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/12 "2020-08-22T14:37:04Z")

</div>

Part of you and part of me , is working fine so THX!!

 ![zonwering](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/80edf5414800b0c4d43c34c1c2f47be82f65116f.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 14:38 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/13 "2020-08-22T14:38:14Z")

</div>

You can get rid of those http request nodes and switch nodes if you check the flow i posted, try to dissect it.

---

<div class="post-metadata">

**Author:** ![jepe63](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jepe63](https://discourse.nodered.org/u/jepe63)\
**Post date:** [22 August 2020 14:53 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/14 "2020-08-22T14:53:32Z")

</div>

Sorry , but without the http request i can't access my KM-Tronic relais

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 August 2020 15:11 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/15 "2020-08-22T15:11:32Z")

</div>

Yes i mean the redundant ones, import the flow and see.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 September 2020 15:11 UTC](https://discourse.nodered.org/t/question-about-nora-google-home-and-switch-node/31877/16 "2020-09-05T15:11:34Z")

</div>

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