Cannot run Google Home assistant routines by conversation relay - google-assistant-sdk

I'm using google assistant relay (https://github.com/greghesp/assistant-relay/) on Raspberry PI. My objective is to allow my automation (jeedom) server to run Google actions. For basic instructions, everything is ok, such as switch on the light of a room. But when trying to run a Google Home routine command (for example, "lunch time" that should light on living room, light off tv room) assistant doesn't run routine but answer such as if routine was not existing, for example it tries to search for a restaurant named "lunch time".
I registered a device (obtaining model id and device id) and put reference of this device in the relay system but it does not work better, same result.
In Google Home app, I set for this device permission to execute with personal data but same result.
I expect to launch routines with my relay in order to allow my jeedom server to put some advanced tasks to Google.

Developer of Assistant Relay here.
I'm not sure if the triggering Routines is a SDK limitation or not. Some people seem to have had success with Hass.io's integration, however I've not managed to get it to work (not looked into it too much)
I'm working on V3 so will see if I can get it working

Related

Communicating with Google Home and Google Assistant with the Application We Developed Instead of the Smart Home Device

I work for a company that develops a smart home device.
The company is developing an android application for smart home devices it has developed/designed.
In addition, he wants to control the smart home devices he has developed with the Google Assistant.
We currently cannot use "Custom intents" for the "Voice-enable your Android app" feature. I wish we could add google assistant feature directly to our software independently (without any google home or nest affiliation)... (https://developers.google.com/assistant/app/custom-intents)
custom intents; It is not specialized for Smart Home and is not used in local languages ​​such as Turkish.
We are focusing on the Google Assistant feature for Smart Home. (https://developers.google.com/assistant/smarthome/overview)
Scenario 1: There is a way that Google communicates with the developer cloud via Access Token. (https://developers.google.com/assistant/smarthome/concepts/fulfillment-authentication)
Scenario 2: There is also a second way. Here google assistant is communicating with a google home or google nest device (rather than developer cloud).
(https://developers.google.com/assistant/smarthome/concepts/local) Obviously something strange is going on here. Google Assistant; It says it will contact google home. Is it the google home app installed on the phone he's talking about here, or a google home app like a speaker? Because at https://developers.google.com/assistant/smarthome/concepts/local#supported-devices, a speaker is shown as google home. If it's not talking about the google home app on the phone, or if it can't communicate with the google home app on the phone, it's not much use to us. Because the user may not have a physical google home product/device.
Neither of these scenarios fits exactly what we want to do. What we want to do is exactly this; Google Assistant should neither communicate with our cloud (to avoid lag) nor should it communicate with a google nest device (because the user may not have such a device). It should communicate directly with our app installed on the user's phone. Google Assistant or Google Home; should tell our application the purpose to be fulfilled. Let's send the request sent to us by google assistant or google home to our device or cloud (whatever options are possible).
Is there such a feature in the local home SDK of Google Assistant? Or is there another way google assistant can communicate directly with our app?
Because it is frankly very strange that google home or assistant try to communicate directly with a smart device when our app is installed on the user's phone. It can communicate with our cloud server, but why can't it communicate with our application installed on the phone?
Google assistant or google home; can communicate directly with our application installed on the phone while registering the first account instead of our oauth 2 server. Google is linking to our app instead of using oauth 2 directly. Our app connects to oauth 2 and gives a token to google. In other words, the user can make a sync with our local application on his phone. https://developers.google.com/assistant/smarthome/develop/implement-app-flip#implement-app-flip-in-your-native-apps
But I also think that in order to control smart devices, the user would have to communicate with our application installed on his phone.
Is there a way to this?
The platform does not support a way to directly control a smart home device through an app installed on a phone. Counter to your scenario, there are times when a person wants to control their device when their phone is not around.
Local Home SDK integrations are in addition to an existing cloud integration. This base cloud integration is needed in the cases that a person is not at home.

How to send direct command from Google Home to custom smart device without app name?

I try to build my custom IoT device that will be controlled via Google Home device, and serve people with disabilities.
The device itself is Tiva C Launchpad, that I program from scratch, meaning I will have a full control on it.
In my vision, the user wil say something like: "Ok Google, press play button", and as a result, the Google Home device will send a direct command of press_play_button to the IoT device, preferably via the local network.
I found the Google Action SDK, alongside with the Local SDK extention, but if I understood correctly, I have to be in the app mode first ("OK Google, play {app_name}") before pronouncing the action I want, which is inconvenient.
Is there any way to achieve my requirement?
If not, I may give up on the local network control, and use sort of a webhook to send HTTP request to my smart device, and in that case I wonder if MQTT will be more suitable.
Thanks.
The Local SDK is an extension to the Smart Home API. If your device matches up with the device types and traits that the Smart Home API supports then you can use that to control your device.
It has support for media players so things like play/stop should be possible.
I have build generic Smart Home control using MQTT to reach the device, but you have to provide a HTTP endpoint for the Google System to interface with. This take a little thought as you have to map MQTT asynchronous approach to HTTP's synchronous nature.

How can I forward iOS 2FA SMS code to slack?

With Apple getting ever more stringent by enforcing 2FA on all iOS accounts, a unique challenge that we've encountered is how to setup a system where Apple’s 2FA codes for a shared dev account can be forwarded to perhaps our private slack channel? Hence enabling multiple members on a team access to Apple’s services.
I got so annoyed by this that we then developed a hack.
It’s a Python script that’s running in a terminal on the mac mini CI machine and using some vision SDK tooling, checks the screen every few seconds for the 2FA dialog pop-up.
If it finds it, it then navigates the pop-up, crops the 2FA code, does OCR on it, and relays the code through the Slack API to a dedicated internal buildbot channel that our devs get notified on.
Sample cropped 2FA code screenshot:
The result, is the general shared apple id account is now much more convenient and efficient to access by our devs for CI/CD or any other client App Store info updates.
So that’s one way to do it. 😎

Is it possible to integrate Google Assistant with my custom app?

I would like to integrate Google assistant inside my app. The idea is that I have a app which provides various press services, like giving latest news and such. I would like to integrate Google assistant for handling some particular requests. For example the user may ask, "what did the Lakers yesterday?" If i search this on Google or ask to the assistant, i will get a card with the score of yesterday's game. I would like, from inside my app, to replicate this interaction, that is sending the request to Google assistant and showing the answer that Google return to the user (or at least opening Google assistant with the answer)
Is such a thing possible?
I was looking at Google Assistant service sdk (https://developers.google.com/assistant/sdk/guides/service/python/) and it says:
The Google Assistant Service gives you full control over the integration with the Assistant by providing a streaming endpoint. Stream a user audio query to this endpoint to receive a Google Assistant audio response.
Is this possible only with audio interaction? I'm not quite certain this is the solution I should look into
The Google Assistant SDK Service allows you to send both audio or text to the Assistant and you'll get back responses including audio, display text, and rich HTML visual content.
For mobile apps, there's less support compared to Python, but it's still doable. For example, there's a version of the SDK for Android Things, which means for IoT devices like a Raspberry Pi. You can go through this project and remove all the IoT references, but it's something you'd need to do yourself.

Google Voice Actions, Home, Actions, Assistant

Please can somebody give a short summary/difference between Google Voice Actions, Home, Actions and Assistant (Dialogflow)? I would like to control my android java application via google assistant/home, but I'm having hard time finding something I can start with.
If you are building something for the Google Assistant, you will use Actions on Google. This is a cloud-based platform for AI-powered interactions. An action can take a user's intent, either through text or a transcription of what they said, and return a useful result.
Most people are not experts with natural language understanding, so they can use Dialogflow. This service gives developers the ability to easily match the user's intent and identify entities through what they said.
Once you build an action, you can publish it for the Google Assistant. This is a platform that is available on a variety of surfaces. Surfaces include Google Home as well as your phone.
If you are interested in building a device that embeds the Google Assistant or want to add the Google Assistant to your application, you can use the Google Assistant SDK. This allows you to make requests to the Assistant and present the response to the user.
Depending on what you are building, the tools you will use can vary.

Resources