Giter VIP home page Giter VIP logo

alexa-homekit's Introduction

ALHAU

Code installation

In lambda : do yarn install on your side then zip the project and uzip it in the lambda. Index.js is ready to use In a specific server : yarn install then node index.js

Don't forget to configure .env file

Project overview

This project can handle Alexa request and map response from domoticz instance. It need to connect to a BDD which contains user informations (such as domoticz domain, port and credentials) and current valide Token for Alexa oauth. For security reasons user credential are decrypted using a secret key you have to define in .env file

Common errors

Fix decrypt pb

if get error "unsupported-state-or-unable-to-authenticate-data", it's because decrypt is not correctly initialize. You should use crypto.createDecipher('aes192', CRYPTOPASS); in the function called to force recreate decrypt before each decrypt. (don't know why only decrypt is affected and not encrypt)

Tests

run node test/test.js (dans uncomment on of the handle request) for manual tests npm test (for automated tests)

Package

yarn package (will pack and zip the project to be deployable on amazon Lambda)

Curl request to set % and get state

set %

curl "http://:@:/json.htm?type=command&param=switchlight&idx=2&switchcmd=Set%20Level&level=80"

get state

curl "http://:@:/json.htm?type=devices&rid=2"

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.