Bwalarm (akasma74 edition)

thanks for your feedback.
to be honest with you, I know that the “hide sidebar” is not working properly, mainly because it’s still using the old method and since then HA’s interface has changed dramatically. the trouble is I haven’t investigated it further as a) anyone who knows how will get through anyway and b) ordinary burglars would rather smash the tablet :wink:

All I can say atm is you can try built-in HA features to restrict dashboards/views to certain users or custom header component - that the choice the frontend devs gave me when I enquired.

I also know about the issue with restarts and open sensors, it’s on my to-do list. Just don’t want to rush as all changes should not break anything.

With the latest HA release you might be able to do so, check it out.
I use WallPanel for Android App and it just navigates to an URL I provide (http://hassio.local:8123/alarm) or HA’s ip address instead of name.

Thanks for quick response!

I will try Custom Header, looks like it may do what I need

On the Tablet, maybe the “secret” is to use a URL,a s you suggest, rather than the HA app. I’ll try that. The Fully Kiosk system has browser capability, so that may be best way to go. I like the Fully Kiosk because it will wake the tablet when the camera senses motion. But if that does not work out, I’ll give WallPanel a go.

Thanks
Chuck

WallPanel can do both things (but mine struggles to detect motion when there’s not enough light - but then I wake it up via MQTT/REST when nearby PIR/door sensor triggers). Take a look at the website, it’s quick to read.
It has some issues but I’ve been using it for 2 years now and other options are less attractive to me (keep checking them from time to time). YMMV :wink:

From the tablet, go into the sidebar, and then down to your account and select the always hide sidebar. The option, at least in my case with two tablets and fully kiosk, is tablet dependent and not permanent. If you restart the tablet, you’ll have to do it again. It does prevent the sidebar though.

Greg

So you’re talking about HA user settings, right?
They should apply even after restart as soon as you use the same user name, and they should apply on every device this user connects to HA from. That’s how it was designed in HA.
I’ll double check my config and repost back.

UPDATE: Always hide the sidebar is per device, i.e you need to configure it for your user on each device (and by default it is off).
If device is restarted, the setting retains its state (as it’s held by HA).

And the main thing - it’s still possible to swipe from left to right to show the sidebar.
So ideally one need to take additional measures like using custom header, Fully Browser (not sure).
Or just use a user account without admin rights and restrict views/set a separate dashboard for that device.
Plenty of choice.

Those who use Lovelace to set the alarm - could you describe your “ideal” alarm card (and what you cannot get using the standard one)?
What would you like to see on it, should it take the whole view (panel_mode) or not, do you want to stick to standard Lovelace alarm card or happy to to install some custom cards to get what you want etc?

The reason I’m asking is I played with the alarm recently trying to get feedback from it into Lovelace and somehow let users know that there are active sensors so it won’t arm when you click say, ARM AWAY.
Here’s the result with only standard LL cards, all you need to have is a small package.
Screen Shot 2020-04-10 at 17.56.27 (2)

Of course, the sensors bit can be polished as it’s a markdown card.
It can be done much prettier but you’ll need to install some custom LL cards.

Please let me know what you think about it.

3 Likes

Nice. The active sensor list would be great. Other than that the only thing that needs improving over the original card is a keypad font you can read without a microscope.

I would prefer a card to full panel.

what is it?

the only way I can do that is using card-mod.

it’s easily done :wink:

The list of sensors you have shown in the card

Well that’s what I do now. Maybe I misunderstood. I thought you were making a new card.

yeah, that was the reason to mess around with it. it can be done so I thought why not?

well, it’s not easy to make a custom card and not everyone is happy to use custom cards.
this card is basically an alarm card, a markdown card and 2 buttons in a conditional card and it took me a couple of hours to create the whole thing from scratch.
a new card would take much longer as I have no experience.

the most important thing now is to get an idea what people need most from such a card in order to decide which way to go.

Hi. I’m using node red for my alarm. I’m trying to integrate Automations into my flows

I’m using a function node link to an email node, The email subjects works. the email body shows data…

Below is my function node code.

msg.topic = "Home Assistant - Alert - Automation"
msg.payload = { "data": {message: 'ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(".")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(".")[1]].name }}'} }
return msg;

Please help me fix my code so it shows which sensor triggered the alarm

so what’s wrong with the code then?

what about this?

msg.payload = {
  'data': {
    'message': >
      ALARM TRIGGERED by {{ states[state_attr('alarm_control_panel.house', 'changed_by')].name }}
  }
}

I was originally getting the below text in the email body

{"data":{"message":"ALARM TRIGGERED!!! {{ states[states.alarm_control_panel.house.attributes.changed_by.split(\".\")[0]][ states.alarm_control_panel.house.attributes.changed_by.split(\".\")[1]].name }}"}}

im now getting syntax errors in node red with the new code

You need to say so. I think that’s because you’re doing it in a NodeRed function so there is no way to use Jinja templates.

but yo won’t tell us what it complains about, will you? Actually, don’t bother as I can see the issue now.
I have 0 experience with NodeRed so if you don’t help me (by providing info) I won’t be able to help you.

Please explain what you want to achieve and why you cannot use a normal automation for that?

Your post on the Lovelace card is timely, as I was just preparing to ask a related question.

So, first, on your card: I would like almost precisely what you displayed. A way to see open sensors, and a way to arm with overriding those active sensors. It looks to me like you are heading in the exact direction I would like to see! And I would probably put it as a card, not as a panel. But if someone put it as the first card and enabled panel mode, then that should take care of anyone wanting it to be full panel.

Now, on my question (which may become mute). I wanted to display your alarm panel in a card rather than a separate page with left-bar link. So I tried Iframe with the full URL:

type: iframe
url: 'http://192.168.1.xxx:8123/alarm'
aspect_ratio: 75%

However, this loads a complete new instance of HA. While it works in my PC browser, and also from WallPanel, it does not work from HA App on Android (it does not load HA again). Also, in WallPanel, it loses connection in the iframe instance and must be reloaded.

So, is there a proper way to put your existing alarm interface into a Lovelass panel, probably through iframe but with a more direct URL? Obviously, if you complete what you have proposed above, then this is not needed, but for now I would like to know if there is an existing way to display your alarm in a Lovelace panel.

Thanks
Chuck

If you search this topic by iframe you should find some success stories.
Have to admit that I haven’t tried as a) I like the separate panel, it works fine in my WallPanel app and b) eventually it might be converted into a proper Lovelace card.
So officially this component should be controlled via its panel. Yes, it is possible to do that from LL alarm card, but it’s not 100% replacement and people do it at their own risk until we have a proper alarm card.

