Giter Club home page Giter Club logo

gladys-gateway's Introduction

Gladys Gateway

Context

The Gladys Gateway is an end-to-end encrypted gateway between your local Gladys installation (your Raspberry Pi at home for example), and your browser on the internet.

When you are away from home, it becomes easier with the Gladys Gateway to control your home without having to open any ports on your internet box.

How to use the Gladys Gateway?

To subscribe to Gladys Plus:

This service is paid as I need to pay for the servers and infrastructure.

Thanks to everyone who supports this project ๐Ÿ™

Why this repository is open-source?

This repository is open-source so the community can audit the code.

There is no need to run this repo yourself, as if you want to access Gladys remotely without using Gladys Plus, you can just setup a VPN to your home network.

gladys-gateway's People

Contributors

dependabot[bot] avatar pierre-gilles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gladys-gateway's Issues

Modules dashboard in the gateway

would it be possible to display modules of the dashboard gladys in the gateway? camera, connected users, my wish is to manage everything remotely with the gateway

Fix reconnection issue on flaky connection

5-11 14:04:27.864: You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: socket hang up
   at TLSSocket.onHangUp (_tls_wrap.js:1135:19)
   at Object.onceWrapper (events.js:313:30)
   at emitNone (events.js:111:20)
   at TLSSocket.emit (events.js:208:7)
   at endReadableNT (_stream_readable.js:1055:12)
   at _combinedTickCallback (internal/process/next_tick.js:138:11)
   at process._tickDomainCallback (internal/process/next_tick.js:218:9)
25-11 14:04:31.211: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 82): Error: socket hang up
25-11 14:04:31.213: (node:28521) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
25-11 14:04:31.505: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 85): Error: socket hang up
25-11 14:04:32.165: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 88): Error: socket hang up
25-11 14:04:33.995: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 91): Error: socket hang up
25-11 14:04:46.266: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 94): Error: socket hang up
25-11 14:04:46.519: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 97): Error: socket hang up
25-11 14:04:48.588: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 100): Error: socket hang up
25-11 14:04:50.096: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 103): Error: socket hang up
25-11 14:05:02.739: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 106): Error: connect ETIMEDOUT 142.93.160.146:443
25-11 14:05:07.857: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 109): Error: connect ETIMEDOUT 142.93.160.146:443
25-11 14:05:18.559: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 112): Error: socket hang up
25-11 14:05:34.113: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 115): Error: socket hang up
25-11 14:05:38.577: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 118): Error: connect ETIMEDOUT 142.93.160.146:443
25-11 14:05:43.697: (node:28521) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 121): Error: connect ETIMEDOUT 142.93.160.146:443
25-11 21:07:21.046: Unable to parse HTTP body- error occurred :: 'Error: request aborted\n    at IncomingMessage.onAborted (/home/pi/gladys/node_modules/body-parser/node_modules/raw-body/index.js:269:10)\n    at emitNone (events.js:106:13)\n    at IncomingMessage.emit (events.js:208:7)\n    at abortIncoming (_http_server.js:412:9)\n    at socketOnClose (_http_server.js:406:3)\n    at emitOne (events.js:121:20)\n    at Socket.emit (events.js:211:7)\n    at TCP._handle.close [as _onclose] (net.js:554:12)'

Migrate google smart home library to new library

const auth = new GoogleAuth({
  // Please note this is an entirely different scope than yours
  scopes: 'https://www.googleapis.com/auth/spreadsheets.readonly',
  credentials: {
    // `client_email` property from the service account Key file downloaded as JSON
    client_email: GOOGLE_CLIENT_ID,
    // `private_key` property from the service account Key file downloaded as JSON
    private_key: GOOGLE_CLIENT_SECRET,
  },
  // skipped, no need as service account is bound to project (it's encoded in the email)
  // projectId: PROJECT_ID,
});

from: googleapis/google-auth-library-nodejs#1456 (comment)

const homegraphClient = homegraph({
  version: 'v1',
  auth: new GoogleAuth({
    scopes: 'https://www.googleapis.com/auth/homegraph'
  })
});

const res = await homegraphClient.devices.reportStateAndNotification({
  requestBody: {
    agentUserId: 'PLACEHOLDER-USER-ID',
    requestId: 'PLACEHOLDER-REQUEST-ID',
    payload: {
      devices: {
        states: {
          "PLACEHOLDER-DEVICE-ID": {
            on: true
          }
        }
      }
    }
  }
});

From: https://developers.google.com/assistant/smarthome/develop/report-state#node.js

Add a toggle route to OpenAPI

As discussed in PM

It could be nice to have a route to toggle switch.

Use case is tasker quick settings or widget on Android

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.