Should Habpanel refresh?

Ive only just started playing with this cool UI but found when I create a widget with a switch, the widget works to change the switch state from off to on, however the screen doesnt refresh and clicking the widget again doesnt fire the opposite state.
Is this normal?
Running Win10, Chrome browser.

What version of openHAB are you running?

beta 4 offline

Hit F12 when in Chrome and check for those types of messages in the developer tools’ Console tab:

Updating Kodi_Power state from OFF to ON openhab.service.js:96

If you see messages like this (including for other items), it means the refresh feature is working.

@ysc is this the output you would expect?

The value "device-width;" for key "width" is invalid, and has been ignored.
index.html#/view/dash1:9 The value "1.0;" for key "initial-scale" was truncated to its numeric prefix.
index.html#/view/dash1:9 The value "1.0;" for key "maximum-scale" was truncated to its numeric prefix.
index.html#/view/dash1:9 The value "0;" for key "user-scalable" was truncated to its numeric prefix.
index.html#/view/dash1:9 Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead.
widgets.module.js:33 Registered widget type: button
widgets.module.js:33 Registered widget type: chart
widgets.module.js:33 Registered widget type: colorpicker
widgets.module.js:33 Registered widget type: dummy
widgets.module.js:33 Registered widget type: frame
widgets.module.js:33 Registered widget type: image
widgets.module.js:33 Registered widget type: knob
widgets.module.js:33 Registered widget type: label
widgets.module.js:33 Registered widget type: slider
widgets.module.js:33 Registered widget type: switch
widgets.module.js:33 Registered widget type: template
openhab.service.js:184 openHAB 2 service configuration loaded
openhab.service.js:33 Loaded OpenHAB items
11openhab.service.js:108 SSE connection error, reconnecting in 5 seconds
openhab.service.js:33 Loaded OpenHAB items
2openhab.service.js:108 SSE connection error, reconnecting in 5 seconds
openhab.service.js:33 Loaded OpenHAB items
openhab.service.js:108 SSE connection error, reconnecting in 5 seconds
openhab.service.js:65 Command sent: Fibaro_Kitchen1_Dimmer=ON
33openhab.service.js:108 SSE connection error, reconnecting in 5 seconds

Definitely a problem there. Please go to the Network tab (right of Console), look for a line that says “events” (I suspect it might be red for you), click on it and check the status code - if it’s not 200 OK, look for more info in the Response tab.

double clikcing the red events (more happening every few seconds) if get

{
  "error": {
    "message": "HTTP 404 Not Found",
    "http-code": 404,
    "exception": {
      "class": "javax.ws.rs.NotFoundException",
      "message": "HTTP 404 Not Found",
      "localized-message": "HTTP 404 Not Found"
    }
  }
}

Clicking response I get

Well calling /rest/events shouldn’t give you a 404 error. I’d you have a problem with your OH2 server’s REST API but this isn’t HABPanel related.
You should seek help from people more knowledgeable than me, I have no clue what’s going on here. Sorry. Maybe do a clean beta 4 installation and re-import your config?

seems it might be a common issue - this sounds similar:

running up the dev console in Edge - I found the 404 is looking for this file:
http://192.168.1.XXX:8080/habpanel/vendor/bootstrap.min.css.map

Is this a missing file I need perhaps?

I had the same problem with Chrome on a Android Tablet. Upgraded to Chrome Beta and the problem was gone.


Thomas

@Andrew_Pawelski do you use 1.8? If it tries to get events you should be running openHAB 2.
The missing bootstrap.min.css.map is unrelated and not important.

No. 2.0.0-SNAPSHOT

@ysc I am using 2.0 but do have 1.8 installed but not running

Everything is self contained in an opt folder not installed by wget - maybe this is the difference?

Thanks
Andrew

The http://server:8080/rest/events call should not give you a 404 then. Sorry I really don’t know what’s going on :frowning:

Similar issue here on an Android Tablet with Chrome browser and OH2:
As long as the display is active, it works fine, but when the display turns off for more than one minute or so and then turned on again, no updates are recieved anymore until I manually reload the page.

I can see in the developer console that the EventStream receives messages every 30 seconds, but then just stops without any error message after the display has been turned off. Even after the display is turned on again, the EventStream does not continue.

Is it maybe possible to just disable the SSE subscription when the browser window/tab is not shown anymore, and re-subscribe if the tab is shown? Or do you have any other idea what could be wrong?

On my iPads (2,3) it does the opposite.
After activating screen, the item-updates work fine, but it could hapen (not all times) that “ng-click” events are no more executed.
After reloading page everything works. On all the browsers the same (Safari, Firefox, Chrom etc)

well same here sort of - seems the action of say a button works but doesnt refresh the UI but then also doesnt accept another press to do another action until a refresh. There isnt a lot of communication around this does that mean most people are OK?

I’m experiencing the same behaviour…

HABpanel refreshes just fine in the initial “session” but once my Android tablet has gone into standby and i bring it back, a manual refresh is needed to update all the values.

Have any of you tried this:

Goto wifi settings on the tablet, configure wifi, should be an option saying “Keep wi-fi on during sleep”.

Set this to always.

See if that help any. By default when the tablet goes to sleep it drops the wifi connection.