Control Google Home with Raspberry Pi - raspberry-pi

I have a Google Nest and a Raspberry Pi. I would like to be able to send commands from the Raspberry to the Google Nest. I have done some research and I have found ways to control the rpi with the Google Nest but not the other way around. Any clue would be helpful Thanks!
EDIT: I think Google Nest may not be the target but the google home app. In the end I want to be able to do something like this: rpi sends request => light device registered in my google home app opens/closes.

You can target the Google Nest using the Smart Device Management API.
However, there are currently only a few traits supported for controlling the Nest, specifically targeting the on-board camera.

Related

Is it possible to Web Request from a Raspberry Pi Google Assistant to a socket (http://192.168.X.X:8000) using IFTTT (WebHooks)?

This is a huge project that my group is working on right now. We are very inexperienced with IoTs and Web stuffs.
First, we created an android app and with it, we're sending a message to the socket with port 8000 (192.168.X.X:8000) with a press of a button. The messages being sent are color names (Green, Red, Blue, etc) and our raspberry pi is running a script that could decode this color names, control the GPIO, and light up a whole LED Strip depending on the color sent. We are successful in this portion.
In addition, we managed to successfully install Google Assistant into Raspberry Pi. Now, we're planning to use IFTTT (If Google Assistant Then WebHooks) to make custom commands for our Google Assistant. We also managed to run the LEDStrip script and the Google Assistant script together on Raspberry Pi with no issues at all.
Now the problem that we're facing is sending a message to the socket.
Example: "Ok Google, Green Light Please" will send a message "Green" to the socket and the LEDStrip script will just receive it normally like how it receives messages from the android app.
Is it possible to do this? I've been researching a lot about POSTing Web Requests to http://192.168.X.X:8000 using IFTTT; and even tried the Google Advanced REST Client to do it manually but I'm just not successful at all. It says the http://192.168.X.X:8000 is not a valid URL or can't be accessed.
ISSUES ENCOUNTERED SO FAR:
Directly controlling GPIOs with Google Assistant on Raspberry pi by customizing hotword.py isn't successful for us at all because we can't import the neopixel library since the Google Assistant runs in virtual environment (env).
Thanks. Hope someone would be able to help us. We accept any recommendations on how to make our project successful.

Raspberry Pi Home Automation (HUB)

I have been experimenting with home home automation and want to turn my raspberry pi 3 into a hub not something my devices manually connect to e.g from the gpio pins. In many unsuccessful attempts I have tried OpenHab. I would like to mount a touchscreen with a GUI so I can e.g turn the lights on from this control panel instead of via phone or other hubs available like Google Home. If anyone knows how I might do this it will be much appreciated.
It seems like home-assistant with floorplan would work for this. It takes a little bit of configuring but well worth it.

Connect(control) Kodi Between Rooms?

Hello I am trying to work out how to set kodi up on my smart TV. My main problem lies with the TV being on the wall in another room too far away from power sources. She has sky installed and that was situated in the other room and with a HDMI lead fed under to floorboards to the other room by a professional someone or other. I am unable to feed another HDMI lead along the line.
Is there a way I could connect kodi by some other means to the TV? I am not really up on these things.
At the moment I have the kodi box in another room and I have to switch the sky lead to the kodi box to use. Also this means you have to be in the other room.
Can anyone suggest a way for me to get kodi working on the tv and be able to operate it via remote control?
I use Kodi on all of my TVs through an amazon fire stick. Most smart TVs have a USB on the back of the TV that can power the fire stick while its plugged into the HDMI so you wouldn't have to worry about power. I have a Sony bravia that will control the fire stick as long as I am on the input the fire stick is plugged into so no need for an additional remote.
To start off this is the wrong place to ask. This is a Q and A platform for programming questions and coding related questions.
To give you an answer though because I'm not a dick the best way to do it would be using a NAS. You would have two Kodi boxes but one media store.
I'm not sure which device do you use.
In my case, I installed Kodi on my Raspberry Pi(RPi) and TV and RPi are connected with HDMI. My TV is Samsung SmartTV, which supports HDMI-CEC. So, RPI can get RCU Key input from TV.
(HDMI-CEC allows devices connected to your TV through HDMI ports to communicate back and forth with your TV. )
In addition, you can customize keymaps for remotes in GUI by using the community Keymap Editor add-on.
https://kodi.wiki/view/Keymap
Check your TV supports HDMI-CEC, first.

Raspberry-pi as connectable beacon

I want to build some kind of two-way bluetooth connection on Raspberry-pi which actually works as beacon. Based on RadiusNetworks tutorial (How to Make an iBeacon Out of a Raspberry Pi http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html) I've built beacon on my Raspberry-pi, but it's working in "advertise and not-connectable" mode (which is connected with problem described here: Raspberry Pi iBeacon connection timing out).
What I want to achieve is beacon device, which works in advertise mode and also allows to receive some events from other device (i.e. iPhone). When iPhone discovers Raspberry-pi beacon I want it to send some data to Raspberry-pi to trigger some action. I know that in the simplest way my iPhone should send data via network to raspberry while it enters to the beacon region, but unfortunatelly my solution has to work in offline mode, so I'm looking for some kind of direct (and possibly fast) connection. I think that PayPal beacon is a good example of my needs (as it is decribed here: https://devblog.paypal.com/how-does-paypal-beacon-work/ their device works as gate for communication user smartphone with PayPal services).
I'm complete beginner in BLE topics, so I would be grateful for any hints where I can start exploration or how to properly ask Google for any good answers in this topic.
For complex interaction, you need to learn how to build a connectable Bluetooth service with BlueZ, which is the Linux open source Bluetooth stack. Once you have this service, you can write iOS code using CoreBluetooth to connect to this service when the beacon is nearby.
Unfortunately, I do not know of a good tutorial for building services on BlueZ. The BlueZ code is open source at least, so the code is a good place to start looking:
http://www.bluez.org/development/

Google-TV device not found to pair with Google Anymote

In building the Google Android app for Anymote tv control (I've got some Sony Google TVs to work with), I never actually seem to find the TV when I run it - just getting "No Google TV devices found on ". I've tried it on an actual phone (not just the emulator) and have also tried the TV "connect" pairing button, but it never seems to find anything. Both the phone and the TV are on the same WiFi network. Anybody get this to work?
Does the google-tv-remote app work on your sony google tvs? If so then I would check the source for that app, found here. This should allow you to troubleshoot why your device is not found. The process of discovering devices depends on mDns as found here in the docs. So there are several things to check in regards to making sure multicast packets are allowed on your network/device.
As a fallback I would also allow manual ip entry in case a user wasn't able to discover the device on their network, the google-tv-remote allows for this as well, I would take a look at that source to get an idea of how that applications handles different scenarios.
And as always, if it's not working, provide some examples of how you are trying to do the discovery as you haven't provided any information(source, logs, etc) for anyone to look at.
My experience with the sony google tv is that the multicast packets are reliably sent out shortly after the box is started. Paring at all other times is virtually impossible