YET another take on an alarm system

When using newUI i get this message when trying to enter the default password. [url]/api/panel_custom/alarm:1856:5 Uncaught ReferenceError: sha256_digest is not defined

I’m using 0.81.6, Hassio - I’ve restarted HA a few times.

I’m experiencing the same. Also would like to know how to fix it.

1 Like

Anyone having issue enabling MQTT on Alarm.yaml? When I enable it, HA UI doesn’t turn on. If I disable from Alarm.yaml, it works fine.

Thanks,
RT

HI, I was able to solve my problems with

2018-11-05 22:43:32 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_on: expected a dictionary. Got {‘automation.alarm_warning’}
2018-11-05 22:43:43 ERROR (MainThread) [homeassistant.core] Invalid service data for switch.turn_off: expected a dictionary. Got {‘automation.alarm_warning’}

Adding “entity_id” to lines 569, 573, 577,597,601 in bwalarm.py :

_self._hass.services.call(“switch”, “turn_on”, {“entity_id”:self.warning})
_self._hass.services.call(“switch”, “turn_on”, {“entity_id”:self.alarm})
_self._hass.services.call(“switch”, “turn_off”, {“entity_id”:self.warning})

And this warning:

Unable to find service alarm_control_panel/

Adding to ‘alarm.html’ a couple of missing break; in the switch inside callService(ev) function, like this:

		callService(ev){

			ev.stopPropagation();

			var call            = ev.target.getAttribute('data-call');	

			switch (call){

				//If the arm buttons are pressed check there are no open sensors.
				case 'arm':
					this.attemptArmMode = ev.target.getAttribute('data-arm');
					if ( this.checkOpenSensors(this.attemptArmMode) )
						return;
					this.alarmService(this.attemptArmMode);

					break;

				//The arming of the alarm has been cancelled, reset parameters.
				case 'cancel':
					this.attemptArmMode = '';
					this.resetButtons();

					break;

....
3 Likes

Fantastic will test now

Tested worked great thanks, great to get rid of those warnings

Hi,

I have the feeling that the bwalarm.py is not loading me because in the entities alarm_control_panel does not come out, do you know why it can be?

Thanks

I can’t seem to get an actual list of sensors to watch to “stick” with the newUI. I just end up with a blank config in the alarm.yaml. If I edit this in the GUI, nothing happens, and if I edit it manually, it just erases it at the next boot. So I can’t actually set an alarm because nothing is being “watched” - I can turn the alarm on, but there’s no associated sensors.

states:
  armed_home:
    immediate: []
    delayed: []
    pending_time: 0
    override: []
    trigger_time: 600
    warning_time: 0

If I turn on the “sensor” panel block in the GUI, it’s just empty.

Same problem, but I don’t see these lines in these places. in v1.1.2 for example this is the first turn_on:

new_state = self._state
if old_state != new_state:
    _LOGGER.debug("[ALARM] Alarm changing from {} to {}".format(old_state, new_state))
    # Things to do on entering state
    if new_state == STATE_ALARM_WARNING:
        _LOGGER.debug("[ALARM] Turning on warning")
        if self._config.get(CONF_WARNING):
            self._hass.services.call("switch", "turn_on", {self._config.get(CONF_WARNING)})
        self._timeoutat = now() +  datetime.timedelta(seconds=int(self._states[self._armstate][CONF_WARNING_TIME]))
        self._update_log('', LOG.TRIPPED, self._lasttrigger)

I got this working, the trick was changing to:
self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {‘entity_id’:self._config.get(CONF_ALARM)})

at all locations which were previously:
self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_WARNING)})
self._hass.services.call(“switch”, “turn_on”, {self._config.get(CONF_ALARM)})

(all different line numbers than noted in alexisromagnoli’s post)

Also as Alexis mentioned, the missing “break:” statements in alarm.html needed to be fixed as well.

I use the new ui. v 1.1.2
Please kindly advice on number 2
1.My activity page show wrong date and time. The date and time can be adjust in alarm.html
search for “computeLog(entry, type)” and re-correct to your time zone.

		computeLog(entry, type){
			switch (type){
				case 'time': 
					var t = new Date(entry[0] * 1000);
					return t.toLocaleString('en-GB', { timeZone: 'Asia/Bangkok' }).split(",")[1] + " - " + t.toLocaleString('en-GB', { timeZone: 'Asia/Bangkok' }).split(",")[0]; 
					break;
  1. I still have problem on Activity page for the information report which couldn’t read out the name of my sensor, binary_sensor “Alarm has been tripped! Sensor:” (which one is tripped?!?) as seen on picture attached.

Hello guys, is it possible to get the alarm panel in a card on the interface with Lovelace?

You can try by follow this Lovelace: Alarm card

I don’t know if this is also how the standard alarm component is behaving too, but I just realized if the alarm is armed home and an automation is trying to arm away it doesn’t do anything. I have to first disarm and then I can arm away.

Hi guys, how do I change the clock to 12 hr with AM/PM and the temperature sign from celsius to fahrenheit?.
Great project, worked right out of the box.

it you mean from alarm frontend. It is in the setting to show/hide clock with am/pm or 24 hr which read from sensor.time in ha. For temperature it read out from dark sky sensor. If your dark sky temp read out in F then show in alarm frontend with F.

Thank you for responding, which setting you are referring to?, maybe I’m missed something.
Do you mean alarm.yaml?

I assume that’s the new ui? , I have the regular one, mine looks different. Thank you for responding

I’m using new ui. On sensors page, the sensor checkboxes are not showing! Someone can help?