Set variables via Google voice

Is there a way to change a number variable (or any of the other variable types for that matter) by telling google assistent what the value is?

Welcome Adel,

Not that I know of.
Maybe, when you show us what you’d like to achieve, there might be other ideas / solutions.

Hi :slight_smile: I don’t have Homey pro yet, so in the meantime until it gets here I’m playing with automating and making my reminders smart. For example this situation: I pay everything with by bank card or online and don’t usually carry cash or use it to pay anything other than my regular bi-weekly supply of meat for my dogs and that can only be paid in cash to the delivery man of the company as it is real-weight based, so the total price can differ a bit (±2€) from my online order total


They deliver every thursday of ODD weeks, so I set up a reminder chain with push notifications and confirm Y/N notifications for wednesdays of those weeks. It reminds me to go to the ATM and later checks with me if I did so - if yes, the flow sets the variable “DoIhaveEnoughCash” to YES and stops; if no, sets the variable to NO and continues, waits a while, then checks with me again and like this 3 times during the afternoon-to-evening. So if I say YES the first time, the reminders stop there, otherwise continue until 9pm - if I still didn’t go to the ATM it scolds me sarcastically :smiley: Then one last time on thursday morning I get a final reminder but only if the variable is set to NO.

Ultimate goal:
I have a Google spreadsheet for my finances where I keep track of income, expenses and of course actual balance in back accounts and also input in one cell how much cash I have. I wanted to make a new number variable “CashAmmount” and for this flow to fetch the value from here at the begining. But checking out the Google sheets app in the app gallery it looks like it can only export data from homey to the sheets and not read and fetch them :frowning:

Once the Homey pro gets here (as I understood it’s needed for this to work) I’d like to set up another flow that would have access to my Gmail and could fetch the total price from order confirmation email and assign that value to “OrderTotal”. Not sure if this is possible.

If I could do these 2 things I wanted the flow to compare “OrderTotal” and “CashAmmount” :
IF {{“OrderTotal”+5}} > “CashAmmount” then set “DoIhaveEnoughCash” to NO & starts the reminders flow (idealy even telling me the difference so I know right away how much money I need to take from ATM)

IF {{“OrderTotal”+5}} < “CashAmmount” then set “DoIhaveEnoughCash” to YES & doesn’t start the flow and no reminders are received.

The +5€ is a buffer to account for the possible final price difference between order confirmation email and the real price, as explained in the first paragraph.

Alternative:
If there’s no way to fetch those 2 values from Gmail and G. Sheets, I wanted to input the variable values via voice assistant, hence my original question :slight_smile:

If you can get google’s advanced automation script to send a webhook its feasible. Homey can listen to incomming webhooks and pipe the payload into a tag to be further processed within the flows.

Thanks, I’ll have a look on that, but honestly I have no idea what a webhook is and scripting and programming is beyond me :smiley:

1 Like

Its not that complicated.

Its just a URL to call like you open a webpage. With sending a webhook it needs a payload.

Send webhook to >> https://webhook.site/f6ca7b50-9eb6-44d5-aa7d-43c336d680fa

Payload = 
{
    "googleVoice": "whatever was put in the payload by google HERE"
}

The whatever was put in the payload
 becomes available in Homey

Jepke, with all due respect, but saying ‘it’s not complicated’ to anyone who hasn’t got a clue about scripting and programming
 please don’t do that.
I also haven’t got a clue what you just wrote. No offence, but this is pretty advanced stuff. Payload, piping


That’s right, I also have no knowledge of scripting, but the requirement is also very advanced and without scripts and webhooks it’s probably not possible. And with the support of the community, I think it’s doable. If it’s possible at all. :wink:

@Adel_Cori, how and with what have you done it so far?

Hi guys,

Thanks to all of you for your inputs :slight_smile: Guess I’m too needy for a newbie, haha :smiley: For now I set up this reminders flow with only 1 variable and without the other two and the comparing I was dreaming about being able to make up 4 days since discovering that something like Homey exists. It is not crucial and I’m fine with just having this, although “the ultimate goal” as I called it above would be great and one less thing to worry about myself.


Hi,

I see one flaw in this example flow, which is the use of the native delays, longer than a few minutes.
Because, in case of a power outage, or restart, those delays are gone, so when the flow was still active before the restart, and with running delays, the flow never continues these running delays. You can imagine the strange results.

I always use a timer for most delays, and I prefer Chronograph. Those timers survive a restart & power outage. An unexpected Homey reboot is not uncommon, especially when you haven’t disabled the auto firmware update function.

1 Like

Good point Peter, thanks :slight_smile: Although I can’t use Chronograph for the moment as it is only for H. Pro and I don’t have it yet. Once it arrives, I’ll change the flow as sudgested.

1 Like

Even if I can’t read everything, the flows look quite good at first look.
One more note about the push messages with yes/no confirmation. You have to answer these push messages within 30 minutes. After 30 minutes, the flow will not continue.

I’m interested to see if it’s also possible with Google voice input (or Siri via shortcut). So I’ll be watching. :wink:

1 Like