The difference between the current panel and the mock LL card I showed is the former allows for many things like changing settings, checking logs, adding custom panels etc so it’s much more complex thing and converting it into a card is a serious task. The downside of the current panel is it takes a lot of time to load it and sometimes it’s an issue.

Ideally I’d like to re-design it so we have lightweight LL card with rich functionality. Still thinking about ways to achieve it in terms of look and feel, internal design etc.

Yes, I agree that your panel has better features. I was hoping to put your panel in a card, using the Ipanel. I have not found via google a good way of doing that yet. I found some very old posts that do not appear to be currently relevant.

I will watch as you progress on a lightweight Lovelace card with more features than the Alarm Card.

Chuck

have you seen this?

Yes, and his iframe card is same as mine. It will not display in HA App, and disconnects after some time in WallPanel. I was hoping there was a way of specifying your panel without using HA/alarm, which loads a whole new copy of HA.

Chuck

@michaelhdmd, from January. I tried putting the BWAlarm in a iframe, using your code. Ran into two issues: 1. it would not display on HA App on Android, though it works in a browser and on wallpanel. 2. The BWalarm in the iframe would disconnect with inactivity, and manual refresh took way too long (would reload main HA, then reload HA in the iframe).

Did you see such issues?

Works fine as a full panel as originally intended.

Thanks
Chuck