Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
acehems
Posts: 3
Joined: 26 Apr 2015 23:58

Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Post by acehems »

I have a z-wave network set up using the new Z-Wave expert UI through a raspberry pi. I am creating my own website using an apache2 server to control my devices. The expert UI works fine but when I bring my website up the controls for the devices won't work.

Say my website is set at, "mywebiste.ddns.net", I am using ajax get and post requests to turn devices on and off and to check there status like "mywebsite.ddns.net:8083/OpenRemote/SwitchBinaryStatus/2/0". When viewing the network and console through a browser I get the error:

"XMLHttpRequest cannot load mywebsite.ddns.net:8083/OpenRemote/SwitchBinaryStatus/2/0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http:/mywebsite.ddns.net' is therefore not allowed access. The response had HTTP status code 404"

Now I have tried to edit the apache2 config files to add:

Header add Access-Allow-Control-Origin "*"

but that hasn't helped. I have followed http://enable-cors.org/server_apache.html as well as various other forum help and nothing has worked yet.

Anyone have any ideas how to fix this?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Post by pz1 »

Did you activate the OpenRemoteHelper with the Home Automation UI?. If yes did that work with a local call?
acehems
Posts: 3
Joined: 26 Apr 2015 23:58

Re: Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Post by acehems »

pz1 wrote:Did you activate the OpenRemoteHelper with the Home Automation UI?. If yes did that work with a local call?
I actually completely redid my pi, reloaded raspbian and loaded everything for z-wave onto it as well as ran updates for apacher and it was working fine. I just ran "sudo apt-get update" and now I am getting the same errors. Except now when loading "ipaddr:8083", the first screen will pop up but when trying to go into the expert ui (the old one) it reads "Sorry, the server has not completely started yet".
acehems
Posts: 3
Joined: 26 Apr 2015 23:58

Re: Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Post by acehems »

It seems that the newest version is not compatible with some of the newer versions of raspbian. I reverted to a previous version of z-way-server (1.7.2) and it works perfectly fine.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Access-Control-Allow-Origin error, OpenRemote/Z-Wave.me

Post by pz1 »

acehems wrote:It seems that the newest version is not compatible with some of the newer versions of raspbian. I reverted to a previous version of z-way-server (1.7.2) and it works perfectly fine.
The newest official release 2.0.0, or the latest beta release 2.0.1-rc25 ? The latter is afaik compatible with the latest rasbian.
Post Reply