nikkow / node-red-contrib-tahoma

Node-RED module to control a Somfy Tahoma box (Roller shutters...). Used for home automation flows.
Apache License 2.0
19 stars 11 forks source link

Callback URI mismatch #29

Closed remcokaptein closed 4 years ago

remcokaptein commented 4 years ago

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
ralphhendriks commented 4 years ago

I had similar troubles when setting this up.

Make sure that you have followed the instruction on this wiki page very carefully. The callback URL is the base URL that you normally use to access NR through the browser, with the path /somfy/callback appended. It doesn't matter that this URL is not accessible from the public internet. I run my NR on a Raspberry Pi on the local network, and I access the UI through an IP address on the local network, e.g. http://192.168.0.42:1880/. So the callback URL that I registered on the Somfy developer portal was http://192.168.0.42:1880/somfy/callback.

Of course when configuring, you have to make sure that your browser can reach both the internal NR URL as well as the internet.

I also noticed that configuration changes you make on the Somfy developer portal, are only effective after some time (say 10-15 mins). I initially couldn't get it to work after I configured the correct URL, but when I tried after some time it worked.

Hope this helps.

nikkow commented 4 years ago

Hi :) Thanks @ralphhendriks for answering this question :+1: .

The point was also raised in issue #27. Regarding the callback, the behavior is quite strange. As per my last comment on issue #27, I do not manage to reproduce the mismatch_uri issue. After waiting the 10-15 mins mentioned by @ralphhendriks , both callbacks (with and without the /somfy/callback bit) work fine.

nikkow commented 4 years ago

Duplicate of #27