-
Notifications
You must be signed in to change notification settings - Fork 16
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
Failed to install correctly? #78
Comments
Hi @Humancell to really know if the SmartThings network is reaching your NodeRed instance, you need to go to the overview page of your workspace project and see if this shows up to you: If it is not there, then, probably it is not a SmartApp problem. Have you clicked the "Register" button? To registry the webhook. How did it go? Usually, the network connection problem when clicking the SmartApp is a failure to reach the SmartApp/NodeRed instance from your SmartThings App. Have you tried to reach the SmartApp URL from your phone? Is it accessible? The two instances of the SmartApp in the discovery area is odd. It shouldn't. Just remember that your SmartApp NodeRed URL must be publicly available and with a valid certificate. Your browser must not present any certificate warning or error. Otherwise, SmartThings will not connect to your NodeRed instance. Self-Signed certificates do not work. Regards, |
Thank you for the response and things to check. Yes, when I clicked that Verify link it said it could see the server and the warning went away. Is this what you mean by the Register button? Or where is that button? When I try to hit the URL from my phone browser I get "SmartThings NodeRed SmartApp is accessible." And so that looks good. Maybe I need to just delete the SmartApp in the Developer Workspace - if I can - and start over? And yes, the two instances that showed up is extremely strange. :-/ |
Ok, I've made some progress. I realized that on the Node-RED Console Log I am seeing:
What would this be caused by? I'm continuing to explore. |
And I have found this: https://community.smartthings.com/t/forbidden-failed-verifysignature/243091 |
Can you inject the originalUrl at your nginx proxy HTTP header? Try with original-url if originalUrl does not work. Use as value the external domain, the one nginx is receiving before the translation. I looked at smartthings smartapp SDK and they do have this check. If the header originalUrl is present they will use it instead of the requested url. Regards, |
Or, you can try this:
Regards, |
The problem is the smartapp signature check. They have this to prevent an attacker to call your server from anywhere else simulating events, and, opening your door, for example. This is the way they choose to make sure the request came from the SmartThings network. When behind a proxy, it probably changes the original request and the signature verification fails. The way to make this work is to configure nginx to preserve everything from the original request and send it forward to your NodeRed instance. Regards |
I'm actually using Apache mod_proxy, and I am using the ProxyPreserveHost parameter. What I started to wonder is if they are using the port in creating the signature also. :-( I'm doing the proxy from HTTPS (443) to Node-RED (1880) and so that might be the issue. I've been browsing through the code, but can't quite determine all of the values they are using to create the signature. |
Hello,
I realized that I maybe "half installed" the project and am trying to find what went wrong.
I've tested the configured URL and it is HTTPS and returns the "SmartThings NodeRed SmartApp is accessible."
The nodes are all in Node-RED and seem to work if I trigger them.
Thoughts on what I might have screwed up?
The text was updated successfully, but these errors were encountered: