Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
v1.2 (#18)
Browse files Browse the repository at this point in the history
* Rewrite for version 1.2
  • Loading branch information
aphex3k committed May 22, 2020
1 parent 0555480 commit 1f11cde
Show file tree
Hide file tree
Showing 58 changed files with 3,030 additions and 5,016 deletions.
62 changes: 32 additions & 30 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
{
"env": {
"browser": false,
"node": true,
"es6": false
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"no-console":"off",
"no-unused-vars":"error"
}
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"ignorePatterns": ["dist", "src/streamingDelegate.ts"],
"rules": {
"quotes": ["warn", "double"],
"indent": ["warn", 2, { "SwitchCase": 1 }],
"linebreak-style": ["warn", "unix"],
"semi": ["warn", "always"],
"comma-dangle": ["off", "always-multiline"],
"dot-notation": "warn",
"eqeqeq": "warn",
"curly": ["warn", "all"],
"brace-style": ["warn"],
"prefer-arrow-callback": ["warn"],
"max-len": ["warn", 140],
"no-console": ["warn"], // use the provided Homebridge log method instead
"lines-between-class-members": [
"warn",
"always",
{ "exceptAfterSingleLine": true }
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ typings/

# End of https://www.gitignore.io/api/node
persist

dist
4 changes: 0 additions & 4 deletions .jshintrc

This file was deleted.

9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local-only/
*.jpg
*.jpeg
package-lock.json
.git/

Expand Down Expand Up @@ -34,3 +35,11 @@ tslint.json
npm-debug.log
snapshot-error.txt
persist/

src/
testing-config/
*.code-workspace
.eslintrc
.jshintrc
.travis.yml
.eslintignore
42 changes: 23 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
language: node_js

node_js:
- 6.14.4
- 8.11.1
- 8.12.0
- 10.13.0
- 11.1.0
before_install:
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update && sudo apt-get install yarn
- yarn global add jshint tslint typescript homebridge eslint
- homebridge --version
- node
- 10
- 11

env:
- workerCount=3

matrix:
fast_finish: true

install:
- npm install

cache:
directories:
- node_modules

git:
depth: 1

script:
- tslint -c ./tslint.json --project .
- tsc
- eslint -c .eslintrc.json *.js
- jshint -c .jshintrc *.js
- npm --verbose test
- node --version | grep -v v6.*.* && npm --dry-run publish || echo Skipping publish dry-run for node 6.x
- DEBUG=* timeout -k 20s -s SIGINT 15s homebridge -Q -P ./ -U ./testing-config ; test $? == 124
- timeout -k 20s -s SIGINT 15s node standalone.js ; test $? == 124
- npm run lint
# - npm run build
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ If you have a newer version, you can help me out with the support.

## Installation

1. Install `ffmpeg` on your computer with *libx264* or (*h264_omx* for Raspberry Pi)
1. Install `ffmpeg` on your computer with _libx264_ or (_h264_omx_ for Raspberry Pi)
1. Make sure your homebridge setup is current.
1. Follow the official [homebridge installation instructions](https://github.com/nfarina/homebridge#installation) if you haven't done so yet
1. Install this plugin using: `npm install -g homebridge-bloomsky`
1. Edit `config.json` and add the platform.
1. Run/Restart Homebridge
1. _Optionally_ `npm install -g sharp` on modern platforms for improved performance when generating snapshot images

### Configuration Example

Expand All @@ -36,32 +35,30 @@ Add this configuration information to your homebridge `config.json` in the
{
"platform": "Bloomsky",
"apiKey": "your-api-key-here==",
"apiUrl": "https://api.bloomsky.com/api/skydata/",
"vcodec": "libx264",
"debug": false
"apiUrl": "https://api.bloomsky.com/api/skydata/"
}
```

Property Name | Value | Required
------------- | ----- | --------
`platform` | Must be `Bloomsky` | yes
`apiKey` | Your personal [Bloomsky API](#bloomsky-api) authorization key | yes
`apiUrl` | Use default value for official public Bloomsky API: `https://api.bloomsky.com/api/skydata/` | no
`vcodec` | `libx264` by default, use `h264_omx` for Raspberry Pi | no
`debug` | If set to `true`, will log more information during runtime and try to update camera preview more often, defaults to `false` | no
| Property Name | Value | Required |
| ------------- | ------------------------------------------------------------------------------------------- | -------- |
| `platform` | Must be `Bloomsky` | yes |
| `apiKey` | Your personal [Bloomsky API](#bloomsky-api) authorization key | yes |
| `apiUrl` | Use default value for official public Bloomsky API: `https://api.bloomsky.com/api/skydata/` | no |

## Bloomsky API

The BloomSky API provides the most recent
data from your own devices!
Follow these steps to obtain your own personal Bloomsky API key:

1. Sign in to your Bloomsky account at: https://dashboard.bloomsky.com
1. In the left hand menu, select [Developers](https://dashboard.bloomsky.com/user#api)
1. The pop-up will show your personal API key

## Donations

Donations are very welcome and accepted at the following addresses:

- BTC: `3QTxu56V2gNdq1VznL7ftw3B4megXq5bix`
- LTC: `MFDLN62hMNYDLMAWx4W6Z45nhDDLDjDUV7`

Expand All @@ -70,13 +67,13 @@ Donations are very welcome and accepted at the following addresses:
> Copyright 2018 Michael Henke
>
> Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
> you may not use this file except in compliance with the License.
> You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.
16 changes: 16 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"pluginAlias": "Homebridge-Bloomsky",
"pluginType": "platform",
"singular": true,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true,
"default": "Homebridge Bloomsky Platform"
}
}
}
}
20 changes: 0 additions & 20 deletions index.js

This file was deleted.

5 changes: 0 additions & 5 deletions lib/AddressResponse.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions lib/AddressResponse.js

This file was deleted.

34 changes: 0 additions & 34 deletions lib/Bloomsky.d.ts

This file was deleted.

Loading

0 comments on commit 1f11cde

Please sign in to comment.