Git Product home page Git Product logo

node-red-contrib-tahoma's Introduction

Somfy Tahoma for Node-RED

npm Build Status npm license code size

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

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.

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 must be reconfigured using this new API.

However, please note that even though this release was tested before being published, you might encounter unexpected issues. Please backup your flow before proceeding with this major release.

Setup

You can read this guide from Node-RED official portal. This will help you install this node. Typically, the command are as follows:

cd $HOME/.node-red
npm install node-red-contrib-tahoma 

Disclaimer

This software is provided as-is. Be careful: your devices can be fully controlled via API actions. I am not responsible of any mis-usage or corruption of the devices configuration.

Configuration

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 need to enable the developer mode on your Somfy account to use this module. This guide 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 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

Node tahoma

This node accepts an object as input. The following properties will be parsed:

Property Type Required? Description
action enum (see below) Yes The action to perform
position int (0-100) No The position you want to set your blinds/door to
rotation int (0-100) No The rotation you want to set your blinds to
lowspeed boolean No Should the action be triggered in low-speed mode?

Actions

Currently, only a few commands are understood by this node. The possible values for the action property are:

  • open: This will open the device (door, blind...)
  • close: This will close the device
  • stop: This will stop all running actions
  • customPosition: This will set the device to a custom position. The position is passed using the position property, which is required in this mode.
  • customRotation: This will set the device (blinds) to a custom rotation. The rotation is passed using the orientation property, which is required in this mode.

Output

The node will output its original msg.payload enriched with the result of the expected action. msg.payload.output will contain 2 properties:

  • open: a boolean. Set to true if the device is open, or false otherwise
  • position: an integer (0-100). Set to the position returned by the Tahoma box.
  • luminance: in case of a Sun Sensor, returns the current value of core:LuminanceState (See issue #6)

Node tahoma-read

This node will ignore all data provided as input. You can specify the desired device by editing the node properties. (Note: you can still trigger a tahoma-read instuction periodically by using an inject node. See #28)

Output

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

Example Flow

An example flow can be found in the docs/ folder. Basically, all it does is close and open shutters based on manual triggers. Those can be replaced by some logic (e.g. a node calculating the sunset and sunrise times). The output is sent to a local MQTT broker.

Compatibility

This was tested with the following devices:

  • IO-HomeControl Roller Shutters
  • IO-HomeControl Garage Door
  • Sunea IO Awning (thanks to @xeor)

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

node-red-contrib-tahoma's People

Contributors

hobbyquaker avatar marekhalmo avatar nikkow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-tahoma's Issues

Add support for orientation/rotation of blinds

Hello,

Yesterday i got new blinds on my house, i tried to integrate them with node red which took a while.
Currently it is only possible to set customPossition on the blinds.
I would like to controll the rotation/orientation as well (for the homecontrol io motors only).

I was looking in to the code and i did the change necessary. I would like to merge the changes to develop for everyone to use (the change is quite simple to do)..

the change is in tahoma.ts to add a new option (line 96)
case 'customRotation':
commandName = 'rotation';
parameters = [{ name: 'orientation', value: parseInt(msg.payload.orientation, 10) }];
statusProgressText = 'Rotating to ' + msg.payload.orientation + 'degrees...';
statusDoneText = 'Rotated to ' + msg.payload.orientation + '%';
break;

How can i contribute? Is it possible to commit to develop or can you create a branch that i can use?

Thank you!

Tahoma-Config-Node is not able to create local connection to Tahoma Box

Describe the bug
Today I have installed the new beta via npm i node-red-contrib-tahoma@beta on a clean docker container of node-red (https://hub.docker.com/r/nodered/node-red). I updated my tahoma box before and activated "Developer Mode" in my Somfy-Account.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'tahoma-read note'
  2. Click on 'add new account'
  3. Fill in "Name", "Pin", "E-Mail', "Passwort"
  4. See error on console

Expected behavior
Tahoma Box in same local network has to be found.

Logs
TypeError: Cannot read property 'url' of null
at SomfyApi.getGatewayUrl (/usr/src/node-red/node_modules/node-red-contrib-tahoma/dist/core/somfy-api.js:146:41)
at SomfyApi.getDevices (/usr/src/node-red/node_modules/node-red-contrib-tahoma/dist/core/somfy-api.js:157:33)
at /usr/src/node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma-config.js:76:14
at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/src/node-red/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/src/node-red/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
at /usr/src/node-red/node_modules/express/lib/router/index.js:281:22
at param (/usr/src/node-red/node_modules/express/lib/router/index.js:360:14)
at param (/usr/src/node-red/node_modules/express/lib/router/index.js:371:14)
at Function.process_params (/usr/src/node-red/node_modules/express/lib/router/index.js:416:3)
at next (/usr/src/node-red/node_modules/express/lib/router/index.js:275:10)
at expressInit (/usr/src/node-red/node_modules/express/lib/middleware/init.js:40:5)
at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/node-red/node_modules/express/lib/router/index.js:323:13)
at /usr/src/node-red/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/src/node-red/node_modules/express/lib/router/index.js:341:12)
at next (/usr/src/node-red/node_modules/express/lib/router/index.js:275:10)
at query (/usr/src/node-red/node_modules/express/lib/middleware/query.js:45:5)
at Layer.handle [as handle_request] (/usr/src/node-red/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/node-red/node_modules/express/lib/router/index.js:323:13)
at /usr/src/node-red/node_modules/express/lib/router/index.js:284:7

Setup:

  • Version of node-red: 2.2.2
  • Version of node-red-contrib-tahoma: [v3.0.0-beta.4]
  • Version of node (node -v): v14.18.2
  • Version of npm (npm -v): .14.15
  • Where is node-red installed: Docker Host, Linux Server
  • How is node-red installed: https://hub.docker.com/r/nodered/node-red

Missing field name and available when get device info TAHOMA

in previus version of contrib-tahoma it works - in the actual version the fields "name" and "avaible" are lost. When i call the /get/GetDevicesBySiteId at the somfy developer api site i get the responce of all devices. For the box himself i get:

    "id": "8xxxxxxx-5850358c-3yyyyyyy-014b3968",
    "type": "hub_tahoma_1",
    "categories": [
      "hub"
    ],
    "states": [],
    "capabilities": [],
    "site_id": "ß948ß109483ß0412ß390481ß",
    "name": "TAHOMA",
    "available": true,
    "version": "2018.4.4.7-kizboxv1"
  }

with the fields name and avaible - when i do this wirh Tahoma-Read the result is:

payload: object
   id: "8xxxxxxx-5850358c-3yyyyyyy-014b3968"
  type: "hub_tahoma_1"
  categories: array[1]
    0: "hub"
  states: array[0]
  capabilities: array[0]
  site_id: "ß948ß109483ß0412ß390481ß"
  version: "2018.4.4.7-kizboxv1"
  topic: ""
_msgid: "295024f.b5753dc"

BR
Hubertus

v3.0.0.beta5 - customRotation doesn't work

Custom rotatin function seems to not working. For example syntax {"action":"customRotation","orientation":50}
gives no results. It was working on previous API, now the same flow isn't.

Setup:

Version of node-red: v1.2.7
Version of node-red-contrib-tahoma: 3.0.0.beta5
Version of node (node -v): v10.23.2
Version of npm (npm -v): 6.14.10
Where is node-red installed Raspberry
How is node-red installed: npm

Auth Problem non-matching callback

I am currently migrating my Node-Red installation from one machine (RPI3) to another one (RPI4 8GB). Setup is to the best of my knowledge identical. Migration to NR via import in RPI4 after fresh install. NR runs on the same local host (RPI3 or RPI4, but never concurrent). All else works fine.

Somfy on RPI3 OK (with http://127.0.0.1:1880/somfy/callback) as usual :-)

Somfy on RPI4 FAILS with non-matching callback error :-(((

I have of course also read issue #27 and tried all permutations suggested there as well.

  • With same app as for RPI3 (of course not concurrently running node-red on RPI3 and 4) and identical credentials
  • Created new app (approved) with new credentials and the following settings
http://127.0.0.1:1880/somfy/callback
http://127.0.0.1:1880/
http://localhost:1880/somfy/callback
http://-real IP in local network-:1880/somfy/callback
http://-hostname-:1880/somfy/callback

The result is always identical (non-matching callback), no matter what I do.

I have also waited for 24h to give time for potentially needed processing with the new Somfy app: same result.

I would appreciate very much any help on how to further debug/proceed on this issue.

BTW: I am very grateful for the excellent work on this contrib! For me this is the best solution to integrate Somfy at all.

Call back solved?

Possible solution:

  • Log in to https://www.tahomalink.com
  • Choose hamburger ico > my account
  • Click on "My Somfy account"
  • Click on "Give someone else access to my box"
  • Click in Node-RED on "link Node-RED to tahoma"
    I have used my local IP address.

Callback URI mismatch

I'm trying to link node-red to Tahoma in the config of the Tahoma node.

All works, I get a login, it finds the app, it asks if I want to allow access.

However, after this I get a redirect_uri_mismatch. I've attached the error in my browser window.

I'm confused what to use for callback URL in the Somfy Developer portal when I create the app?? I don't know what's being send by the node to Somfy and therefore I can't ensure it's matched?

Does anyone know? Without this callback URL matching, nothing happens it seems.

Thanks

Screenshot 2020-04-23 at 17 06 46

Will window/door sensors be added

On old installation i could get statur of the window sensors.
But i dont get these devices in the dropdown list.
I can only see the 3 screens and tahoma
Am i doing anything wrong?

Please release 3.0.0 officially

The last release of this awesome plugin has been in 2020.. since then a lot has changed (for me blind orientation, local API without remote internet calls).

Please release the v3.0.0 .. i don't want to run an unofficial build/RC. I'm sure that the community would like that update as well.

I'm testing the fix with custom rotation and local api now for 1+ month. It works flawlessly.
If you want some help, let me know.

Thank you for your awesome work!

Thank you

No issue just wanted to say thanks for the update. I can now uninstall home assistant :-) as I only used that for somfy. But really appreciate your time and efforts in updating this.

P.S. On your wiki for setting up apps on somfy dev site, it takes about 15-20 mins for a new app to become active.

can´t select device

Hi,

i can´t select any device.
Tahoma Account is configured.

npm 5.6.0

Where can i see more Infos for troubleshooting?

Thanks

no connection.

Would love to use this!

Create an app: no problem.
Enter the API key and secret: no problem.
hit the button: link node-red to tahoma:

An error has occurred
Please try again. If the problem persists, please contact our technical support team.

Node-RED fails to start after updating Tahoma

Describe the bug and reproduction
Yesterday I updated the Tahoma box and after that my whole Node-RED instance doesn't want to start anymore. In the logs I see the following message:

node-red_1 | 9 Apr 20:56:00 - [error] Error: connect EHOSTUNREACH 192.168.178.30:8443
node-red_1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

Before the update. Everything worked perfect!

I've tried to remove the configuration node from the flows.json, and after that Node-RED can start normally. Then I tried to reconnect by completing the setup, but then it fails again.

The setup cannot find the ip address so I'm inserting that manually. I've checked the IP-address and that is still correct. Did the port change? How can I check that?

Expected behavior
First that Node-Red doesn't crash when the plugin cannot get a connection.
Second that the plugin can connect to the box.

Logs
node-red_1 | 9 Apr 20:56:00 - [error] Error: connect EHOSTUNREACH 192.168.178.30:8443
node-red_1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

Setup:

  • Version of node-red: 3.0.2
  • Version of node-red-contrib-tahoma: 3.0.0-beta.5
  • Version of node (node -v): v16.16.0
  • Version of npm (npm -v): 8.11.0
  • Where is node-red installed (Raspberry, macOS...)? Raspberry pi
  • How is node-red installed (Docker, via npm)? Docker

Error unhandled Promise rejection

This is what gets logged when I send a customPosition command to a shutter:
(node:1684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1969)
(node:1684) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Somfy API seems no longer to respond to node red.

Somfy App on their web site responds OK with approval and valid credentials. Tokens are not expired and efresh of API tokens works flawless too. However, no devices can be found in new nodes and the corresponding fields are greyed out. No data can be received by read nodes that were previously working, nor can any new nodes be defined. On existing nodes site and device entries are filled with 8-digit hex values connected by hyphens. Debug output from nodes is like: {"topic":"","payload":null,"_msgid":"c08144c1.1739a8"}.

Some nodes stuck in progress

From time to time, some nodes status is stuck as in progress. It looks like the node IDs get mixed up and one node claims to finish multiple times (judging from the debugging output).

Suggestion

Suggestion:
include the content of the readme.md in the node help section. Saves users a google search on the usage.

Device list empty

Hi!
I am using the new version of this plugin (updated from previous version) and I have managed to configure the API properly.
But after the upgrade all nodes lost their values and I cannot edit them correctly.

The Site and/or Device is sometimes empty and even if I manage to select a correct device, it doesn't seem to retain the configurations for very long.

The log is full of errors like the one attached.

TypeError: Cannot read property 'context' of null
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma-config.js:33:71
    at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at /usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:354:14)
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:365:14)
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:410:3)
(node:29147) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
(node:29147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 558)
(node:29147) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:29147) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
(node:29147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 559)

v3.0.0.beta empty devices list.

I can't get to work new setup with 3.0beta version.
Developer mode is enabled.
After filling credentials and PIN, system gets Token and gateway URL.
Everything seems to look fine but there is no any device on devices list.

Setup:

  • Version of node-red: v1.2.7
  • Version of node-red-contrib-tahoma: 3.0.0.beta
  • Version of node (node -v): v10.23.2
  • Version of npm (npm -v): 6.14.10
  • Where is node-red installed Raspberry
  • How is node-red installed: npm

Node broken

Cannot enter my credentials, cannot "link", cannot reset tokens.

Screenshot 2020-03-06 at 14 33 21

The node is broken for me, when entering my credentials, the node remains red and node-red give exclamation mark, cannot deploy. The callback url is correct.
What is going on ?

[error] Error: getaddrinfo ENOTFOUND

Describe the bug
With the beta 3.x version, I cannot start node red anymore.
It was woking fine with this version.

The crash occur only when I try to access node-red flows for edition.

The crash is caused by :

23 Dec 19:27:16 - [red] Uncaught Exception:
23 Dec 19:27:16 - [error] Error: getaddrinfo ENOTFOUND gateway---****.local
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26)

Setup :

  • Version of node-red : 3.1.3
  • Version of node-red-contrib-tahoma: 3.0.0 - beta 5
  • Version of node.js : 21.4.0
  • Where is node-red installed : Windows 10
  • How is node-red installed : npm

Crash node-red after save credential

Hello

As soon i save the tahoma login data, whole node-red is crashing...
i tried to upgrade node-red to latest version, but issus still exists..

Any idea?

31 May 23:35:45 - [red] Uncaught Exception:
31 May 23:35:45 - TypeError: Cannot read property 'username' of null
at Timeout._onTimeout (/home/pi/.node-red/node_modules/node-red-contrib-tahoma/core/tahomalink.js:40:36)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.

Device list only includes "TAHOMA"

I've successfully connected my Tahoma box with the config node. I have multiple devices registered and configured on the Tahoma box. However, when adding Tahoma nodes, the only device that is appearing the device dropdown is "TAHOMA", nothing else.

Setup:

  • Version of node-red: 1.2.2
  • Version of node-red-contrib-tahoma: 2.0.1
  • Where is node-red installed (Raspberry, macOS...)? macOS
  • How is node-red installed (Docker, via npm)? Docker

Add buffer for the final position of the blinds

If you command the blinds to go to a specific position the motor might go a bit too far or a bit too short.

The code checks the actual position already and if this happens the node wont be in the proper state and will still be marked as moving.

Example:
Command: customPositon, position 60
Blind goes to 58 and stops (good enough).. the node is stuck in state "Going to 60%"

I assume there should be some sort of buffer (e.g. 2-5%) in the code in tahoma.ts (line 28)
if (currentPosition === expectedState.position)

