YET another take on an alarm system

like this mine shows only a portion (I did change also to 1080 and 1920 but same result). Any hint?

This alarm system looks awsome so I’m trying to get it up and running on my own install, installation worked fine and I can arm the system… but when I try to Disarm it I just keep getting this error in the logs:
[EDIT] Apparently I can arm it with my regular code and disarm it only with the panic code…?

Thu Feb 15 2018 12:58:13 GMT+0100 (CET)
Error executing service
Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/core.py”, line 1010, in _event_to_service_call
yield from service_handler.func(service_call)
File “/srv/hass/hass_venv/lib/python3.5/site-packages/homeassistant/components/alarm_control_panel/init.py”, line 140, in async_alarm_service_handler
yield from getattr(alarm, method)(code)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/hass/.homeassistant/custom_components/alarm_control_panel/bwalarm.py”, line 381, in alarm_disarm
if not self._validate_code(code, STATE_ALARM_DISARMED):
File “/home/hass/.homeassistant/custom_components/alarm_control_panel/bwalarm.py”, line 487, in _validate_code
self.check_open_sensors()
File “/home/hass/.homeassistant/custom_components/alarm_control_panel/bwalarm.py”, line 364, in check_open_sensors
if self._hass.states.get(sensor).state in self._supported_statuses_on:
AttributeError: ‘NoneType’ object has no attribute ‘state’

Hi everyone,

I have pushed a bug fix for the code issue.

I have noted a lot of the issues above and will work through them tonight.

Conscious the documentation needs a heavy overhaul too to answer a lot of the repeated queries.

1 Like

Also a big thanks to the anonymous $20 ethereum donator!

@Sunonline

It looks as though HA has fixed this:

javascript_version
(string)(Optional)Version of the JavaScript to serve to clients. Options: es5 - transpiled so old browsers understand it. latest - not transpiled, so will work on recent browsers only. auto - select a version according to the browser user-agent. The value in the config can be overiden by putting es5 or latest in the URL. For example http://localhost:8123/states?es5

Default value: auto

The auto setting should default the java version depending on your browser

1 Like

(16/02/18) NEW FEATURE - Custom Panel allowing custom html/polymer code!!! Use this to bring any other features you would like to see for example displaying live camera feeds, a rotating image gallery, custom HA buttons and sensors. To use this enable the custom panel in alarm.yaml (custom_panel: True) then ensure you take a copy of custom-element.html and add it to you www/alarm/ folder. Edit the html code between the template tags. I’m have added a custom sample folder where I will upload examples of ‘things’ which can be added here. Please contribute!!!

(16/02/18) NEW FEATURE - Added the ability to hide the sensor groups (all sensors, immediate sensors, delayed sensors, inactive sensors) from the display. Open sensors will still appear on the display. (hide_sensor_groups:True) see alarm.yaml for details.

(16/02/18) NEW FEATURE - Added the ability to mask the passcode during disarm. The feature will be enabled by default. See the alarm.yaml for extra information. Credit @mikefero

(16/02/18) BUG FIX - Added further code to force the sidebar to hide when the alarm is armed. This prevents a simple refresh showing the sidebar.

(16/02/18) BUG FIX - Given the time label has caused folk issues I have decided to drop the javascript implementation and use the time derived from HA. Ensure you have a time sensor setup in your sensors.yaml:

  • platform: time_date
    display_options:
    • ‘time’
4 Likes

Thank you very much again for updating the alarm control panel. Test on HA 0.63.2

I have try your latest update 16-2-18.

hide_custom_panel: False <== then I change the text in custom_element.html / located www/alarm/custom_element.html. Nothing show in alarm panel.

As you mentioned ability to hide the sensor group. I wouldn’t like to hide the sensor groups so I hide_sensor_groups: False / Still I cannot see any sensor.

hide sidebar work very well.
Time label work very well.

Whoops… could you try again please? I have pushed a bug fix

Wow lovely, excellent job

1 Like

Good stuff man! Enjoy a beer or two!

1 Like

Thanks Mate!, Much appreciated.

Another update, this one personally feels a biggy (took a lot of time and effort) as I have had a few power outages recently. As always test it to ensure it works with your setup.

  • (16/02/18) NEW FEATURE - PERSISTENCE!!! Enabling persistence in the alarm.yaml file allows this component to save the alarm state everytime it changes. This means if there is a power outage or server crash/failure then upon restart HA will auto load the previous alarm state. This has not been tested in windows but in theory should work. Ensure HA has permission to write to the config folder as this creates a new file named alarm.json.
4 Likes

I think we need a HA style component help page to track all of these features/options. When I get time I will knock one up.

I also like the idea of a simple/clean interface for mobiles/low end devices. I’m going to create this as a separate panel.

Could you explain the benefit to this?

Being able to change the code in the frontend would be a security risk. I am looking to implement multiple codes as suggested above with possibly even an option to expire on a certain date.

2 Likes

Thank you so much. Test with HA 0.63.2

Sensor has shown according to the setting in alarm.yaml.

custom_element.html, now show “this is a custom test message, add your custom goodies here whether it be live video cams, custom HA buttons/Sensors, rotating image gallery whatever takes your fancy” although I have change to “Camera”

Also, enjoy the beer ^^

Show sensors, cannot change text from custom_element.html


PC clear all browsing history. use default theme. On PC see only the frame of the camera no picture.

HA App on IOS. I can see camera works correctly.

It will be very usefull for people who dont know how to edit de .yaml file, I think that could change the password from front end it is a must, also usefull for design products with commercial purpose.

@Sunonline so it works on the iphone app but not your PC?

Which browser are you using?

Could you post your custom-element code?

pc - google chrome / phone - homassistant app - google chrome.
currently on pc show text Camera and iframe no live picture.
phone show text and live camera correctly.

<div style='text-align: center;'>
    Camera
</div>      
<div align="center">
	<iframe  src="http://cameraip:port/tmpfs/auto.jpg" height="352" width="640"></iframe >
</div>