Skip to content
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

Change allowed origin or ease connection for somfy (awning) #219

Open
evengers opened this issue Aug 5, 2022 · 0 comments
Open

Change allowed origin or ease connection for somfy (awning) #219

evengers opened this issue Aug 5, 2022 · 0 comments

Comments

@evengers
Copy link

evengers commented Aug 5, 2022

I have written a simple JavaScript/html remote control that mimics the somfy remote that came with my awning. I can use that at home from my laptop, iPhone, and iPad (or anything else with a browser)

It works well but requires a proxy server on my LAN to bypass the CORS constraint. (I am using nodejs on a raspberry Pi for the proxy) The code for that is here: https://github.com/evengers/bond2somfy

I think the setup could be simplified (I shouldn’t need the Raspberry) if the allowed-origin on the Bond device was “*”. rather than “http://web.appbond.com”.

or perhaps there is a better approach altogether … ? (Thanks very much in advance for any recommendations)

here is what I find when I check the required access headers

$ curl -i -X OPTIONS 192.168.2.112 \ -H 'Access-Control-Request-Method: GET' \ -H 'Access-Control-Request-Headers: Content-Type, Accept' \ -H 'Origin: http://localhost:3000'
HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://web.appbond.com
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant