Have Google Home trigger smart device - actions-on-google

I'm developing a smart device that needs to respond to a trigger and take an action. I'm having some trouble however determining what will host the code that fires the trigger. Google Home appears to have events based on time but I can't seem to find anything that can trigger an event based on something like the weather. IFTTT seems like a natural fit but to have customers install IFTTT and then find my applet is a bit cumbersome. I could have my server monitor the condition and fire the trigger but ideally the trigger could be generated on-prem.
So my question... Does anyone have a good suggestion for where to host code that fires a trigger that is sent to a smart device?
*first-time poster so forgive me for any lack of formalities

Automations on Google Home are available for triggering actions but might cover all the use cases you specified. You can create your own system that changes the states of the devices based on your conditions, then report to Google via Report State.

Related

Implementation of WhatsApp/Telegram like calling feature in Flutter

How can I implement WhatsApp/Telegram like call notification when the flutter app is in the background or cleared from the recent task (clearing ram)? Can anyone let me know Exactly How to do this?
There is a great youtube series on this exact topic. In the series, a YouTuber by the name of the CS Guy creates a clone of Skype. I've placed the link to the video where he explains how to create a pop-up screen when a user calls another user, however, you may need to watch the previous videos within the series in order to get everything working. Its quite long but I recommend you watch the entire thing. In terms of displaying notifications when a user is called, I recommend you watch a video by Fireship listed below. In the video, he explains how to send notifications in the background when a certain event occurs in Firestore.
I can't explain the entire process in detail to achieve what you want but I can give a general overview of what you would need to do.
Watch the video/entire series by the CS Guy and complete everything
Learn how to send push notifications in firebase from Fireship
When a new document is created within the calls collection (You will understand once you finish the cs guy series) trigger cloud function.
Find the uid of the receiver of the call within the cloud function and grab the user's token from Firestore.
Finally, send a notification to the receiver telling them about the incoming call.
CS Guy:
https://youtu.be/v9ngriCV0J0
Fireship: https://youtu.be/2TSm2YGBT1s
I have done the exact same thing in my application and can help you out if you need further assistance, however, please go through both videos/series first.
You can use the flutter_local_notifications plugin with the firebase_messaging plugin.
From the documentation of the flutter_local_notifications plugin;
[Android] Support for the following notification styles
Big picture
Big text
Inbox
Messaging
From the documentation of the firebase_messaging plugin;
With this plugin, your Flutter app can receive and process push notifications as well as data messages on Android and iOS.

How to invoke Google Assistant via Button

all:
We want to enable Google Assistant with custom actions via the button, not the voice input (keyword).
For example, usually, we enable Google Assistant with word "Hello, Google, show me the weather.". But within our production, we want to press one specific button, and then it could send the sentence above out to Google Assistant directly.
But we can't find any APIs to support this requirement. And we heard that Google plan to support hard-key method since Samsung make good experiences on S8
Do anyone help us to fix this gap?
Thank you!
You could use an Action link without any additional parameters specified to trigger the MAIN intent, or specify the custom intent you'd like to trigger.

How to start a timer with the Actions on Google Timer trait?

I'm currently trying to develop a device that will work with the Google assistant. I've followed the Google codelab to set up firebase with the dummy project.
Now I'd like to implement the Timer trait. I'm currently able to set a timer by voice command on my virtual device using action.devices.commands.StartTimer but it only seems to set the desired timer duration in the database and doesn't not actually start it because when I ask "how many minutes are left on the timer" , it answers with the time initially set.
Do I need to pass the information to the device itself, that will handle the countdown and update firebase in real-time so when I do a QUERY , I get the timerRemainingSec from the device through the database ?
Thanks !
Yes. The action.devices.commands.TimerStart command is one of the Smart Home commands that is available if you're building a device. Google itself doesn't do anything with this except pass the command to you.
You are responsible for implementing the command on your device however makes the most sense for your device.
Google just provides a way for users to access your device.

How To Record/Track User Actions in iPhone.....?

Is there any easy and effective way to track user activities from my iPhone app. I have to record all actions performed by user in my application without any performance/frozen problems. There should be no limits like per second hits etc.... App is global and cross platform. It is better if I can write my own custom algorithm to make this functional.
You can also use google analytics
https://developers.google.com/analytics/devguides/collection/ios/
We use a service called Flurry Analytics. It works on all mobile platforms and we have had great experiences with it. Free too!
http://www.flurry.com/flurry-analytics.html
The app can collect all kinds of information in a very versatile manner and is efficient in when it sends the data back the the server. I believe it's only when the app terminates.
On the device side it is super easy to set up and beginning tracking user events.

Setting a Recurring Event using Appcelerator Titanium

I've got an app I'm building using Appcelerator Titanium that will be a combination alarm clock/url fetcher. The part I'm having problem with is that I need to be able to set a time for the app to go fetch the url and then perform actions as necessary (in this case alert the user if data that should be entered in a time system has been entered). I also want it to do this every day (or every week day) at the prescribed time, and I want it to not have to be 'launched' every time. I'd rather it come up and run as a service, or at least run as a service when sent to the background. I'm most focused on the iPhone, but I've got a few Android users that would like it as well.
Is it even possible to have an Appcelerator app hooked into the system like that? If so, are there any tutorials or examples? I can't even find an alarm clock example, which scares me a bit.
I think that localNotifications should work for you.
there is a sample in the bg.js file included in the kitchenSink.
It is also helpful to know that all of the keys/properties available to you are documented here in the source code.
This guy has a nice alarm module written for android.
https://github.com/benbahrenburg/benCoding.AlarmManager