How we use the Voice Monkey plugin

Posted on
Thu Feb 23, 2023 10:22 am
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

How we use the Voice Monkey plugin

We use the capabilities of the Voice Monkey plugin in our home in a number of ways. If I had to pick, to keep this post short, here are my four (4) favorites ways.

    The very first automation I setup, will always be my favorite. It was inspired by the Indigo Timers and Pesters Plugin. Every Wednesday at 7:15am, we are asked by the Echo dot in our bedroom if we remembered to take the trash out. If the response is "Yes", the devices says; "Ok, I won't remind you again'. If the response is "No", the devices says; "Ok, I willl remind you again in 20 minutes" and 20 minutes later, it asks us about it again. If there is No Response, it asks in my office area.

    In my office area, an Echo dot asks ~1 minute before the area is shut down due to a lack of movement or activity, "There doesn't appear to be anyone in the room, is it ok if I turn off the lights?" If the response is "No", it make adjustment to timers for the area, prevents the lights and other devices from turning off and appologizes for bothering me. If I answer "Yes" or there is no response, the normal shutdown process continues.

    Every morning an Indigo scheduled action, triggers an Alexa Routine which says good morning, gives us the time and date, the weather forcast and a good news story. I call out that its an Indigo scheduled action because you could do this entirely in the Alexa App with a Alexa routine. I choose to do it this way so I don't have to track which automations are initiated by an Alexa Routine. By design, all scheduled automations are controlled by Indigo.

    This one is wife approved, so it has to be on the list. Light Sensors are attached to both our washer and dryer, which are able to detect cycle changes, by monitoring the LED status indicators. When a cycle ends, two Echo devices, one in our bedroom and the other in our family room make an announcement. When the washer completes its cycle, the Echos say; "Your clothes are ready to be transferred to the dryer." When the dryer cycle ends, it says; 'Your clothes are dry and ready to be taken out.'

Posted on
Thu Feb 23, 2023 12:01 pm
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

How we use the Voice Monkey plugin

This is brilliant.

I was telling Jon earlier I’ve put tilt and temperature sensors into my milk bottle box today and had set up pushover notification to nag me until I’d brought in the milk.

But using this is even better as anyone in the house can then go and get it.

Posted on
Thu Feb 23, 2023 4:45 pm
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: How we use the Voice Monkey plugin

Ok I have it set up and its asking questions from the web gui, but a bit confused on how to set up.

I have my yes and no responses set up as presets in the Voice Monkey GUI.

I have a Voice Monkey Device set up in Indigo with the device name of my Device, and the YEs and No Preset IDs matching the presets in VM.

I then have an action group >. Ask a Yes/No that picks the above device, has the Question, and an action in the Response is No that starts a timer.

However despite hearing the preset repsonse to my No reply, the plugin doesnt seem to recognise that so my action group doesnt get triggered, and I get a message saying that
'<device name> did not receive a 'Yes' or 'No' response to :<question>? "

I then have to cancel via Manage Yes/No questions.

What have I got wrong that the Yes or No isnt received in by the plugin?

Posted on
Thu Feb 23, 2023 6:46 pm
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: How we use the Voice Monkey plugin

