Custom Widget: Informational Header

Thanks @gersilex for the nice widget.
I imported this to my habpanel yesterday and I am trying to play with it a little bit.
Currently in my house I have temperature sensors in different rooms and what I am trying to do is to show a notification (with label and current temperature value) if the temperature is higher than a certain value.

I have succeeded in the first part (showing notification) but couldn’t be able to show the value.

Note: I tested this on the high temperature (above 27)

my items file:

Group:Switch:OR(ON, OFF) notifications "Notification group"
String  notification_temperature_high           "🌡️ Temperature is high [%s]"         (notifications)     ["glow", "btn-warning"]
Switch  notification_temperature_low            "🌡️ Temperature is low"          (notifications)     ["glow", "btn-info"]

my rule file:

rule "temp notification"
when
    Item test_room_temp changed
then
    if (test_room_temp.state > BR2AC_HIGH_TEMP.state)
    {
        notification_temperature_high.postUpdate(test_room_temp.state)
        notification_temperature_low.postUpdate(OFF)
    }
    else if (test_room_temp.state < BR2AC_LOW_TEMP.state)
    {
        notification_temperature_low.postUpdate(ON)
        notification_temperature_high.postUpdate(OFF)
    }
    else
    {
        notification_temperature_high.postUpdate(OFF)
        notification_temperature_low.postUpdate(OFF)
    }
end

(posted an answer in separate thread)

Hi
I followed the instructions, but nothing appears in the header of habpanel.
I checked in google chrome the elements and found this:

<div class="pull-right" style="margin-left: 0.25em; display: inline-flex;">
      <!-- ngRepeat: notification in itemsInGroup(config.notifications_group_name) -->
  </div>

Could it be that this no longer works on 2.5.0M3 ?

Hey can you please show your settings of the widget and ensure that some items of your group are in the state “ON” (or the one you configured)?

I did not test it with the mentioned version, but will do mid next week.

I only tested with one item (Notification_husqvarnaPosition)

state:

openhab> smarthome:items list | grep notifications                                                                                                           
Notification_husqvarnaPosition (Type=SwitchItem, State=ON, Label=Rasenmäher Diebstahlalarm, Category=null, Tags=[btn-danger, glow], Groups=[notifications])

item/group:

Group:Switch:OR(ON, OFF)    Notifications
Switch		Notification_husqvarnaPosition			"Rasenmäher Diebstahlalarm"			(notifications)		["glow", "btn-danger"]

and here are the settings from habpanel:

Sorry, my fault, I had a typo in the group (lower/upper case) … I just saw it as I wrote the post before.
After correcting this, everything is fine.

Haha great to hear that! cheers!

Hello,

thanks for the great work. I like the widget but I am missing the symbols (like maximise, update, …).

Is there a way to integrate them in the widget?

Rgds

This is tracked in https://github.com/gersilex/informational-header/issues/1

We are waiting for ysc to add this functionality to the templating engine. Until then, there is nothing we can do, unfortunately.

@gersilex That is a petty.
One question:
How did you insert the symbols for Frost and the Bell in the item file?

see https://github.com/gersilex/informational-header/blob/master/example/notifications.items

So how do you write that kind of symbols? ASCII Code?

just copy form the documentation and paste to visual studio

You can find a lot of these on tables like this one: https://unicode-table.com/en/sets/

Please not that you need a font that has these included. Most Android/IOS/IPadOS tablets have them and you like will display HABPanel on a Tablet. This means on my Windows computer they look really bad or are not displayed at all, but when viewing on a tablet, they are fine.

The site linked above uses illustrations of the characters to help you find the right one, even if you don’t have the font installed.

Hi,

it seems this is no more working in OH3.0 - mine looks like this:

No more “pop-up” - anyone can confirm?

yep same problem here

maybe someone with a working example can tell us what to include in the HabPanel config
image

This is what I have in openHAB 2:

"header": {
                "use_custom_widget": true,
                "custom_widget": "informational-header",
                "custom_widget_config": {
                    "notifications_group_name": "notifications",
                    "notification_item_condition": "ON",
                    "send_on_click_command": "OFF",
                    "additional_classes_btn": "btn-lg"
                }
            },

thx but still get the same error
image

see here:
https://community.openhab.org/t/typeerror-cannot-read-property-navigation-header