Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Physical Button Instead of GUI Button #14
Comments
shankararunachalam
commented
Mar 26, 2016
|
I am looking for this too. Currently I am considering using Amazon dash since there is an existing hack to make that button work with pi but haven't had a chance to code anything yet. |
marksev1
commented
Mar 26, 2016
|
Yes this would be way better than using the GUI. |
krcm0209
commented
Mar 26, 2016
|
This is the only thing preventing me from building it and showing it off to friends. |
shankararunachalam
commented
Mar 26, 2016
|
Somehow assumed that the java client would be thin. Looks like it has a good deal of functionality. I haven't dabbled with Java that much. Is there a way to quickly convert the UI entry point of this java client into a service that a python script could call? The Dash button click could be registered easily in a python script. |
marksev1
commented
Mar 26, 2016
|
That would be a cool way yeah, if you can somehow debug on what happens in the terminal when you press some key in the gui that would be golden then :D |
lemire
commented
Mar 27, 2016
|
How hard would it be to emulate the actual Echo and have it record continuously, triggering a query when a specific phrase is uttered? Seems like we have some building blocks already : https://github.com/StevenHickson/PiAUISuite |
sdcharle
commented
Mar 28, 2016
|
This was neat and I got it up and running quickly, but in total agreement that having a way to toggle the listening mode with a physical button, specifically the sweet giant red arcade button I bought for a different project, would be great. I will dig around but as others have pointed out the Java client appears rather cumbersome. A Python API enabling us to write a script to act when the GPIO pin changes would be so much more impressive. I used to do stuff w/ Java but it's been a while (and everyday I am grateful for that, haha)... |
shankararunachalam
commented
Mar 28, 2016
|
//and everyday I am grateful for that// - you could say that again :) I took a peek at the iOS code and that seems pretty lightweight. It would be nice if the contributors could add a line or two about what each sample is capable of and what's the division of labor between companionService and javaClient. Of course, I am going to get this info after I spend a bit more time with the code, but this seems like useful info to be mentioned in the Readme. cc: @ajotwani |
halwebguy
commented
Mar 29, 2016
|
I haven't done it yet, but looks to me like just a couple things are needed to make this work (and I haven't touched Java in quite a number of years either)
Basically, include all of the includes, pull the guts out of the Pi4j sample main method and throw it into AVSApp and use this in the handleGPIO.....stateChangeEvent method, `
If anyone tries it, let me know if it works. I'll probably try this at some point over the next few weeks |
shankararunachalam
commented
Mar 29, 2016
|
That is very cool, @halwebguy. Thanks! Will try it out over the weekend. |
sdcharle
commented
Mar 29, 2016
|
Thanks for the tip. I'm going to 'hack night' at my local library tonight, I'll report back...at the latest should have something by this weekend. S On Tue, Mar 29, 2016 at 7:57 AM, halwebguy notifications@github.com wrote:
|
redfive2012
commented
Mar 30, 2016
|
Here's a Python-based Alexa project that uses a button to trigger the listener. https://github.com/novaspirit/AlexaPi, forked from https://github.com/sammachin/AlexaPi. I've used Sam Machin's version, and it seems to work pretty well. |
sdcharle
commented
Mar 30, 2016
|
Woah, that's pretty sweet! And here I was digging through all that (but On Wed, Mar 30, 2016 at 3:06 PM, Nelson Butterworth <
|
aTanguay
commented
Mar 30, 2016
|
Oh yeah, check that out. Time to try a fresh mSD card. |
ajot
added
push to talk
Feature Request
and removed
Feature Request
labels
Apr 1, 2016
Eddie-Hartman
commented
Apr 7, 2016
|
@halwebguy I had a similar idea and tried to do it. I get a runtime error though. I'd appreciate it if you could help. #109 |
Eddie-Hartman
commented
Apr 7, 2016
|
Hey there. I just wanted to say that I currently have this working with a physical button. I did use pi4j and will update this with steps on how to get it working. There were a lot of people who helped me and a lot of learning involved. Great project. :) My steps are updated and everything should be working. Let me know if you have any issues. @shankararunachalam |
shankararunachalam
commented
Apr 7, 2016
|
That is awesome, @Eddie-Hartman. Please let us know here or in the fork once you have had a chance to write it up. |
|
@Eddie-Hartman That's awesome. Mind sending a PR, so we can review and update the ReadMe here? |
Eddie-Hartman
commented
Apr 8, 2016
dougharris
commented
Apr 8, 2016
|
@Eddie-Hartman a PR is a pull request. Github provides a help page about how to create one. |
Eddie-Hartman
commented
Apr 8, 2016
|
I believe I did it properly here @dougharris @ajotwani let me know if I messed up. :) |
dougharris
commented
Apr 8, 2016
|
@Eddie-Hartman You've nailed the process for the PR. I'll leave the review of the code and the merge to @ajotwani |
hankp46
commented
Jun 22, 2016
|
I have the AVS service working. However, when I add the pushbutton code I can ask questions but cannot get flash update or radio stations. I understand flash and radio is handled via VLC but cannot find anything wrong. Also AVS thinks it is playing the flash since it start with "here's your flash update" and if you let it run will finally come back with "flash update ended". Any clues? |
hankp46
referenced this issue
Jun 23, 2016
Closed
mvn exec:exec vs. sudo env "PATH=$PATH" mvn exec:exec #218
hankp46
commented
Jun 29, 2016
|
Just wanted everyone to know that the new Pi4J package now let's you utilize GPIO without running sudo. I made changes and all is now working. This web site;
final GpioController gpio = GpioFactory.getInstance(); |
Eddie-Hartman
commented
Jun 29, 2016
|
I will try to use the new Pi4J package and as long and everything goes well, I'll make the changes to my fork. Thanks. I have thought multiple times about the issues you were having as well, but just didn't have any good answers. Sorry. It's works fine on pi 3s and a b+ that I've tested. I don't really know why you wouldn't get flash updates or radio if you get it before. Maybe compare your dependencies with mine? Good luck and thanks again for the update. |
Eddie-Hartman
commented
Jul 17, 2016
|
@hankp46 I'm trying to update everything now. I was unable to find the method GpioUtil.enableNonPrivilegedAccess(); in snapshot 1.0.1 or 1.1. Also, I'm unable to build now because it says that Maven can't find the Pi4J package even though I changed pom.xml file properly. Any ideas on what's going on? |
hankp46
commented
Jul 17, 2016
|
I'm out of the country until 28 July so won't be able to research now. Hank Poletto
|
Eddie-Hartman
commented
Jul 17, 2016
|
I fixed it. They were silly spelling mistakes. I just had to go over everything again twice lol. Now I'm having this problem though. Thanks for the update though since everything compiles and SEEMS to work I'll update my fork when I can get everything working again. |
Rogers-Ranch
commented
Aug 5, 2016
|
I guess I missed something: [ERROR] Failed to execute goal on project sample-java-client: Could not resolve dependencies for project com.amazon.alexa.avs:sample-java-client:jar:20160207.0: Could not find artifact com.pi4j:pi4j-core:jar:1.1-SNAPSHOT -> [Help 1] I installed pi4j, it's and the jar is in /opt/pi4j/lib man install -e shows this error: Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.amazon.alexa.avs:sample-java-client:jar:20160207.0: Could not find artifact com.pi4j:pi4j-core:jar:1.1-SNAPSHOT in oss-snapshots-repo (https://oss.sonatype.org/content/groups/public) Any ideas? |
Eddie-Hartman
commented
Aug 6, 2016
|
Yeah it's not a snapshot anymore. The version in the maven dependency may no longer exist. Pi4j no longer needs an install if it's listed in the dependencies. I will fix this tomorrow. :) |
Eddie-Hartman
commented
Aug 6, 2016
|
Actually, I just fixed it. Let me know if you have any more trouble. |
hankp46
commented
Aug 6, 2016
|
Eddie |
Eddie-Hartman
commented
Aug 7, 2016
•
|
@hankp46 I just made the changes and I'm getting no responses either. I'll take a look at it soon. We have a good idea of what would have caused this (the new update) but I don't know why. Edit: I guess that you're already aware, but the issue seems to be with all amazon alexa services and not necessarily the code changes I made. Hopefully the servers will be back on soon. |
ajot
added
the
dev-request
label
Aug 31, 2016
darianbjohnson
commented
Oct 10, 2016
|
I made a few changes to the POM.xml ad the AVSApp.java files to handle both a physical button and RGB light. This code is build on top of the latest version of the alexa pi code (that supports wake words) Code here: https://github.com/darianbjohnson/Mystic_Mirror_Project/tree/master/AVS Note: a diagram of how I wired the pins is here: https://camo.githubusercontent.com/6cc0b98e9f15cc02863eee0fc130264de51ebbde/68747470733a2f2f6861636b737465722e696d6769782e6e65742f75706c6f6164732f6174746163686d656e74732f3138313736392f776972696e672e706e67 |
keleric
removed
enhancement
labels
Dec 5, 2016
dskidmor
added
Feature Request
and removed
dev-request
labels
Dec 8, 2016
keleric
closed this
Jan 26, 2017
Zacki84
commented
May 27, 2017
|
@darianbjohnson |
chrismo16 commentedMar 26, 2016
I would like to use a physical button to hold while issuing voice commands. I'm new to the build scene so if anyone has any ideas or can point me to another project that could help please let me know.