Operate your device with Google Home Assistant
Operate your device from your phone using Magicblocks and Gooogle Home Assistant
Go to http://magicblocks.io/ and create your account for free. To complete this project you will need to import some nodes.
For this go to Manage palettes and import this set of nodes ‘node-red-contrib-nora’.
If you successfully add the nodes you will get a new set of nodes like this,
On your flow make this flow diagram,
For the above configurations to work there are some setting that should be changed. In the config field of the switch you should enter a token. To get this token go to this link https://node-red-google-home.herokuapp.com/login and create an account with your Gmail. Then you will receive a code which is unique for your Gmail account. Paste the token in the desired field.
It is important to note that under you switch node the connected sign will not appear since your node is not connected to google home.
Now go to app store or play store and download google home assistant
Create your account with the SAME Gmail used to create the account in NORA. This is really important!!!!.
Then you will be directed to Set up a device page. Click ‘Works with Google’. Then after that search for NORA and link it with the account. Along the way you will get options to select your address and select desired rooms to place any device. You can do that as you wish.
If you have deployed your Magicblocks flow you will be able to see your device on your mobile screen. It is important to note that the connected green sign should be seen in Magicblocks under the the switch node.
Now you can control your switch with voice as well as from keyboard. The output can be seen on the debug node. Instruction on connecting a WiFi enabled device is available in other tutorials. Please have a look at them.
Now you can control your device from your phone!!!
Now let us take a look at some other node….
Create the below flow,
Outputs the Activate message when Google Home activates the scene. If Scene reversible is checked, it will output the Deactivate message when Google Home deactivates the scene.
You can adjust the activate message to anything you like. A number, a string, JSON, Boolean, timestamp are some of the options you have.
So when you activate the node from your phone the desired message gets sent.