.. i'm not that good with javascript, i'm sure it would be easy to add some sort of (abs(currentPosition-expectedState.position) < 5) check

would also be nice to have some sort of status reporting output (actual state)

Thank you!

[COLABORATION] The session expired issue

Hello,

I'm here to solve the messy session expired issue once for all.
The goal:

Motivation:

  • I get this issue at least 1/week, my wife/kids don't know what to do to restore the system.
  • It is very annoying to have to open some page to fix this
  • OpenHab plugin is having this functionality - why should this be a problem

@nikkow i know you are busy - but please assist - at least you could push a new version/release when this is done

session expired - daily

The session expires every day and renders the node unusable.

Is there no way to auth/refresh the token from within the node automatically ? I see that the tokens are actually stored in the global var environment, shouldnt they be exposed to the node only ? (node.context)

Installation problem of v2

When I install the v2 of node-red-contrib-tahoma using the plugin palette I'm receiving the following error message:

node-red-contrib-tahoma
2.0.0
Error: /data/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.html does not exist
Error: /data/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma-config.html does not exist
Error: /data/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma-read.html does not exist

The nodes will not activate. I'm using node-red as container from https://hub.docker.com/r/nodered/node-red running in Container Station on a QNAP NAS. All existing flows are running without problems. I'm not using any special account/user because that was not necessary in the past.
200301 problem contrib-tahoma v2

Outputs

Hello everyone,

I can't understand the output description.

msg.payload.output.position
msg.output.position
msg.position
unfortunately does not output any values.
The same applies to the value open

under the Tahoma accounts I get these

I now read the position as follows.
msg.payload.states[3].value

Thanks a lot

call getState to know manual changes/sensor values

It would be nice to read the current state(position), for example after manual control. I also have an sun sensor, which should be readable with the same functionality. Here is all the data from the sensor. Under states - core:LuminanceState is the interesting value.

{"creationTime":xxxxxxxxxx,
"lastUpdateTime":xxxxxxxxxxx,
"label":"Sonnensensor",
"deviceURL":"io://xxxxxxxxxxx",
"shortcut":false,
"controllableName":"io:LightIOSystemSensor",
"definition":{
"commands":[],
"states":[{"type":"ContinuousState","qualifiedName":"core:LuminanceState"},{"type":"ContinuousState","qualifiedName":"core:RSSILevelState"},
{"values":["dead","lowBattery","maintenanceRequired","noDefect"],"type":"DiscreteState","qualifiedName":"core:SensorDefectState"},
{"values":["available","unavailable"],"type":"DiscreteState","qualifiedName":"core:StatusState"}],
"dataProperties":[{"value":{"activationDelayMap":{"middle":0,"lower":1200,"upper":300},"referenceStates":["middle","lower","upper"],
"qualifiedName":"io:SunSensorHysteresisBehavior"},"qualifiedName":"core:timeBasedHysteresisBehavior"}],
"widgetName":"LuminanceSensor","uiClass":"LightSensor","qualifiedName":"io:LightIOSystemSensor","type":"SENSOR"},

"states":[
{"name":"core:StatusState","type":3,"value":"available"},
{"name":"core:RSSILevelState","type":2,"value":92.0},
{"name":"core:LuminanceState","type":2,"value": 32956.0}
],
"attributes":[
{"name":"core:MeasuredValueType","type":3,"value":"core:LuminanceInLux"},
{"name":"core:MaxSensedValue","type":1,"value":100000},
{"name":"core:MinSensedValue","type":1,"value":50},
{"name":"core:PowerSourceType","type":3,"value":"battery"}
],
"available":true,
"enabled":true,
"placeOID":"xxxxxxx",
"widget":"LuminanceSensor",
"type":2,"oid":"xxxxxxxxx",
"uiClass":"LightSensor"
},

tahoma - Node red crash after upgrade

Doesn't seem to read the username/passwd field anymore ?

TypeError: Cannot read property 'username' of null
    at Timeout._onTimeout (/home/pi/.node-red/node_modules/node-red-contrib-tahoma/core/tahomalink.js:40:36)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.
nodered.service: Service hold-off time over, scheduling restart.

Connexoon support?

Quick question, does this module also work on the Somfy Connexoon box?

SUNEA io - Awning

Glad to see someone creating a tahoma connector!

I can confirm that this works out of the box with "SUNEA io - Awning". It did take a minute to detect it in the dropdown list, but when it was there, I was able to control it.

It does not look like anything is sent to the output, and position 100 is "in", and 0 is completly out..

Other than that, perfect! 👍

Example

Do you have an example flow for me to play with?

Device list is empty

Hello,

thank you for this great node. After first installation, I could choose one of my devices from the drop-down box.
Now, after some months, I wanted to use other devices. The device-box is empty. How do I reload and display the devices-list (see screenshot)?

2020-02-23 11_05_39-Window

Error : The redirect URI provided does not match registered URI

many thanks for your Node 👍

unfortunately, I always get an error when I try to configure it..
in the somfy dev page, I have successfully created my app and set the call back to

http://127.0.0.1:1880/somfy/callback

but when a try to link NodeRED to tahoma I always get

{"error":"redirect_uri_mismatch","error_description":"{"error":"redirect_uri_mismatch","error_description":"The redirect URI provided does not match registered URI(s)."}(s)."}

Should you not add a "Callback URI" field in the configuration node page so you can pass it during the call and thus always match ?

thanks and keep safe

impossible to check status frequently ?

hello,
first, I would like to thanks you for the job already done.
The palette work fine for me and I succeed to create all I need in nod red except one function.
I would like to check (every minute for the example) the status of the devices (close a 10 %)
I need to do this because I have multiple way to activate every device. And I would like to synchronize the device state between nod red and the others.
I use the read function but I don’t know how to make it update itself.
Thanks in advance for your feedback
BR
image

Unhandled Promise Rejection Warning in tahoma.js

I get the following error message which seems to be a message for nikkow?

(node:32106) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:32106) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 448)
(node:32106) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Setup:

  • Version of node-red: v1.1.3
  • Version of node-red-contrib-tahoma: v2.0.1
  • Version of node (node -v): v12.22.1
  • Version of npm (npm -v): 6.14.12
  • Where is node-red installed (Raspberry, macOS...)? Raspberry
  • How is node-red installed (Docker, via npm)? npm

3.0beta5: 404 on getting devices when NodeRed is not installed URL /

Hi,

My Devices List did't show up and i get an 404 Error.
I am using RedMatic (NodeRed plugin for Raspberrymatic).

As there are multiple Plugins running on the Server NodeRed has another base path:
http://192.168.xxx.xxx/addons/red/

Changes I've done to get it work:

node-red-contrib-tahoma/src/nodes/tahoma.html
LINE 38: $.get(`somfy/${tahoma_account_id}/devices`).then(function (
(Remove the leading "/")
node-red-contrib-tahoma/src/nodes/tahoma-read.html
LINE 37: $.get('somfy/' + tahoma_account_id + '/devices').then(
(Remove the leading "/")

Maybe you can push this edit to beta6 ;)

Authentication

I seem to be having an issue since yesterday. I believe its related to authentication.

The module only works every now and then. It seems to no longer authenticate my requests.

For example this morning i opened the blinds and now a few mins later i am unable do open or close anything else. When i check the config no devices are listed in the drop down.

I checked the JavaScript used and created a python script (i don't really know JavaScript) to authenticate.

I found that the first run of the code i get a 200 response, if i run it again i get 401 responses. I am curious if tahome have changed something, or if we should be using some kind of authentication tokens or such.

How to link/login to tahoma

Hi, i try to control my tahoma window shutter from node red.
If i try to log in to my tahoma from the config node with button "Link node-red to tahoma" the login fail.
I tried to change login data in sample flow and import it but I can't select the device next.
Can someone help me successfully set up a connection to tahoma.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.