-
Notifications
You must be signed in to change notification settings - Fork 13
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
Panel do not change until manual reloading of the page #5
Comments
Are these newly added items and did you try to restart openHAB to see if that fixes it? If restarting solves the issue it may be related to eclipse-archived/smarthome#2706 which should be fixed in openHAB 2.1. |
I have the same issue. I am using a combo 3 webview and it does not reload when changing a parameter. |
@Andirs55 The browser debug console may show some helpful errors or warnings:
The developer console will then show any warnings/errors. The browser developer tools also have a helpful "Network" view where you can monitor all page request and see the response result or error. |
Ok the problems seem to start at 3.
What to do now? |
Those errors seem to be "normal" with Firefox when you reload the page. I see them too while everything still works with openHAB 2.1. Did you also test if it works Chrome? Does openHAB properly update items on a page when they are updated? E.g. when you open the same Basic UI page in two tabs and then update items on one, the changes should also be updated in the other tab. Do you use openHAB behind a webserver like Nginx or Apache2? It may not be properly configured for proxying websockets to openHAB. These are used for streaming item updates to your browser. |
Ok i also tested with chrome and there is the same behaviour :( However it does not give that error when reloading the page. But when changing a parameter (e.g. time frame to display) the chrome console gives me that:
OpenHAB properly updates items (switches etc.) on the page with the diagram across tabs and even across the two browsers Firefox and Chrome. To the last point i would say no because did not setup something special. Just a normal OH package install (2.1 stable) on an ubuntu server and accessing the OH webview with a Win10 machine. Thanks :) |
@Andirs55 That sounds like a "Same origin policy" violation. You need to use a reverse proxy like nginx or apache2 to prevent it. Browser blocks the connection because the request is to a different port and therefore it violates the policy. To fix this with a reverse proxy: |
@Terehi thanks a lot, that works |
Hi, Regards Marco |
Great that setting up a reverse proxy resolved this issue @Andirs55, @marcolino7! I'll add some notes about this in the documentation. |
I had to restart my openHAB 2.1.0 to get the dynamic reloading of the Webview. So the issue still exists in openHAB 2.1.0. |
I'm having the same issue... and cant get it to work.... can someone please post a example here, what i need to add to the nginx conf file to get this to work? Thanks |
@KugeLSichA This is one of the server { .. } blocks I use nowadays with openHAB, htaccess and SSL in a Docker setup, you most likely need to change the hostnames and ports of course:
|
Thanks for your quick reply @wborn ... :) openhabianpi:8080 this is my openhabian adress i'm running openhabian snapshot build #1143
for the value server_name i tried 127.0.0.1 / localhost / the fixed network IP of openhab my smarthome-grafana-user-default.js file
my .sitemap file
I'm still getting
|
@KugeLSichA If you really access openHAB in your browser via
If you use another hostname in your browser you should use that instead of So also make sure you really use the proxy in your browser by using the port 80 in the URL instead of 8080 (or by just omitting the port from the URL). You also may need to reload/restart Nginx for the changes to be applied. 😉 |
Thanks again @wborn for helping me to get this fixed... yeah i noticed that i need to restart nginx... and also did always the test param before... so now i'm a bit closer... but still not working... As you can see here... someting with the path seems to be broken... it seems to be missing the /grafana folder in the URL this is how it looks on my sitemap In Debug mode... the URL seems to be okay... but if i click on it... i get the same error like in pic 1 i did not changed any openhab folder through setup... still all basic installations... even i started (hmm i guess today more than 20 times today) the nginx and also the OH server... just to be sure ... |
@KugeLSichA You most likely also need to update the Grafana configuration file (/etc/grafana/grafana.ini) so it contains something like:
I don't use port 80 myself so maybe you also need to uncomment (remove ; from) the protocol in:
|
Awesome!!! Thank you sooooooo much.... after these changes to the grafana.ini and a restart of OH Server... it works now...! |
I've finally made a little write-up about all of this in the README.md. So you are welcome to review this in PR #6. 😄 |
Hi,
litte annoyng isssue. I have a Combo2 panel similar configuration.
On browser Chrome, when I change one of the parameter like from of panel, page/panel do not refresh automatically, but I have to refresh manually with reload button of the browser.
In Android App, instead, panel is reloaded if one of parameter change.
Is this normal behaviour or there is a way to avoid this?
Many Thanks
marco
The text was updated successfully, but these errors were encountered: