Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
v1.3.0 - updating ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenterheerdt committed Jul 15, 2020
1 parent e740077 commit 4395308
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ring_hassio/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Ring Livestream",
"version": "1.2",
"version": "1.3",
"slug": "ringlivestream",
"description": "A Home Assistant add-on to enable live streams of Ring Cameras.",
"url": "https://github.com/jeroenterheerdt/ring-hassio",
Expand Down
9 changes: 3 additions & 6 deletions ring_hassio/livestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ function startStream() {
switch (_a.label) {
case 0:
ringApi = new ring_client_api_1.RingApi({
email: process.env.RING_EMAIL,
password: process.env.RING_PASS,
// Refresh token is used when 2fa is on
refreshToken: process.env.RING_REFRESH_TOKEN,
debug: true
Expand Down Expand Up @@ -159,7 +157,7 @@ function startStream() {
delete sockets[socketId];
});
// Extend socket lifetime for demo purposes
//socket.setTimeout(4000);
socket.setTimeout(4000);
});
console.log('Started server, listening on port ' + PORT + '.');
return [4 /*yield*/, util_1.promisify(fs.exists)(publicOutputDirectory)];
Expand Down Expand Up @@ -199,9 +197,8 @@ function startStream() {
sockets[socketId].destroy();
}
//app.stop()
fs.unlinkSync(path);
//console.log('Restarting server');
//startStream();
console.log('Restarting server');
startStream();
});
setTimeout(function () {
console.log('Stopping call...');
Expand Down
3 changes: 0 additions & 3 deletions ring_hassio/livestream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import 'dotenv/config'
import { RingApi } from 'ring-client-api'
import { promisify } from 'util'
import { runInNewContext } from 'vm';
const fs = require('fs'),
path = require('path'),
http = require('http'),
Expand All @@ -19,8 +18,6 @@ const PORT = process.env.RING_PORT;

async function startStream() {
const ringApi = new RingApi({
email: process.env.RING_EMAIL,
password: process.env.RING_PASS,
// Refresh token is used when 2fa is on
refreshToken: process.env.RING_REFRESH_TOKEN!,
debug: true
Expand Down
2 changes: 1 addition & 1 deletion ring_hassio/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ring_hassio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ring_livestream",
"version": "1.2.0",
"version": "1.3.0",
"description": "Ring Livestream addon",
"author": "Jeroen ter Heerdt",
"main": "livestream.js",
Expand Down

0 comments on commit 4395308

Please sign in to comment.