to use: simply copy to the addons folder and you are almost done - just add items that you wish to use in the habpanel to the group named ‘Group_HabPanel_Dashboard’ (and do not forget to create the group itself). There is no need to add items that you won’t be displaying (meaning you can still use any items that you would be sending commands to in habpanel without adding them to the mentioned group).
@arctus from my review and understanding of the rest API a call to [GET] [/items/{itemname}] when called to a group item will return all items which are part of that group in addition. So I am curious why the additional need of the custom rest api binding?
From my review this could actually be a very good solution. Modify the HABpanel loadItems(){} function to make a call to a user configurable groupname. This way all the user needs to do is create the group in there items and then add the items to that group? Am i missing something?
function loadItems() {
$http.get('/rest/items/$insertvariblegroupnamehere')
.then(function (data) {
if (angular.isArray(data.data)) {
console.log("Loaded " + data.data.length + " openHAB items");
$rootScope.reconnecting = false;
$rootScope.items = data.data;
if (!liveUpdatesEnabled) registerEventSource();
} else {
console.warn("Items not found? Retrying in 5 seconds");
$rootScope.reconnecting = true;
$rootScope.items = [];
$timeout(loadItems, 5000);
}
$rootScope.$emit('openhab-update');
},
function (err) {
console.warn("Error loading openHAB items... retrying in 5 seconds");
$rootScope.reconnecting = true;
$timeout(loadItems, 5000);
});
}
Bigger problem is not loading the items but the event stream. The addon also does filter events that happen for the items present in the group. It also filters device changed and update events thus reducing processing power required for javascript on habpanel side.
I downloaded the 2.4 version this afternoon but seems the 2.5 and the 2.4 are the same.
Once I out the jars in the addon folder it breaks HP all together.
Any chance of getting a specific 2.4 version please?
I just installed your modded habpanel but it does not work for me (I am on the latest snapshot #1689).
When opening Habpanel in a browser it states “Connection lost, trying to reconnect” and the log is flooed with the following error message
2019-09-15 21:29:46.859 [INFO ] [er.internal.web.FilteredItemResource] - Received HTTP GET request at 'items-filtered'
2019-09-15 21:29:46.870 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /rest/items-filtered
javax.servlet.ServletException: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoSuchFieldError: editable
just to confirm, you are using both the files from the zip: habpanelfilter and habpanel? Also, when you say empty - do you mean that habpanel does not even show any html markup, just empty screen? If it does not show the markup, that means it is not connected to the habpanel that I provided - if it would not work, you won’t see any values for the items, but html markup would still be visible.
Constant message. Habpanel does not show any items. I just get the panel selection screen. Putting the original habpanel jar into the addons folder immediately brings all items and panel layouts back again (albeit with the usual performance issues)
Btw, what do you get when you go to http://youropenhab:8080/rest/items-filtered (replace your openhab with your openhab address)? Did you see any problems when installing habpanelfilter addon?