Skip to content

Commit

Permalink
Merge pull request #19 from bolliy/dev
Browse files Browse the repository at this point in the history
Issue #18
  • Loading branch information
TA2k authored Jun 23, 2024
2 parents 51046c0 + 9d75efb commit c05805c
Show file tree
Hide file tree
Showing 26 changed files with 3,698 additions and 3,566 deletions.
17 changes: 17 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configure here which dependency updates should be merged automatically.
# The recommended configuration is the following:
- match:
# Only merge patches for production dependencies
dependency_type: production
update_type: "semver:patch"
- match:
# Except for security fixes, here we allow minor patches
dependency_type: production
update_type: "security:minor"
- match:
# and development dependencies can have a minor update, too
dependency_type: development
update_type: "semver:minor"

# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
# https://dependabot.com/docs/config-file/#automerged_updates
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 5
assignees:
- TA2k
versioning-strategy: increase

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
time: "04:00"
timezone: Europe/Berlin
open-pull-requests-limit: 5
assignees:
- TA2k
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Automatically merge Dependabot PRs when version comparison is within the range
# that is configured in .github/auto-merge.yml

name: Auto-Merge Dependabot PRs

on:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
# In order to use this, you need to go to https://github.com/settings/tokens and
# create a Personal Access Token with the permission "public_repo".
# Enter this token in your repository settings under "Secrets" and name it AUTO_MERGE_TOKEN
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
# By default, squash and merge, so Github chooses nice commit messages
command: squash and merge
65 changes: 38 additions & 27 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ name: Test and Release
on:
push:
branches:
- 'master'
- "master"
tags:
# normal versions
- 'v[0-9]+.[0-9]+.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- 'v[0-9]+.[0-9]+.[0-9]+-**'
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

# Cancel previous PR/branch runs when a new commit is pushed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
Expand All @@ -35,7 +40,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 20.x, 18.x]
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand All @@ -45,38 +50,44 @@ jobs:
os: ${{ matrix.os }}
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
# TODO: To enable automatic npm releases, create a token on npmjs.org
# build: true

# TODO: To enable automatic npm releases, create a token on npmjs.org
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
# Then uncomment the following block:

# # Deploys the final package to NPM
# deploy:
# needs: [check-and-lint, adapter-tests]
#
# # Trigger this step only when a commit on any branch is tagged with a version number
# if: |
# contains(github.event.head_commit.message, '[skip ci]') == false &&
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/v')
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: ioBroker/testing-action-deploy@v1
# with:
# node-version: '14.x'
# # Uncomment the following line if your adapter cannot be installed using 'npm ci'
# # install-command: 'npm install'
# npm-token: ${{ secrets.NPM_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
# Deploys the final package to NPM
deploy:
needs: [check-and-lint, adapter-tests]

# Trigger this step only when a commit on any branch is tagged with a version number
if: |
contains(github.event.head_commit.message, '[skip ci]') == false &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

# Write permissions are required to create Github releases
permissions:
contents: write

steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: '20.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
#
# # When using Sentry for error reporting, Sentry can be informed about new releases
# # To enable create a API-Token in Sentry (User settings, API keys)
# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# # Then uncomment and customize the following block:
# sentry: true
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
# sentry-project: "iobroker-homeconnect"
# sentry-version-prefix: "iobroker.homeconnect"
# sentry-project: "iobroker-nissan"
# sentry-version-prefix: "iobroker.nissan"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-2030 TA2k <[email protected]>
Copyright (c) 2021-2024 TA2k <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,33 @@

**Tests:** ![Test and Release](https://github.com/TA2k/ioBroker.nissan/workflows/Test%20and%20Release/badge.svg)

## nissan adapter for ioBroker
**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.**\
For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)!\
Sentry reporting is used starting with js-controller 3.0.

Nissan Adapter
## Nissan adapter for ioBroker

With the Nissan adapter you can ask your nissan vehicle for the latest data, display the current battery and charging status, the current state of the climate control, start or stop climate control and and start charging remotely.

[Nissan Connect/App information](https://www.nissan.de/kunden/nissan-connect-apps.html)

## Forum

Feel free to follow the discussions in the german [iobroker forum](https://forum.iobroker.net/topic/46700/test-adapter-nissan-v-0-0-x)

## Changelog

<!--
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->

### **WORK IN PROGRESS**
- (bolliy) Dependency and configuration updates
- (bolliy) Added Admin 5 configuration
- (bolliy) ConnectEV: Update status before reading cachedeStatus
- (bolliy) improve State roles and types

### 0.1.2 (2024-05-31)

- Refresh Token fix
Expand All @@ -37,7 +59,7 @@ Nissan Adapter

MIT License

Copyright (c) 2021-2030 TA2k <[email protected]>
Copyright (c) 2021-2024 TA2k <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 7 additions & 0 deletions admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Nissan-App-E-Mail",
"Password": "Passwort",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Aktualisierung erzwingen, um neue Daten zu erhalten. Dadurch wird die 12-V-Batterie entladen. Bitte überprüfen Sie die 12-V-Batterie",
"Update interval (min)": "Aktualisierungsintervall (Min.)",
"Old Nissan EV App for models before 2019": "Alte Nissan EV-App für Modelle vor 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Nissan App Email",
"Password": "Password",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery",
"Update interval (min)": "Update interval (min)",
"Old Nissan EV App for models before 2019": "Old Nissan EV App for models before 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Correo electrónico de la aplicación Nissan",
"Password": "Contraseña",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Forzar actualización para recibir nuevos datos. Esto agotará la batería de 12 V. Por favor verifique la batería de 12V",
"Update interval (min)": "Intervalo de actualización (min)",
"Old Nissan EV App for models before 2019": "Antigua aplicación Nissan EV para modelos anteriores a 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "E-mail de l'application Nissan",
"Password": "Mot de passe",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Forcer la mise à jour pour recevoir de nouvelles données. Cela videra la batterie 12 V. Veuillez vérifier la batterie 12 V",
"Update interval (min)": "Intervalle de mise à jour (min)",
"Old Nissan EV App for models before 2019": "Ancienne application Nissan EV pour les modèles avant 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "E-mail dell'app Nissan",
"Password": "Parola d'ordine",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Forza l'aggiornamento per ricevere nuovi dati. Ciò scaricherà la batteria da 12 V. Si prega di controllare la batteria da 12 V",
"Update interval (min)": "Intervallo di aggiornamento (min)",
"Old Nissan EV App for models before 2019": "Vecchia app Nissan EV per modelli precedenti al 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "E-mail van de Nissan-app",
"Password": "Wachtwoord",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Forceer update om nieuwe gegevens te ontvangen. Hierdoor raakt de 12V-batterij leeg. Controleer de 12V-batterij",
"Update interval (min)": "Update-interval (min)",
"Old Nissan EV App for models before 2019": "Oude Nissan EV-app voor modellen vóór 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Poczta elektroniczna w aplikacji Nissan",
"Password": "Hasło",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Wymuś aktualizację, aby otrzymać nowe dane. Spowoduje to wyczerpanie akumulatora 12 V. Proszę sprawdzić akumulator 12V",
"Update interval (min)": "Interwał aktualizacji (min)",
"Old Nissan EV App for models before 2019": "Stara aplikacja Nissan EV dla modeli sprzed 2019 r"
}
7 changes: 7 additions & 0 deletions admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "E-mail do aplicativo Nissan",
"Password": "Senha",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Forçar atualização para receber novos dados. Isso irá descarregar a bateria de 12 V. Verifique a bateria de 12V",
"Update interval (min)": "Intervalo de atualização (min)",
"Old Nissan EV App for models before 2019": "Antigo aplicativo Nissan EV para modelos anteriores a 2019"
}
7 changes: 7 additions & 0 deletions admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Электронная почта приложения Nissan",
"Password": "Пароль",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Принудительное обновление для получения новых данных. Это приведет к разрядке аккумулятора 12 В. Пожалуйста, проверьте батарею 12 В.",
"Update interval (min)": "Интервал обновления (мин)",
"Old Nissan EV App for models before 2019": "Старое приложение Nissan EV для моделей до 2019 года"
}
7 changes: 7 additions & 0 deletions admin/i18n/uk/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "Електронна пошта програми Nissan",
"Password": "Пароль",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "Примусове оновлення для отримання нових даних. Це призведе до розрядження батареї 12 В. Перевірте батарею 12 В",
"Update interval (min)": "Інтервал оновлення (хв.)",
"Old Nissan EV App for models before 2019": "Старий додаток Nissan EV для моделей до 2019 року"
}
7 changes: 7 additions & 0 deletions admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Nissan App Email": "日产应用程序电子邮件",
"Password": "密码",
"Force Update to receive new data. This will drain 12V Battery. Please check 12V Battery": "强制更新以接收新数据。这将耗尽 12V 电池的电量。请检查12V电池",
"Update interval (min)": "更新间隔(分钟)",
"Old Nissan EV App for models before 2019": "适用于 2019 年之前车型的旧 Nissan EV 应用程序"
}
Loading

0 comments on commit c05805c

Please sign in to comment.