Giter VIP home page Giter VIP logo

Comments (5)

puppetcoder avatar puppetcoder commented on August 28, 2024 2

I didn't want to expose a home assistant endpoint so I used an SSH tunnel instead. If anyone else is interested, I can parameterize this a bit and kick off a PR.

def event_handler(event, context):
    config = Configuration('config.json')
    if config.debug:
        logger.setLevel(logging.DEBUG)
    ssh_key_pass = boto3.client('kms').decrypt(CiphertextBlob=b64decode(os.environ['ssh_key_pass']))['Plaintext']
    with SSHTunnelForwarder(
        ("myhomeassistantserver.com", 8124),
        ssh_username="homeassistant",
        ssh_pkey="./hass.key",
        ssh_private_key_password=ssh_key_pass,
        remote_bind_address=("0.0.0.0", 8123),
        local_bind_address=('0.0.0.0', 8123)
    ) as tunnel:
        ha = HomeAssistant(config)
        return ha.post('alexa/smart_home', event, wait=True).json() 

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@fotiDim Hi there, thanks for checking out Haaska.

It doesn’t require an SSL certificate, but it does require your Home Assistant install is reachable from the internet. For that reason, it’s best that you take every step possible to secure your Home Assistant install.

With HA Cloud, it opens its own secure connection outbound to the Alexa Voice Service.

Haaska goes the other direction, where when a command is sent from Alexa, it must go out and contact your local HA install.

Does that make sense?
Let me know if you have any questions or concerns.

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@puppetcoder Wow! Anything is on the table, so if you want to make a PR, I’ll definitely review/merge.

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

Thanks to @puppetcoder, better security is now an option. Will update the docs soon.

@fotiDim Are we good to close this out?

from haaska.

fotiDim avatar fotiDim commented on August 28, 2024

@anthonylavado sure closing it and happy to test it out!

from haaska.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.