MycroftAI / Mycroft-Android

Android companion app, sends commands from your Android device to your Mycroft system and returns the output as speech or other medium to the Android device.
GNU General Public License v3.0
351 stars 130 forks source link

'Connection to Mycroft has closed! Please re-connect and check connection settings!' #62

Closed JJWeldon closed 5 years ago

JJWeldon commented 6 years ago

After installing the Mycroft android application onto my device, I checked the settings and pressed the speech button, uttering the 'pair my device' command, to receive the connection error (in title). I've tried various other commands, but nothing's worked. Do I, perhaps, need to tweak the code a bit?

mycroft-error

OS: Android 5.1.1

KalebNiven commented 6 years ago

+1

The problem seems to be that the IP needs to be changed from “localhost” to your actual ip in configuration of the app in android studio as well as a matching IP in the settings on your android device. I can't find the configuration file though in the code. The following post says it's in "/configuration/mycroft.ini" but I can't find this file.

https://community.mycroft.ai/t/android-app-backend-connection/865/2

bgarr33434 commented 6 years ago

I struggled with this for a good week. At the end of the day, it was the firewall on the mycroft-core machine. I went through multiple services like VirtualBox and Google cloud with no success. Put it on a plain linux box in the corner and it worked fine. Don't spend too much time in the conf file. It's probably not there.

kalexmills commented 5 years ago

This happens quite regularly, and might change when your home router goes down or there is otherwise some networking interruption with your ISP that changes the IP address your router is assigned.

Best long-term solution (based on my limited networking knowledge) is to setup local DNS or something like dyndns.org (which could also allow you to connect back to your home-base from your phone no matter where you are).

Haven't tried this yet, but I feel I should add a disclaimer: don't mess with your local firewall unless you know what you're opening yourself up to.

JJWeldon commented 5 years ago

Thank you all for commenting. Even after all the reading up I'd done, I had no idea that I was actually supposed to connect it to my mycroft-core installation. I'm going to try and set everything up one more time, and I'll let you know how it goes.

trekjunky commented 5 years ago

Make sure your Linux Firewall has ports 5555 UDP and 8181 TCP open