After a painful hour of trying to set up the remote control and using alexa-cookie2, and the horrendous documentation I got all the dependencies installed and generated a token, and added into the .sh file (still not clear which folder that should be in python includes or scripts. Not sure if I need email password and/or MFA token in there as well ? Not sure how to do the MFA token

Still not seeming to pick up on the question responses though.

Posted on
Thu Feb 23, 2023 7:22 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

siclark wrote:
Ok I have it set up and its asking questions from the web gui, but a bit confused on how to set up.

I have my yes and no responses set up as presets in the Voice Monkey GUI.

I have a Voice Monkey Device set up in Indigo with the device name of my Device, and the YEs and No Preset IDs matching the presets in VM.

I then have an action group >. Ask a Yes/No that picks the above device, has the Question, and an action in the Response is No that starts a timer.

However despite hearing the preset repsonse to my No reply, the plugin doesnt seem to recognise that so my action group doesnt get triggered, and I get a message saying that
'<device name> did not receive a 'Yes' or 'No' response to :<question>? "

I then have to cancel via Manage Yes/No questions.

What have I got wrong that the Yes or No isnt received in by the plugin?


I am almost done with a step-by-step markup document, (44 steps) which walks thru the configuration of Yes/No questions.

A guide for creating a device and triggers is on Github. TRIGGER.md and DEVICE.md for now. I call them guides but they really are just screenshots of what is required on the Voice Monkey site, the Alexa App and Indigo.

There are a few steps you may have missed. Since you didn't mention it, did you Publish the Voice Monkey Device you created in the Indigo Alexa Plugin? Once you published it, did you create Routines in the Alexa App for each Preset, Yes and No, that power On and Off the published device?

The Voice Monkey Plugin is dependent on the Alexa Plugin. What's happening once you respond to the question, is the Voice Monkey Plugin, waits for the for the Alexa Plugin to turn On or Off the device. The plugin interprets that as either a Yes/On or a No/Off..

Here is an example of what you will see once we get it working.

Code: Select all
Feb 23, 2023 at 8:10:17 PM
   Action Group                    Ask a Yes/No Question - Loft - Did you think this would be easy?
   Voice Monkey                    Loft Echo : Asked a Yes/No Question : "Did you think this would be easy?"
   Alexa                           turning off 'Loft Echo'
   Voice Monkey                    'Loft Echo' received a 'No' response.
   Action Group                    2 - 'No' Response Action Group

Posted on
Thu Feb 23, 2023 10:24 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

siclark wrote:
After a painful hour of trying to set up the remote control and using alexa-cookie2, and the horrendous documentation I got all the dependencies installed and generated a token, and added into the .sh file (still not clear which folder that should be in python includes or scripts. Not sure if I need email password and/or MFA token in there as well ? Not sure how to do the MFA token

Still not seeming to pick up on the question responses though.


Looking at my notes, is bring back memories of being a bit frustrated with my challenges getting alexa_remote_control working. Looking at my configuration file, and confirming with my notes, line 100, is all you need.. That's the line that starts; "SET_REFRESH_TOKEN". This is the Refresh Token that is deciphered using alexa-cookie-cli-macos-x64

The dependency that I had a slight problem with was 'jq'.

To install that, I had to install Home Brew. Then I used Homebrew to install jq 1.6 with brew install jq

On my system, HomeBrew installed it in a different location than alexa_remote_control expects. So the other change for me was at line 130.

Code: Select all
# jq binary
# SET_JQ='/usr/bin/jq'
SET_JQ='/opt/homebrew/Cellar/jq/1.6/bin/jq'


The only other thing my notes mention is changing the permission with 'chmod 755'

Place these two (2) files in the Python3-includes folder voice_monkey.py and alexa_remote_control.py, Put the alexa_remote_control.sh in ' /Library/Application Support/Perceptive Automation/Script', because that is where alexa_remote_control.py is going to look for it.

Hopefully some of what I shared, will help. I'll look into finding a computer to walk thru a clean install of alexa_remote_control.sh to see if I missed anything in this post.

The guide on setting everything up for prompted Yes or No questions is now on GitHub. It's 44 steps which I have walked thru a couple of times, meaning it feels complete. It assumes you created a Voice Monkey device, which it sounds like you have.

https://github.com/anyone2/IndigoPlugin-Voice-Monkey/blob/main/YESNO_QUESTIONS.md

Simliar guides are there as well for Creating a Device and Creating aTrigger. TRIGGERS.md and Devices.md

Appreciate you jumping into the deep end right away. The good news is, what we're discussing right now, is a one time installation and configuration.

Posted on
Fri Feb 24, 2023 1:25 am
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: How we use the Voice Monkey plugin

Thank you. I don’t think I appreciated the complexity of this setup initially!! Alongside a new setup of all my zigbee devices and what I now see is a day to migrate to 2022.2 and playing with how new shortcuts help with ChatGPT I might have taken on more than I can manage.

I’ll wait for your write up and spend some more time on this next week.

Posted on
Mon Mar 06, 2023 10:09 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

I was able to walk thru a clean installation of alexa_remote_control.sh, to see if I missed anything.

I did run into a problem that was resolved by using an older version of the project file. 2021-11-16: v0.20c, is what used.

As I mentioned, jq is a dependency but it is optional (**EDIT**). It's installed from HomeBrew. On the front page of https://brew.sh there is a command to install Home Brew.
Around line 133, you will need to change the path to jq.

When you execute alexa-cookie-cli-macos-x64 in the terminal, it just waits for you to log into the amazon website to capture the cookie. If you launch it without specifying a language, the webpage that comes up in your browser is in german. It's easy to see where to put the user name and password but I didn't expect it, yet again. Once you login, the value you need, is displayed in the terminal window.

My note on chmod 755 was referring to the fact you have to change the permissions on these two files to execute them.



All of the above went fine, then when I launched the script, I saw the below error

Code: Select all
./alexa_remote_control.sh -a
cookie does not exist. logging in ...
date: illegal option -- d
usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]
            [-I[date | hours | minutes | seconds]]
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]


Reviewing changes to the project since my initial installs, there was a change 2022-06-29 at v0.20e which removed call to jq's strptime function, per the change log.

By reverting to an older version of the project, prior to this change, I was able to get it working. So if you, or anyone else sees something similar, use the project file at the link below.

https://github.com/thorsten-gehrig/alexa-remote-control/blob/c52abdcc230766b241cd69c26c370648501dcfb9/alexa_remote_control.sh

Posted on
Tue Mar 07, 2023 2:36 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: How we use the Voice Monkey plugin

Just a quick question: I am trying to add a device to Voice Monkey, shall I add the exact name of my Echo device?

Thanks

Posted on
Tue Mar 07, 2023 7:44 am
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

MarcoGT wrote:
Just a quick question: I am trying to add a device to Voice Monkey, shall I add the exact name of my Echo device?

Thanks


When adding a device, you can name it anything you like. The name you give the device on the Voice Monkey site doesn't matter, as long as it matches the name you enter in the 'Voice Monkey device name' field when configuring the device in Indigo. The actual name of the device is selected by you from a menu as a step in creating the device, in the Alexa App..

For example, let's say you have an Echo device named 'Sarah's Room'. You could create a device on the Voice Monkey site called 'Sarah's Room Monkey'. When creating an Alexa Routine, you would select 'Sarah's Room' from the list of available devices. In Indigo, when creating the device, you could name it 'Sarah's Room'or something else but you must configure it with the exact name you used on the Voice Monkey site, 'Sarah's Room Monkey', in the 'Voice Monkey device name' field.

I hope this helps.

Posted on
Tue Nov 07, 2023 4:45 pm
joeaug offline
Posts: 28
Joined: Apr 13, 2019

Re: How we use the Voice Monkey plugin

Use voice monkey...I can't even get it configured :P

Seriously, the configuration dialog for the Plugin for Indigo asks for both an API Access Token and an API Secret Token. It’s not a problem to find the API Access Token from my voice monkey dashboard, but the API Secret Token is no where to be found. In fact, any time you search for “Voice Monkey API Secret Token, all of the results I can find only talk about how easy it is to find your API Access Token - there is nothing about a second secret token. Do you happen to know anything about this issue? Obviously, a few of you have gotten it configured. Thanks!

Posted on
Tue Nov 07, 2023 5:11 pm
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

joeaug wrote:
Use voice monkey...I can't even get it configured :P

Seriously, the configuration dialog for the Plugin for Indigo asks for both an API Access Token and an API Secret Token. It’s not a problem to find the API Access Token from my voice monkey dashboard, but the API Secret Token is no where to be found. In fact, any time you search for “Voice Monkey API Secret Token, all of the results I can find only talk about how easy it is to find your API Access Token - there is nothing about a second secret token. Do you happen to know anything about this issue? Obviously, a few of you have gotten it configured. Thanks!


Thanks for calling it out, I missed the notification that a new API, v2, was available. I sent an email to the developer, asking if the information can be obtained somehow.

Looking at the documentation, API v1, which this plugin is based on, is no longer supported but continues to work for existing v1 users.

The solution is for me to update the Plugin to also support v2.

Give me a few days, to do that

Posted on
Tue Nov 07, 2023 7:21 pm
joeaug offline
Posts: 28
Joined: Apr 13, 2019

Re: How we use the Voice Monkey plugin

Thanks so much for the information and for your work on this! It's a relief to know it's not just me ;-)

Posted on
Wed Nov 08, 2023 12:44 am
siclark offline
Posts: 1963
Joined: Jun 13, 2017
Location: UK

Re: How we use the Voice Monkey plugin

joeaug wrote:
Thanks so much for the information and for your work on this! It's a relief to know it's not just me ;-)
Don't worry. I couldn't get it configured on v1.

Posted on
Wed Nov 08, 2023 9:53 am
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: How we use the Voice Monkey plugin

joeaug wrote:
Thanks so much for the information and for your work on this! It's a relief to know it's not just me ;-)


In the transition from v1 to v2, the access token and secret token have been combined into a single token for simplicity, with the two parts separated by an underscore (_).

For instance:

In v1:
- Access token: XXXX
- Secret token: YYYY

In v2:
- Combined token: XXXX_YYYY

To adapt, you can use the segment before the underscore as the access token and the segment after as the secret token.

Could you please confirm if this resolves the issue with the plugin for you? Your feedback is invaluable to ensure that it is functioning as expected.

Who is online

Users browsing this forum: No registered users and 3 guests