Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS #1

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: CFenner
custom: ["https://paypal.me/ChristopherFenner"]
34 changes: 34 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.14.1
ignore: {}
# patches apply the minimum changes required to fix a vulnerability
patch:
SNYK-JS-LODASH-567746:
- eslint > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt-contrib-csslint > lodash:
patched: '2020-05-04T01:41:21.443Z'
- eslint > inquirer > lodash:
patched: '2020-05-04T01:41:21.443Z'
- eslint > table > lodash:
patched: '2020-05-04T01:41:21.443Z'
- gruntify-eslint > eslint > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt > grunt-legacy-log > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt > grunt-legacy-util > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt-contrib-eslint > eslint > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt-yamllint > async > lodash:
patched: '2020-05-04T01:41:21.443Z'
- gruntify-eslint > eslint > inquirer > lodash:
patched: '2020-05-04T01:41:21.443Z'
- gruntify-eslint > eslint > table > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt > grunt-legacy-log > grunt-legacy-log-utils > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt-contrib-eslint > eslint > inquirer > lodash:
patched: '2020-05-04T01:41:21.443Z'
- grunt-contrib-eslint > eslint > table > lodash:
patched: '2020-05-04T01:41:21.443Z'
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![Build Status](https://travis-ci.org/CFenner/MagicMirror-Netatmo-Module.svg?branch=master)](https://travis-ci.org/CFenner/MagicMirror-Netatmo-Module)
[![Build Status](https://travis-ci.org/CFenner/MMM-Netatmo.svg?branch=master)](https://travis-ci.org/CFenner/MMM-Netatmo)
[![Known Vulnerabilities](https://snyk.io/test/github/cfenner/magicmirror-netatmo-module/badge.svg)](https://snyk.io/test/github/cfenner/magicmirror-netatmo-module)
[![code climate](https://codeclimate.com/github/CFenner/MagicMirror-Netatmo-Module/badges/gpa.svg)](https://codeclimate.com/github/CFenner/MagicMirror-Netatmo-Module)
[![code climate](https://codeclimate.com/github/CFenner/MMM-Netatmo/badges/gpa.svg)](https://codeclimate.com/github/CFenner/MMM-Netatmo)
[![api](https://img.shields.io/badge/api-Netatmo-orange.svg)](https://dev.netatmo.com/doc)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://choosealicense.com/licenses/mit/)

# MagicMirror-Netatmo-Module

Expand All @@ -29,12 +29,31 @@ To be able to access your data, you need to have an Netatmo Application and gran

#### Register an App

Your can register a new app [here](https://dev.netatmo.com/dev/createapp). Afterwards you will get an APP_ID and an APP_SECRET which you will need to enter in the [config entries](#configuration).
Your can register a new app [here](https://dev.netatmo.com/apps/createanapp). Afterwards you will get an APP_ID and an APP_SECRET which you will need to enter in the [config entries](#configuration).

#### Grant Access to Your Data

To allow the app to access your data, you need to send a POST request to the auth server and register the app.
You can send a POST request with [Hurl.it](https://www.hurl.it)([Git](https://github.com/defunkt/hurl)) to the Netatmo auth url: https://api.netatmo.com/oauth2/token

##### cURL

One option is to use the command line tool [cURL](https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwjqgN789KnaAhUBalAKHR-NDLoQFgg2MAE&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCURL&usg=AOvVaw27-lfQBHvLQPR2qsddIR6U).

```
curl -X POST -d "grant_type=password" -d "client_id=YOUR_CLIENT_ID" -d "client_secret=YOUR_CLIENT_SECRET" -d "username=YOUR_NETATMO_USERNAME" -d "password=YOUR_NETATMO_PASSWORD" -d "scope=read_station" "https://api.netatmo.com/oauth2/token"
```

The POST request will return the following data:

```
{"access_token":"abc","refresh_token":"xyz","scope":["read_station"],"expires_in":10800,"expire_in":10800}
```

The REFRESH_TOKEN will be needed in the [config entries](#configuration).

##### Hurl.it

You can also send a POST request with [Hurl.it](https://www.hurl.it)([Git](https://github.com/defunkt/hurl)) to the Netatmo auth url: https://api.netatmo.com/oauth2/token

Also you need to provide the following data (add as parameters):

Expand Down
24 changes: 24 additions & 0 deletions l10n/cs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"CO2": "CO<sub>2</sub>",
"NOISE": "Hluk",
"HUMIDITY": "Vlhkost",
"PRESSURE": "Tlak",
"PRESSURE_TREND": "Tlak (trend)",
"TEMPERATURE": "Teplota",
"TEMP_TREND": "Teplota (trend)",
"RAIN": "Srážky",
"SUM_RAIN_1": "Srážky (1h)",
"SUM_RAIN_24": "Srážky (24h)",
"WINDSTRENGTH": "Vítr",
"WINDANGLE": "Vítr (směr)",
"GUSTSTRENGTH": "Poryvy",
"GUSTANGLE": "Poryvy (směr)",
"UP": "stoupá",
"STABLE": "stály",
"DOWN": "klesá",
"UNDEFINED": "nedostupné",
"WIFI": "WiFi",
"RADIO": "Radio signal",
"BATTERY": "Baterie",
"LAST_MESSAGE": "poslední kontakt"
}
26 changes: 26 additions & 0 deletions l10n/nb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"CO2": "CO<sub>2</sub>",
"NOISE": "Støy",
"HUMIDITY": "Luftfuktighet",
"PRESSURE": "Lufttrykk",
"PRESSURE_TREND": "Lufttrykk (trend)",
"TEMPERATURE": "Temperatur",
"TEMP_TREND": "Temperatur (trend)",
"RAIN": "Regn",
"SUM_RAIN_1": "Regn (1h)",
"SUM_RAIN_24": "Regn (24h)",
"WINDSTRENGTH": "Vind",
"WINDANGLE": "Vind (retning)",
"GUSTSTRENGTH": "Vindkast",
"GUSTANGLE": "Vindkast (retning)",

"UP": "Økende",
"STABLE": "Stabilt",
"DOWN": "Fallende",
"UNDEFINED": "Ikke tilgjengelig",

"WIFI": "WiFi",
"RADIO": "Radio signal",
"BATTERY": "Batteri",
"LAST_MESSAGE": "Sist kontakt"
}
26 changes: 26 additions & 0 deletions l10n/nn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"CO2": "CO<sub>2</sub>",
"NOISE": "Støy",
"HUMIDITY": "Luftfuktigheit",
"PRESSURE": "Lufttrykk",
"PRESSURE_TREND": "Lufttrykk (trend)",
"TEMPERATURE": "Temperatur",
"TEMP_TREND": "Temperatur (trend)",
"RAIN": "Regn",
"SUM_RAIN_1": "Regn (1h)",
"SUM_RAIN_24": "Regn (24h)",
"WINDSTRENGTH": "Vind",
"WINDANGLE": "Vind (retning)",
"GUSTSTRENGTH": "Vindkast",
"GUSTANGLE": "Vindkast (retning)",

"UP": "Aukande",
"STABLE": "Stabilt",
"DOWN": "Fallande",
"UNDEFINED": "Ikkje tilgjengeleg",

"WIFI": "WiFi",
"RADIO": "Radio signal",
"BATTERY": "Batteri",
"LAST_MESSAGE": "Sist kontakt"
}
5 changes: 4 additions & 1 deletion netatmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,10 @@ Module.register('netatmo', {
return {
en: 'l10n/en.json',
de: 'l10n/de.json',
fr: 'l10n/fr.json'
fr: 'l10n/fr.json',
cs: 'l10n/cs.json',
nb: 'l10n/nb.json',
nn: 'l10n/nn.json'
};
},
getDom: function() {
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "",
"main": "netatmo.js",
"scripts": {
"test": "grunt test"
"test": "grunt test",
"snyk-protect": "snyk protect",
"prepublish": "npm run snyk-protect"
},
"repository": {
"type": "git",
Expand All @@ -17,15 +19,15 @@
},
"homepage": "https://github.com/CFenner/MagicMirror-Netatmo-Module#readme",
"devDependencies": {
"eslint": "^2.7.0",
"eslint": "^7.0.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-csslint": "^2.0.0",
"grunt-contrib-eslint": "0.0.5",
"grunt-contrib-uglify": "^2.3.0",
"grunt-contrib-uglify": "^3.4.0",
"grunt-jsonlint": "^1.1.0",
"grunt-yamllint": "^0.3.0",
"gruntify-eslint": "^3.1.0"
"gruntify-eslint": "^5.0.0"
},
"eslintConfig": {
"extends": "eslint:recommended",
Expand All @@ -45,5 +47,9 @@
"globalReturn": true
}
}
},
"snyk": true,
"dependencies": {
"snyk": "^1.317.0"
}
}