The items are created using the REST API. If you want them to be truly persistent, go to REST API, and delete those item configs, and just add them through an .items file. Make sure the config is a JSON.stringified string
@luckymallari I have a couple of feature suggestions
- Could the screensaver go on after x seconds in combination with another switch? I have a fixed panel for mornings and another for kids chores in the afternoon but would like to Rotate through panels in times other than this. Having a switch item in the config, I could then turn this in and off with cron rules
- Could you prioritise theatre mode? Looks like if screensaver is running theatre mode doesnât kick in
- Any way to return from screensaver to a specific panel?
Love your work
Been busy. Will work on this soon
Question, I keep losing the settings for HPEx on my raspberri pi. I do not fully understand how the panel settings sync to the server. Would anyone have details on how/when does the settings get sync-ed to the server?
Been running mine for over a year now; hereâs how I got it setup on 3 different panels. Two are vertical and one is horizontally mounted.
Items:
// Vertical Tablets
Switch Bedroom_Mode_Switch "Upstairs Bedroom Mode [MAP(screen_dark_bright.map):%s]" (HomeState, Group_HabPanel_Dashboard) [ "Switchable" ]
String habpanelEx_Bedroom_V "[%s]" (HomeState, Group_HabPanel_Dashboard)
Switch Theater_Mode_Switch "Basement Theater Mode [MAP(screen_dark_bright.map):%s]" (HomeState, Group_HabPanel_Dashboard) [ "Switchable" ]
String habpanelEx_Basement_V "[%s]" (HomeState, Group_HabPanel_Dashboard)
// Horizontal Tablet
Switch LivingRoom_Mode_Switch "Livingroom Mode [MAP(screen_dark_bright.map):%s]" (HomeState, Group_HabPanel_Dashboard) [ "Switchable" ]
String habpanelEx_Livingroom_H "[%s]" (HomeState, Group_HabPanel_Dashboard)
Rules:
In Startup
// Setting Screen Saver Item Values
habpanelExConfig.postUpdate('{"config_item":"habpanelExConfig","initComplete":true,"isShowInDrawer":true,"screensaver":{"isEnabled":false,"timeoutSeconds":300,"dashboardList":"","durationSeconds":300,"isFullScreen":true},"theaterMode":{"isEnabled":true,"isOn":false,"color":"rgba(0,0,0,0.90)","triggeringItem":null},"panelConfigItem":"habpanelExConfig"}')
habpanelEx_Bedroom_V.postUpdate('{"config_item":"habpanelExConfig","initComplete":true,"isShowInDrawer":true,"screensaver":{"isEnabled":true,"timeoutSeconds":300,"dashboardList":"Basement-Vertical,Garage-Vertical,MainFloor-Vertical,Cameras-Vertical,Covid19-Vertical","durationSeconds":120,"isFullScreen":true},"theaterMode":{"isEnabled":true,"isOn":false,"color":"rgba(0,0,0,0.90)","triggeringItem":"Bedroom_Mode_Switch"},"panelConfigItem":"habpanelEx_Bedroom_V"}')
habpanelEx_Basement_V.postUpdate('{"config_item":"habpanelExConfig","initComplete":true,"isShowInDrawer":true,"screensaver":{"isEnabled":true,"timeoutSeconds":310,"dashboardList":"Basement-Vertical,Garage-Vertical,MainFloor-Vertical,Cameras-Vertical,Covid19-Vertical","durationSeconds":130,"isFullScreen":true},"theaterMode":{"isEnabled":true,"isOn":false,"color":"rgba(0,0,0,0.90)","triggeringItem":"Theater_Mode_Switch"},"panelConfigItem":"habpanelEx_Basement_V"}')
habpanelEx_Livingroom_H.postUpdate('{"config_item":"habpanelExConfig","initComplete":true,"isShowInDrawer":true,"screensaver":{"isEnabled":true,"timeoutSeconds":320,"dashboardList":"Our House,Cameras,Up Stairs,Basement,Loft,Garage,RainViewer,Stocks,Covid19","durationSeconds":140,"isFullScreen":true},"theaterMode":{"isEnabled":true,"isOn":false,"color":"rgba(0,0,0,0.90)","triggeringItem":"LivingRoom_Mode_Switch"},"panelConfigItem":"habpanelEx_Livingroom_H"}')
In Events:
// Turn Tablet Bright in Basement
Theater_Mode_Switch.postUpdate(OFF)
Thread::sleep(1500)
Theater_Mode_Switch.postUpdate(OFF)
// Turn Tablet Dim in Basement
Theater_Mode_Switch.postUpdate(ON)
Thread::sleep(1500)
Theater_Mode_Switch.postUpdate(ON)
The OH server really has nothing to do with the HabPanelEx plug-in. Itâs strictly at the client side that is driven by item values. You have to go to the tablet (client) and configure HabPanelEx which it will get cached in the browser settings after you set it up.
Best, Jay
Wow nice did not think you could push these from the server - that is exactly what I was looking for⊠Iâm not familiar with startup where do you write these rules?
You have to create a rule that is triggered by the event âSystem startedâ This is done in a .rules file. OH has lot to offer and it can get complex and overwhelming very quickly. If you are new to OH I would suggest you take some time to read through the tutorials and examples. There is a ton of good info there and you can learn a lot by following and building off others example.
rule "Onstartup"
when
System started
then
...
end
Iâve written bunch of rules but did not come across the âsystem startedâ event. And there is something else you might be able to confirm with the habpanelExConfig:
- most elements in the panel seem to be persisted on the server but I guess this specific one is only cached on the client (and loaded from server habpanelExConfig string item)?
- could I just persist that value to the database instead of having it in âsystem startedâ rule to make sure it doesnât get reset after rebooting my server?
Thanks
Erik
I donât think persistence alone will work, although I havenât explicitly tested it. In my setup I do have it persisted, but I donât think my iPads retain their settings through a restart without the startup event initialization. However it has been some time, over a year ago, since I implemented my setup. It is certainly something you could try and report back if it works. BTW I wasnât trying to insult you or belittle your expertise. Itâs just that Tutorials and Examples is an often overlooked resource, even by experienced users. If I offended you I apologize.
Correct. If you clear the cache in the browser on the client, youâll have to reload it manually at the client again within HabPanelEx panel config.
Best, Jay
no offence taken at all, I really appreciate all the help and feedback here and there is always more to learn from tutorials and examples
Anyway, going to try setting up a persistence on this value and see if that works - this could be an option with almost no code.
Ok so no luck with persistence - havenât checked the sqlite db content but the group was supposed to be persisted. Also another thing I figured out is that I need to have the browser open on the habpanelex to enable the screen saver. If my initial URL is any of the other panels then the screen saver never kicks in.
Hi together,
I just found this extension for HabPanel and tried to install it. Unfortunately I only get a blank widget without showing any of the configuration possibilities.
Does anybody know if HabPanelEx works also with openHAB 3.0 or might this be the issue?
Iâm having the same issue (OH3.1)
Followed the instructions. Just getting a blank panel.