Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new script with Environment Variables and 2FA login #4

Open
nayneyT opened this issue Nov 15, 2019 · 0 comments
Open

Comments

@nayneyT
Copy link

nayneyT commented Nov 15, 2019

Hi,

Your docker image is great (especially the mqtt python script). However, it's written for the US Amazon site. Additionally on the https://github.com/walthowd/ha-alexa-tts site there is a reference to a new script https://loetzimmer.de/patches/alexa_remote_control.sh.

This new script amongst other things adds 1. 2FA support and 2. Variable parsing. This allows me to change the Alexa domain, Alexa voice and other settings by just passing new variable to to docker run or docker compose file.

This new script is good because it allows me to set environment variables from my docker compose file:

    environment:
      - PYTHONUNBUFFERED=0 # Required for container logging to work properly.
      - MQTT_BROKER=<mqtt ip of hostname> # IP or hostname for your MQTT broker
      - MQTT_USER=<mqtt username># User name used to authenticate to your MQTT broker.
      - MQTT_PASS=<mqtt password># Password used to authenticate to your MQTT broker.
#      - MQTT_TOPIC=<MQTT_TOPIC> # Override the root MQTT topic to listen on. Default: alexa
      - EMAIL=<amazon email>
      - PASSWORD=<amazon password>
#      - MFA_SECRET=
      - AMAZON=amazon.co.uk # Amazon domain Alternatives: amazon.de, amazon.es, amazon.com
      - ALEXA=layla.amazon.co.uk # Alexa Voice alternatives: layla.amazon.de, alexa.amazon.es, pitangui.amazon.com
      - LANGUAGE=en-GB # Amazon Language: de-DE, es-ES, en-US
#      - BROWSER='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:1.0) bash-script/1.0' # browser identity 
#      - CURL='/usr/bin/curl' # cURL binary
#      - OPTS='--compressed --http1.1' # cURL options
                                      # -k : if your cURL cannot verify CA certificates, you'll have to trust any
                                      # --compressed : if your cURL was compiled with libz you may use compression
                                      # --http1.1 : cURL defaults to HTTP/2 on HTTPS connections if available
      - TTS_LOCALE=en-GB
#      - TMP="/tmp" # tmp path
#      - OATHTOOL='/usr/bin/oathtool' # oathtool command line tool
      - SPEAKVOL=75 # Volume for speak commands
      - NORMALVOL=20 # if no current playing volume can be determined, fall back to normal volume

I have cloned your GitHub Repo and made my changes but It would be great if you can update your GitHub to accommodate the new script and allow other to benefit from your great work and that of alex(at)loetzimmer.de and walthowd.

p.s. these environment variable negate the need for the secrets.yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant