Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nikkow/node-red-contrib-tahoma
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.3
Choose a base ref
...
head repository: nikkow/node-red-contrib-tahoma
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref

Commits on Aug 20, 2020

  1. chore: add issue templates

    nikkow authored Aug 20, 2020
    Copy the full SHA
    89063b5 View commit details
  2. Merge pull request #43 from nikkow/chore/add-issue-template

    chore: add issue templates
    nikkow authored Aug 20, 2020
    Copy the full SHA
    c9208f9 View commit details

Commits on Apr 15, 2022

  1. Copy the full SHA
    1d30455 View commit details

Commits on Apr 19, 2022

  1. Copy the full SHA
    5ae48cc View commit details
  2. Copy the full SHA
    d25eecd View commit details
  3. Copy the full SHA
    b2b274b View commit details
  4. Copy the full SHA
    157b1b6 View commit details
  5. Copy the full SHA
    0b34609 View commit details

Commits on May 16, 2022

  1. Copy the full SHA
    b74daa8 View commit details
  2. Copy the full SHA
    51fc7a6 View commit details
  3. Merge pull request #52 from nikkow/feature/migration-to-somfy-local-api

    feature/migration to somfy local api
    nikkow authored May 16, 2022
    Copy the full SHA
    71588f3 View commit details
  4. Copy the full SHA
    cc743e6 View commit details

Commits on May 17, 2022

  1. Copy the full SHA
    9bdeec7 View commit details
  2. Copy the full SHA
    7568cac View commit details
  3. Copy the full SHA
    8bd04f9 View commit details
  4. Merge pull request #54 from nikkow/bugfix/broken-3.0.0-beta.1-package

    Bugfix/broken 3.0.0 beta.1 package
    nikkow authored May 17, 2022
    Copy the full SHA
    b5b33f9 View commit details
  5. Update CHANGELOG.md

    nikkow authored May 17, 2022
    Copy the full SHA
    3976a74 View commit details

Commits on May 19, 2022

  1. Copy the full SHA
    cee386d View commit details
  2. Merge pull request #55 from nikkow/feature/auto-discovery

    feat(discovery): add auto discovery of the Tahoma
    nikkow authored May 19, 2022
    Copy the full SHA
    12467c1 View commit details
  3. Copy the full SHA
    a08b630 View commit details
  4. Merge pull request #56 from nikkow/feature/auto-discovery

    chore(version): bumped version to 3.0.0-beta.4
    nikkow authored May 19, 2022
    Copy the full SHA
    334955d View commit details

Commits on Jun 4, 2022

  1. Copy the full SHA
    f19f123 View commit details
  2. chore: bumped to 3.0.0-beta.5

    nikkow committed Jun 4, 2022
    Copy the full SHA
    21943a6 View commit details
  3. docs: updated changelog

    nikkow committed Jun 4, 2022
    Copy the full SHA
    609fdae View commit details
  4. Merge pull request #59 from nikkow/bugfix/custom-position

    Bugfix/custom position
    nikkow authored Jun 4, 2022
    Copy the full SHA
    4ad26c5 View commit details
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, add logs to help explain your problem.

**Setup:**
- Version of node-red:
- Version of node-red-contrib-tahoma:
- Version of node (`node -v`):
- Version of npm (`npm -v`):
- Where is node-red installed (Raspberry, macOS...)?
- How is node-red installed (Docker, via npm)?
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -142,4 +142,4 @@ $RECYCLE.BIN/
*.lnk

# Misc
.vscode
.vscode
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
92 changes: 89 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,90 @@
# Changelog

All notable changes to this project will be documented in this file.

## [3.0.0-beta.5] - 2022-06-04

---

⚠️ This release is a **beta** release. Use it at your own risk.

---

---

🚨 **This release is a major version and contains some breaking changes. Please read the list below.**

---

### Fixed

- Nothing happened when a `customPosition` command was issued.

## [3.0.0-beta.4] - 2022-05-19

---

⚠️ This release is a **beta** release. Use it at your own risk.

---

---

🚨 **This release is a major version and contains some breaking changes. Please read the list below.**

---

### Added

- Auto discovery of the Tahoma box using Bonjour

## [3.0.0-beta.3] - 2022-05-17

---

⚠️ This release is a **beta** release. Use it at your own risk.

---

---

🚨 **This release is a major version and contains some breaking changes. Please read the list below.**

---

### Fixed

- Package of 3.0.0-beta.1 was not complete (ignored files on publication)

## [3.0.0-beta.2]

_Skipped_

## [3.0.0-beta.1] - 2022-05-16

---

⚠️ This release is a **beta** release. Use it at your own risk.

---

---

🚨 **This release is a major version and contains some breaking changes. Please read the list below.**

---

### Changed

- Migration to the new Local API, replacing the cloud-based Somfy Open API.
- `tahoma-read` node returns the raw data retrieved from the local API. (a remapping of your flows might be needed)
- Upgraded the dependencies to their latest versions
- Replaced TSLint with ESLint

### Removed

- Removed deprecated properties on the Tahoma node

## [2.0.3] - 2020-08-20

### Added
@@ -26,9 +110,11 @@ All notable changes to this project will be documented in this file.

## [2.0.0] - 2020-03-01

****
---

🚨 **This release is a major version and contains some breaking changes. Please read the list below.**
****

---

### Changed

@@ -38,7 +124,7 @@ All notable changes to this project will be documented in this file.

### Added

- New code quality control using TSLint
- New code quality control using TSLint

## [1.0.1] - 2019-08-21

44 changes: 11 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,11 +11,15 @@
![license](https://img.shields.io/github/license/nikkow/node-red-contrib-tahoma.svg)
![code size](https://img.shields.io/github/languages/code-size/nikkow/node-red-contrib-tahoma)

## 🚨 Important Note vor v1.x users
## 🚨 Important Note vor v2.x and v1.x users

Due to a recent change in the API used in v1, most of you were encountering issues during the configuration of your node (e.g. empty device list...). **This API was unofficial and we had no control over it** :)
This 3rd version implements a new API released by Somfy (yes, another one). This time, it no longer relies on any cloud-based API, but will directly discuss with your local Tahoma box.

This new v2.0 version implements the Somfy Open API, which is officially available for third-party software as this one.
#### What does this mean?

Basically, the only requirement is to host the node-red instance on the same network than your Tahoma box. That's all. No more quotas, no more expiring tokens. Good news, isn't it?

#### How to upgrade?

Even though your flows should not be modified, the [config-node](https://nodered.org/docs/user-guide/editor/workspace/nodes#configuration-nodes) must be reconfigured using this new API.

@@ -33,11 +37,11 @@ This software is provided **as-is**. Be careful: your devices can be fully contr

## Configuration

In order to use this node, you need to have a Somfy account. If you already use the Tahoma Box and the mobile apps, you should have one.
This node relies on the Local API provided by Somfy, and available on the Tahoma box (from v2 onwards -as per Somfy documentation).

You will also need to create an app on the developer portal in order to retrieve a set of required credentials. This [guide](https://github.com/nikkow/node-red-contrib-tahoma/wiki/How-to-create-an-Somfy-Open-API-app%3F) will walk you through this process.
You will need to **enable the developer mode** on your Somfy account to use this module. This [guide](https://github.com/nikkow/node-red-contrib-tahoma/wiki/How-to-enable-the-developer-mode%3F) will walk you through this process.

When creating your first node, you will be asked to provide your e-mail and password used to login to your Somfy account. These will be used to connect to the API (of course, they will only be used locally, they are not forwarded to me :)).
When creating your first node, you will be asked to provide your e-mail and password used to login to your Somfy account. These will be used to generate a token to interact with your box (they will not be saved at all on your instance). The pin code of your box will also be required. This information is available on your Somfy account.

## Usage

@@ -77,7 +81,7 @@ This node will ignore all data provided as input. You can specify the desired de

#### Output

The node will output its original `msg.payload` enriched with the selected device information. A full example can be found on the Somfy Open API [documentation](https://developer.somfy.com/somfy-open-api/apis/get/site/%7BsiteId%7D/device).
The node will output its original `msg.payload` enriched with the selected device information. The fields returned are the raw information sent by the Tahoma box.

## Example flow

@@ -94,29 +98,3 @@ This was tested with the following devices:
* Sunea IO Awning (thanks to @xeor)

Feel free to send any feedback of any other compatible items or known limitations :)

## FAQ / Troubleshooting

### I received a "Session expired" error, what happned?

![Session expired error](docs/images/ts-session-expired-node.png)

During the login process, Somfy generates a set of credentials composed of two tokens: the first is called an **access token** and the second a **refresh token** (following the [OAuth2](https://oauth.net/2/) protocol).

Both these tokens expire at some point.

The **access token** (used to authenticate each request sent to Somfy API) has a very short lifetime (1 hour) and needs to be regenerated afterwards. To prevent you from entering your e-mail/password each hour, the **refresh token** handles this new authentication. Whenever the access token expires, a new authentication request is sent and Somfy generates a brand-new set of tokens.

However, the **refresh token** has not an infinite lifetime. It expires after **14 days**. Basically, it means that if node-red hasn't reached the Somfy API for 14 days + 1 hour, both your token have expired and you need to login again.

#### What should I do?

This error is also described in the "Debug" tab of your node:

![Session expired error](docs/images/ts-session-expired-log.png)

All you need to do is open your node configuration, edit your account and follow the instructions on the yellow box:

![Yellow box](docs/images/ts-session-expires-tip.png)

**Note:** do not forget to **deploy** your flow, so the new credentials are properly saved.
Loading