Lovelace Notify - Notifications and Alerts in Lovelace

I’m releasing a new custom component called ll_notify. It allows you to easily add notifications and alerts to a Lovelace dashboard.

Check it out and let me know if you run into any problems.

5 Likes

Hi Ross, are the permanent notifications persistent through a Home Assistant restart?

Probably not - these are Javascript notifications and if the web page refreshes, they go away. So you’d use persistent_notifications for a persistent one, and ll_notify if you want it right in your face, rather than a badge on the Notifications menu item that you then need to click through on. Or you could use both.

Unfortunately Home Assistant persistent notifications aren’t that permanent either. That’s why I was hoping yours might be.

Actually, just tested - it will persist over a restart. But still, I’d use persistent_notifications if you can’t miss it.

Oh - now that you mention it, that’s right. Whoops! Mine are actually a bit more persistent, but with the big caveat that if the page refreshes, they go away.

1 Like

Ross! Thanks so much for putting this together, it’s just what I was looking for. Quick question (I’m sure it’s obvious) how do you create a permanent notification as in the example? So it just sits in the bottom corner until it’s interacted with?

Thanks again! Awesome work!

Hey @mboarman , glad you like it!

It’s been a long time, so try this: wait: 0

The good news is that this has worked for me for a year without any changes. So while it may look stale, I think it’s just stable.

Let me know if that doesn’t work and I’ll dig into the code.

1 Like

@rr326 Brilliant! So easy…I should have guessed. Thanks again, will definitely be utilizing this regularly!

Hi @rr326,
Thanks for this great component!
It works very well on my desktop, but unfortunately nothing is displayed with fully kiosk (android 11 tablet).
I might be a Js limit from Fully Kiosk, but no option solves the problem :frowning:
Does anyone also have this problem?

Ok never mind.
I’ve just found the problem: the user on fully kiosk is not admin, which causes an “Error handling message: Unauthorized” on WS API.
Strangely it seems to be an old bug while I’m on version 2022.4.1.

Glad you figured it out! For others - I use Fully Kiosk and have had no problems so I know it can work.

Yes it works great with fully kiosk, thank you ! :slight_smile:
The problem comes from Websocket Api with non admin user.

I @rr326 many thanks for this very userful integration. Now I am addicted to this component :-). Unfortunately, I have notice that for NON-Admin user it still not work. Have you resolved this kind of problem?

It would be really useful for me because I have a contol panel, for all user, in my home without the admin permits in order to improve security in my home assistant system.

Thanks in advance for your attention!

Hi @Kosmael - I’m glad you like it.

From your description, I’m not sure why it wouldn’t be working. I don’t think it needs root permissions or anything. I probably just needs the same permissions that your HA runs under. Same owner and group. Check the ll_notify directory for it’s permissions and owners vs the rest of HA config.

Also, are you sure tht Javascipt is working on your browser? That could be another issue. And look in your browser console - maybe that will give you some clues.

Finally, look at the https://alertifyjs.com/ website and repo. ll_notify is a thin wrapper on alertify, so if it isn’t working, perhaps you’ll find open issues (or closed ones) on their repo.

Let me know if you find anything specific in ll_notify that I could easily fix.

Many thanks for your fast reply.

ll_notify perfectly work on my web browser but when I log into HA with a non-admin user I receive this error:


Logger: homeassistant.components.websocket_api.commands
Source: components/websocket_api/commands.py:149
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10 febbraio 2024 alle ore 16:58:02 (9 occurrences)
Last logged: 15:53:43

Refusing to allow controlpanel to subscribe to event ll_notify/get_defaults

Have you any idea to resolve this issue?

Many thanks for your advices :slight_smile:

I don’t have any great ideas. Debugging permissions problems is always a pain. I run everything on my rpi as the pi user, with non-root, but otherwise high permissions, just to avoid this issue.

Some ideas:

cd homeassistant/config/custom_components
ls -al
# See what group ll_nofify is. If it is different from others, change it with
# chmod
groups
# See what groups your non-admin person is. Maybe add to pi group?
sudo adduser non-root-user pi
# Try that?

Also make sure ll_notify has read permissions for whatever group you belong to.

If that doesn’t work, I think you’re on your own. Not many people use ll_noitfy, so it’s not worth me trying to debug one-off issues that effect only one person.

I wish you luck! If you figure it out, please post your solution in case anyone else runs into it. And if there’s a bug, either post a PR, or let em know and I can try to fix it, but be quite specific so I know exactly what needs to happen.

Good luck @Kosmael !

1 Like

Did you solve the issue? I have the same problem.