Habpanel: Switch dashboard with item value

Tags: #<Tag:0x00007f616f251cc8>


I am trying to switch to a specific dashboard (Alarm) if a an alarm is triggered.
Therefore I created an auxiliary string item, which changes to “Alarm” if an alarm is triggered and to “Home” if Alarm goes back to normal.

However, if I change the item to Alarm nothing happens (same with “ALARM”).
It’s a bit confusing that the dashboards name in HabPanel is “ALARM” on the dashboards overview, but the label on the dashboard itself (if it’s active) is “Alarm”

Any idea, what might be wrong?

1 Like

Same here. The automatic switch to that dashboard does not seem to work.
It is confusing as you said. I even have a dash which shows ‘Begane grond’ (Dutch for ground level) but is only appears in lists (or in the URL) as ‘beneden’ (Dutch for downstairs).
Maybe the not switching to that dash function is related to that (bug)?

Same thing goes for the speak item of Habpanel (test button does met me hear a test voice).
In short: both the dashboard and voicestring settings of HABpanel do not seam to work.

The log says:
01:30:06.761 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HABpanel’ received command TimeTimer
01:30:06.763 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HABpanel_SpeakString’ received command hallo

But nothing happens in the dash…

Well, I upgraded to the 2.1 snapshot and all (dash changing and speech) seems to be working now! Great!
No answer on the strange dashnames as the first poster mentioned however…

Good news.
I will try it as soon as possible.

I am having the same problem at the moment.

I am running
-> openHAB 2.1.0-1 (Release Build)
but it doesn’t change Dashboards.

The Items are Updating:

2017-07-18 20:58:30.048 [ItemStateChangedEvent     ] - HABPanel_Tv_Dashboard_Switcher changed from Wohnzimmer to QNAP%20Status
2017-07-18 20:59:00.094 [ItemStateChangedEvent     ] - HABPanel_Tv_Dashboard_Switcher changed from QNAP%20Status to Wohnzimmer

I am also getting some errors, when i check the HABPanel with the google Developer Tools:

Failed to load resource: the server responded with a status of 404 (Not Found)
openhab.service.js:226 SSE error, closing EventSource
source.onerror @ openhab.service.js:226
openhab.service.js:35 Loaded 103 openHAB items
events:1 GET http://openhabianpi:8080/rest/events 404 (Not Found)
openhab.service.js:226 SSE error, closing EventSource

But i have no idea what is going wrong here.

I have checked the Dachboard names twice and typed them in derctly as url and they work.

the “Switch dashboard with item value” not working for me.

I had the same problem. Here’s what I discovered…

When you create a panel you give it a name that appears in the UI. The UI lets you edit the name if you want.

Let’s say you created a panel named “Alarm” and later you rename it to “Security”. Internally, OpenHAB remembers that the panel was created as “Alarm” even though it shows up as “Security” in the UI. “Switch dashboard with item value” uses the original name from when the panel was created, regardless of the name that shows in the UI.

How can you determine the panel’s original name if it never shows in the UI? Check the URL of the panel. The orignal panel name shows right after “/habpanel/index.html#/view/”.

1 Like

Just to add to this…
If you go into Settings and click the ‘Edit the local panel configuration (experts only)’ under Local Storage, it allows you to change the “id” (the original name from when the panel was created)
This works even if you are working with a non local panel configuration.
Perhaps @ysc could say if there are any downsides to this.

1 Like

That’s great! Thanks for the information.
I will give it a try asap…

This works, I don’t see any downsides except if you have references to the old id; the only things I can think of are Button widgets with an “navigate to another dashboard” action and bookmarks in your browser.
In any case, be careful when editing things directly (and perhaps make a backup first) :wink:

Yes I agree, caution is required!
Is there a reason for separating the id and name? It does seem to be the source of some confusion - probably why some people in this thread couldn’t get the Switch dashboard to work.

No good reason, it was a poor design decision I made maybe on the very first day I started working on HABPanel as a pet project, and wasn’t even thinking of releasing it…

I probably figured then I would need a stable ID later for the router, and didn’t want a generic integer in the URLs so I simply reused the name from the “add new dashboard” dialog… To anyone reading this, don’t design object models like this :wink:

Hi Yannick,

I have a question about the “switch with item value”-feature.
On my tablet I cannot use the drop down menu to select an item.
(nothing happens at all when clicking there)
This is - by the way - true for all drop down menus

Is there any way to configure this somewhere else?
I mean like kind of default on the server side?
Any help is greatly appreciated.
Best regards,

Weird, those are native dropdowns, they should work :man_shrugging:

You can use a regular browser to configure it, save on the server and use it on the tablet. Those settings also appear in the JSON of the panel that you can edit from the “edit the local configuration” link or in Paper UI’s “configuration > services” section .

1 Like

Excellent! I will try that!
Thank you very much!

Your suggestion works perfectly!
Thanks again!

1 Like