Examples of HABPanel Solutions

Could you share your items and rules etc. for the “Verspätungs”-Popup?
Thanks in advance!

1 Like

@Syn

.items
//Bahn
String bahn_uni_zeit "Bahn zur Uni um [%s]" { http="<[http://reiseauskunft.bahn.de/bin/query.exe/dn?cb=processFahrtmoeglichkeiten&nrCons=1&S=800xxx&SBH=1&Z=800xxx&ZBH=1&journeyProducts=1023&wTime=00:25&widget=1&start=1&encoding=utf-8:60000:JS(bahn_zeit.js)]"}
String bahn_uni_versp "Bahn zur Uni: [%s]" { http="<[http://reiseauskunft.bahn.de/bin/query.exe/dn?cb=processFahrtmoeglichkeiten&nrCons=1&S=800xxx&SBH=1&Z= 800xxx&ZBH=1&journeyProducts=1023&wTime=00:25&widget=1&start=1&encoding=utf-8:60000:JS(bahn_versp.js)]"}
String bahn_alarm_uni  "Uni Bahnalarm [%s]"
String bahn_bochum_zeit "Bahn nach Bochum um [%s]" { http="<[http://reiseauskunft.bahn.de/bin/query.exe/dn?cb=processFahrtmoeglichkeiten&nrCons=1&S= 800xxx&SBH=1&Z= 800xxx&ZBH=1&journeyProducts=1023&wTime=00:25&widget=1&start=1&encoding=utf-8:60000:JS(bahn_zeit.js)]"}
String bahn_bochum_versp "Bahn nach Bochum: [%s]" { http="<[http://reiseauskunft.bahn.de/bin/query.exe/dn?cb=processFahrtmoeglichkeiten&nrCons=1&S= 800xxx&SBH=1&Z= 800xxx&ZBH=1&journeyProducts=1023&wTime=00:25&widget=1&start=1&encoding=utf-8:60000:JS(bahn_versp.js)]"}
String bahn_alarm_bochum  "Bochum Bahnalarm [%s]"
transform/bahn_zeit.js
input = input.replace("BAHN_MNB.fm =","");
input = input.replace(";\nBAHN_MNB.processFahrtmoeglichkeiten();","");
JSON.parse(input).fl[0].ab;
transform/bahn_versp.js
input = input.replace("BAHN_MNB.fm =","");
input = input.replace(";\nBAHN_MNB.processFahrtmoeglichkeiten();","");
JSON.parse(input).fl[0].abpm;
.rules

I made a rule that only delays over 2 minutes are shown.

 rule "Bahn-Alarm"
 	when
 		Item bahn_uni_versp received update or
 		Item bahn_bochum_versp received update
 	then
 		if(bahn_uni_versp.state == "pünktlich") bahn_alarm_uni.sendCommand("")
 		else if(bahn_uni_versp.state == "1" || bahn_uni_versp.state == "2") bahn_alarm_uni.sendCommand("") 
 		else if(bahn_uni_versp.state == "-") bahn_alarm_uni.sendCommand("Bahn um " + bahn_uni_zeit.state + " zur Uni: fällt möglicherweise aus")
 		else bahn_alarm_uni.sendCommand("Bahn um " + bahn_uni_zeit.state + " zur Uni: " + bahn_uni_versp.state + " Minuten Verspätung")
 						
 		if(bahn_bochum_versp.state == "pünktlich") bahn_alarm_bochum.sendCommand("")
		else if(bahn_bochum_versp.state == "1" || bahn_bochum_versp.state == "2") bahn_alarm_bochum.sendCommand("")
 		else if(bahn_bochum_versp.state == "-") bahn_alarm_bochum.sendCommand("Bahn um " + bahn_bochum_zeit.state + " nach Bochum: fällt möglicherweise aus")
 		else bahn_alarm_bochum.sendCommand("Bahn um " + bahn_bochum_zeit.state + " nach Bochum: " + bahn_bochum_versp.state + " Minuten Verspätung")
 	
end
custom widget
<div ng-if="itemValue('bahn_alarm_uni')||itemValue('bahn_alarm_bochum')">
      <div class="bahn-alarm">{{itemValue('bahn_alarm_uni')}}</div>
      <div class="bahn-alarm">{{itemValue('bahn_alarm_bochum')}}</div>
</div>
4 Likes

Which android tablet is better for habpanel use?

A device with 1920x1080 or a device with 1920x1200 pixels?

(Fullscreen Habpanel without scrolling)

The one for which the panel is designed for. HABPanes scales quite well for screens of different sizes, so the difference probably won’t be huge, but more real estate is always better.

1 Like

Maybe there is a given size of maybe 6 rows and this is displayed at 1080 with scrolling and at 1200 in full screen size without the need of scrolling, that was the intention of my question.

More real estate is relative…

1920x1080 is 10,6 inch and 1920x1200 is 10,1 inch… So i don´t know where i can see really more screen…

Reminder: you can use Chrome’s “Device Mode” to simulate different resolutions. This is also useful to design your tablet dashboards on your computer.


1 Like

Hi @Nduzi
I really like your kodi setup and am trying to do something similar. Can you share your code and how you did it?

Hi do you know if there is a way to remove the big orange log viewer banner at the top?

I´m acctually creating my first habpanel.

I have still many questions.

Biggest question for the start is:
Can i make a habpanel, with many panels below and many panels below of them?
So only 1 panel is in the start page of habpanel and all others can only reached from the main panel or the subpanel?

Maybe like this:

  1. main
    1.1 sub 1
    1.2 sub 2
    1.3 sub 3
    1.1.1 sub 1 sub1
    1.1.2 sub1 sub 2
    1.2.1 sub 2 sub 1

Or do i have to make many panels and can only switch between them maybe like this

1
2
3
4

and no sub panels? So on habpanel startscreen i can see all panels?

You can make as many dashboards you like and easily navigate through them via the button widget and the action type “navigate to another dashboard”.

But they will be all shown as separate panels in the panel-directory?

So there is no chance to make a panel and only this is shown, all the sub panels are hidden because they belong to the main panel?

Just try it. It’s a two minutes work.

To end the “quiz show” here: No there is currently no chance.
If you make new “Dashboards” they will appear in the drawer on the left.

But you’re not the only one who has thought about this topic.
See:

Quoted from:

I have thought about something like this too already, so i have raised in issue in the corresponding GitHub Repo now. :slight_smile:

2 Likes

Hi @erickk

Sorry I can’t help with that one. I’m still so new to OpenHAB and Linux I’m just happy to have even got the log viewer working But that would be nice to know anyone else know a way to do that?

Do you configure your habpanel completely from the tablet or can you do this with your computer, too? If i want to use widgets, where i have to change a lot of text, it would be easier on a computer to do that.

You can configure them from computer too of course.
The only thing you may have to do is test on tablet parallel to keep track on dimensions and final look, since tablet is the place where it has to look good and work fine. :slight_smile:

Where can i find the configuration files for habpanel?

I don’t know the exact location and i think this is depending on your ecosystem too.

Anyway you can save your current tablet config to the Server and access/edit it from anywhere you have access to openHAB

For file/config locations there are already several questions/threads existing and i woul dask you to take a search on your own.
You will find useful Discussions here in the community.

Mine is here:

userdata\config\org\openhab\habpanel.config

Not the sort of thing you’d want to hand-edit, mind you.

I have found this file already, but this is indeed no file for self configuration…

So only way is to export a dashboard configuration inside habpanel to json format and edit it manually, afterwards import it back?

But is this working with server side configs or only with local storage configs?

Also this is no usable way of doing it, to much work for every small changing.