Page 1 of 1

Domoticz error! Cross-Origin?

Posted: Sunday 14 July 2019 8:10
by dcc86
Hi All,

I have domoticz running on my synology and this works perfect.
I want to expand with Dashticz but i can't get it worked i tried different version (master, beta and v3) but it doesn't sort my problem.
Also tried different browers...
i followed the following guide to install:

Steps
* Install/activate WebStation via Package Station
* Install/activate PHP via Package Station
* Via Main Menu -> Web station select your preferred HTTP backend server
(assumption: nginx)
* At the same page verify that an PHP version is activated.
* In "Web station" -> "PHP settings" verify that the curl extension is selected.
* Download the latest Dashticz beta branch and copy the complete branch to the web folder.
* Edit custom/CONFIG.js with the basic settings according the installation instructions on the Wiki
Now Dashticz should run on http://[IP of Synology-nas]/dashticz_v2

Well dashticz does run but i can't get connected with domoticz (get the: Domoticz error!
Please, double check the path to Domoticz in Settings!), the ip adress is absolutely right get the following information when debugged (firefox):

Synchrone XMLHttpRequest op de hoofdthread wordt niet meer ondersteund vanwege de nadelige effecten op de eindgebruikerservaring. Zie http://xhr.spec.whatwg.org/ voor meer informatie jquery.min.js:4:15143
Cross-Origin-aanvraag geblokkeerd: de Same Origin Policy staat het lezen van de externe bron op http://192.168.178.12:8084/json.htm?typ ... order=Name niet toe. (Reden: ontbrekend token ‘content-type’ in CORS-header ‘Access-Control-Allow-Headers’ van CORS-preflight-kanaal).

Cross-Origin-aanvraag geblokkeerd: de Same Origin Policy staat het lezen van de externe bron op http://192.168.178.12:8084/json.htm?typ ... order=Name niet toe. (Reden: CORS-aanvraag is niet gelukt).

Google chrome debugging gives:
(index):1 Access to XMLHttpRequest at 'http://192.168.178.12:8080/json.htm?typ ... order=Name' from origin 'http://192.168.178.12' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
main.js?v=1563084782796:1012 Domoticz error!
Please, double check the path to Domoticz in Settings!
error @ main.js?v=1563084782796:1012

Domoticz error!
Please, double check the path to Domoticz in Settings!


when i open http://192.168.178.12:8084/json.htm?typ ... order=Name in the browser i get all the information from domoticz right....

Can please someone help me with this?

Many thanks in advance,

Re: Domoticz error! Cross-Origin?

Posted: Sunday 14 July 2019 21:11
by dcc86
Hi all,

still no luck.... i used https://crossorigin.me/ & https://cors-anywhere.herokuapp.com/ in the settings as default CORS url but still got the same problem? Anyone who can help me with this?

Many thanks in advance,

Re: Domoticz error! Cross-Origin?

Posted: Monday 15 July 2019 20:56
by dcc86
I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....

Re: Domoticz error! Cross-Origin?

Posted: Monday 15 July 2019 21:01
by waaren
dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.

Re: Domoticz error! Cross-Origin?

Posted: Monday 15 July 2019 22:20
by HansieNL
I agree with waaren. I think a Raspi is easier to configure.

Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 20:15
by dcc86
waaren wrote:
dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk


Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 21:12
by HansieNL
dcc86 wrote: Tuesday 16 July 2019 20:15
waaren wrote:
dcc86 wrote: Monday 15 July 2019 20:56 I can't sort it myself..... €50,- for the one who can fix it for me f.e. with teamviewer....
Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk
Or just install webserver and Dashticz on the Raspberry. Than you can keep Domoticz running on your Synology.

Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 21:21
by dcc86
HansieNL wrote:
dcc86 wrote: Tuesday 16 July 2019 20:15
waaren wrote: Suggest you spend the 50 Euro on a Raspberry :D Connect it with berryboot to your Synology and you will have the best of both worlds + some additional advantages like hourly snapshots and the option to compile domoticz from source.
To be honest i got a raspberry pi unused. I swapped from raspberry to synology. So install bootberry and then install domoticz and dashticz on the raspberry? Thanks in advance for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk
Or just install webserver and Dashticz on the Raspberry. Than you can keep Domoticz running on your Synology.
Going to give it a try! Thanks for your help!

Verstuurd vanaf mijn SM-G960F met Tapatalk


Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 21:25
by HansieNL
@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
For Dashticz make the following changes: $ sudo apt-get install php7.0-curl php7.0-xml
Set permissions on the web directory /var/www/html:
$ sudo chown www-data:www-data /var/www/html
$ sudo chmod 775 /var/www/html
$ sudo usermod -a -G www-data pi

Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 21:28
by dcc86
HansieNL wrote:@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
Thanks! Berryboot is not necesarry in that case? Just the webserver and after that dashticz?

Verstuurd vanaf mijn SM-G960F met Tapatalk


Re: Domoticz error! Cross-Origin?

Posted: Tuesday 16 July 2019 21:38
by HansieNL
dcc86 wrote: Tuesday 16 July 2019 21:28
HansieNL wrote:@dcc86: Tip: Setting up an NGINX web server on a Raspberry Pi (with PHP) https://www.raspberrypi.org/documentati ... r/nginx.md
Thanks! Berryboot is not necesarry in that case? Just the webserver and after that dashticz?

Verstuurd vanaf mijn SM-G960F met Tapatalk
Nope, just install Raspbian Stretch Lite and webserver and Dashticz ofcourse. Because the Buster version is only shown on the Raspberry download page you have to download it from here: https://downloads.raspberrypi.org/raspbian/images/

Re: Domoticz error! Cross-Origin?

Posted: Thursday 18 July 2019 21:04
by dcc86
This problem is solved. Apparantly domoticz say it's updating on a synology by loading and completing the update screen but doesn't do a thing! updated to the latest version manually and dashticz works! many thanks for help guys!