Alarm.com issue

I successfully setup alarm.com in HA and have been using it for a few weeks. Yesterday, it just disappeared from my front end. I haven’t had any success in getting it to work again and I’d like to see if it’s a problem on my end, or possibly a problem with the component. I’ve verified that I can still login to alarm.com with the same username and password without issue. I did install the update to HA a day earlier, but had no problem running it for the next day and half. Here’s the output from my logs:

16-03-16 13:38:55 homeassistant.components.alarm_control_panel: Error while setting up platform alarmdotcom
Traceback (most recent call last):
  File "c:\python34\lib\site-packages\homeassistant\helpers\entity_component.py", line 95, in _setup_platform
    discovery_info)
  File "c:\python34\lib\site-packages\homeassistant\components\alarm_control_panel\alarmdotcom.py", line 36, in setup_platform
    password)])
  File "c:\python34\lib\site-packages\homeassistant\components\alarm_control_panel\alarmdotcom.py", line 47, in __init__
    self._alarm = Alarmdotcom(username, password, timeout=10)
  File "C:\Users\Nathan\AppData\Roaming\.homeassistant\lib\pyalarmdotcom\pyalarmdotcom.py", line 82, in __init__
    if not self._login():
  File "C:\Users\Nathan\AppData\Roaming\.homeassistant\lib\pyalarmdotcom\pyalarmdotcom.py", line 95, in _login
    self._driver = webdriver.PhantomJS()
  File "C:\Users\Nathan\AppData\Roaming\.homeassistant\lib\selenium\webdriver\phantomjs\webdriver.py", line 50, in __init__
    service_args=service_args, log_path=service_log_path)
  File "C:\Users\Nathan\AppData\Roaming\.homeassistant\lib\selenium\webdriver\phantomjs\service.py", line 44, in __init__
    if not self._args_contain("--cookies-file="):
  File "C:\Users\Nathan\AppData\Roaming\.homeassistant\lib\selenium\webdriver\phantomjs\service.py", line 54, in _args_contain
    return len(filter(lambda x:x.startswith(arg), self.service_args)) > 0
TypeError: object of type 'filter' has no len()

And the relevant section of configuration.yaml

alarm_control_panel:
  platform: alarmdotcom
  name: Alarm
  username: USERNAME
  password: PASSWORD

Thanks for any help you can provide.

1 Like

Hey, having similar issue…you get alarm.com working?

I am also getting similar errors.

16-06-28 08:26:01 homeassistant.loader: Loaded alarm_control_panel.alarmdotcom from homeassistant.components.alarm_control_panel.alarmdotcom
16-06-28 08:26:01 homeassistant.util.package: Attempting install of https://github.com/Xorso/pyalarmdotcom/archive/0.1.1.zip#pyalarmdotcom==0.1.1
16-06-28 08:26:15 homeassistant.util.package: Attempting install of https://github.com/Xorso/pyalarmdotcom/archive/0.1.1.zip#pyalarmdotcom==0.1.1
16-06-28 08:26:28 homeassistant.components.alarm_control_panel: Error while setting up platform alarmdotcom
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
    discovery_info)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 36, in setup_platform
    password)])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 47, in __init__
    self._alarm = Alarmdotcom(username, password, timeout=10)
  File "/home/hass/deps/pyalarmdotcom/pyalarmdotcom.py", line 82, in __init__
    if not self._login():
  File "/home/hass/deps/pyalarmdotcom/pyalarmdotcom.py", line 95, in _login
    self._driver = webdriver.PhantomJS()
  File "/home/hass/deps/selenium/webdriver/phantomjs/webdriver.py", line 50, in __init__
    service_args=service_args, log_path=service_log_path)
  File "/home/hass/deps/selenium/webdriver/phantomjs/service.py", line 50, in __init__
    service.Service.__init__(self, executable_path, port=port, log_file=open(log_path, 'w'))
PermissionError: [Errno 13] Permission denied: 'ghostdriver.log'

I’m having the exact same issue. Either of you have any luck resolving it?

Have you tried downloading and compile pyalarmdotcom? Simply copy the link and extract the pyalarmdotcom.zip manually. I’ve looked into setup.py and I tried running a program and I saw a “–help” and I typed “python3 setup.py --help” and there are two interesting commands to pass, so:

[code]python3 setup.py build

if the build succeeds, then…

sudo python3 setup.py install[/code]

Enter the password and the library gets installed into your system. You will need to install selenium if you do not have the package installed. There may be a selenium package available in your Linux repository, such as python-selenium if you are running Arch Linux. Search for selenium by typing "apt-cache search selenium if you are running Debian or Ubuntu Server.

I don’t have an account with Alarm.com and I do not have a security system, so I cannot be of help if you get stuck.

Here’s the log for my errors. Doesn’t look like a github install problem. Did the others hitting this use the All-in-One install option to RasberryPi? I’m wondering if it’s a virtual environment issues with the alarm.com python module.


16-07-01 05:32:56 homeassistant.components.alarm_control_panel: Error while setting up platform alarmdotcom
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
    discovery_info)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 36, in setup_platform
    password)])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 47, in __init__
    self._alarm = Alarmdotcom(username, password, timeout=10)
  File "/home/hass/.homeassistant/deps/pyalarmdotcom/pyalarmdotcom.py", line 82, in __init__
    if not self._login():
  File "/home/hass/.homeassistant/deps/pyalarmdotcom/pyalarmdotcom.py", line 95, in _login
    self._driver = webdriver.PhantomJS()
  File "/home/hass/.homeassistant/deps/selenium/webdriver/phantomjs/webdriver.py", line 51, in __init__
    log_path=service_log_path)
  File "/home/hass/.homeassistant/deps/selenium/webdriver/phantomjs/service.py", line 50, in __init__
    service.Service.__init__(self, executable_path, port=port, log_file=open(log_path, 'w'))
PermissionError: [Errno 13] Permission denied: 'ghostdriver.log'

My environment is indeed a RaspberryPi using the All-in-One installer.

I’m using a Pi with the all in one installer also.

Well, it’s never safe to assume, but I bet it’s something with the virtualenv isolated python environment where the alarm.com module is getting denied access to something in selenium. No idea really though. Just a guess.

I’m having this same problem. I’ve tried installing selenium manually (using pip3 and, for good measure pip) as well as the alarm.com module but I still get this on start:

16-07-14 04:03:24 homeassistant.loader: Loaded alarm_control_panel.alarmdotcom from homeassistant.components.alarm_control_panel.alarmdotcom
16-07-14 04:03:24 homeassistant.components.alarm_control_panel: Error while setting up platform alarmdotcom
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
    discovery_info)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 36, in setup_platform
    password)])
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 46, in __init__
    from pyalarmdotcom.pyalarmdotcom import Alarmdotcom
  File "/usr/local/lib/python3.4/dist-packages/pyalarmdotcom-0.1.1-py3.4.egg/pyalarmdotcom/__init__.py", line 1, in <module>
    from .pyalarmdotcom import Alarmdotcom
  File "/usr/local/lib/python3.4/dist-packages/pyalarmdotcom-0.1.1-py3.4.egg/pyalarmdotcom/pyalarmdotcom.py", line 7, in <module>
    from selenium import webdriver
  File "/var/opt/homeassistant/deps/selenium/__init__.py", line 18, in <module>
    from selenium import selenium
  File "/var/opt/homeassistant/deps/selenium/selenium/__init__.py", line 18, in <module>
    from selenium import selenium
ImportError: cannot import name 'selenium'

Oddly, I can run ‘python3’ and can import selenium without issue so I’m not sure what to make of that. I’m running Home Assistant in an LXC container for both security and so I could not have to worry about virtualenv as much. Everything is being installed into the system python3. Not sure if that’s an issue - I dunno why it would be, but that is a difference from what other folks are doing.

Well I got a bit further. I was missing phantomjs (a system package) and removed Hass’s Selenium install in the deps directory so it would be forced to use the one installed with pip3. That got me further, but now I have this:

  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
    discovery_info)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 36, in setup_platform
    password)])
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/alarm_control_panel/alarmdotcom.py", line 47, in __init__
    self._alarm = Alarmdotcom(username, password, timeout=10)
  File "/usr/local/lib/python3.4/dist-packages/pyalarmdotcom-0.1.1-py3.4.egg/pyalarmdotcom/pyalarmdotcom.py", line 82, in __init__
    if not self._login():
  File "/usr/local/lib/python3.4/dist-packages/pyalarmdotcom-0.1.1-py3.4.egg/pyalarmdotcom/pyalarmdotcom.py", line 100, in _login
    user = self._driver.find_element(by=self.LOGIN_USERNAME[0], value=self.LOGIN_USERNAME[1])
  File "/usr/local/lib/python3.4/dist-packages/selenium-2.53.6-py3.4.egg/selenium/webdriver/remote/webdriver.py", line 752, in find_element
    'value': value})['value']
  File "/usr/local/lib/python3.4/dist-packages/selenium-2.53.6-py3.4.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.4/dist-packages/selenium-2.53.6-py3.4.egg/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Error Message => 'Unable to find element with name 'ctl00$ContentPlaceHolder1$txtLogin''

EDIT: Went ahead and setup a proper virtualenv for Home Assistant but ended up running into the same error as noted above.

Submitted GitHub Issue:
https://github.com/home-assistant/home-assistant/issues/2579

I mentioned this on Reddit, but I’m able to run the plugin on my OS X system. I did have to install phantomjs. Is there anything I could do to help assist such as providing logs on my current working platform.

The problem, I think, stems from having to do screen scraping of the alarm.com website itself. So the right answer is for alarm.com to offer an API (or to somehow get information off your local panel). I opened a case with alarm.com asking about an API but have not heard back yet. My advise is to do the same.

I totally agree that would be the ideal scenario. But I just don’t see this happening. I can’t say much, but the bottom line is that they don’t want anything outside of the app touching the arm/disarm of the system.

With this specific issue that you are experiencing, I don’t think it’s a problem with the web scraper. I’m using the exact plugin and I can arm/disarm. I can now use own tracks and disarm my system when I come into my subdivision. It’s really weird how I can run this with no problem (just had to install phantomjs) on my OS X, but Linux has no problem.

Not sure how decent you are with code, but there is a programmer out here who used Selenium and wrote some code on locking/unlocking the system. Just Google “alarm.com Selenium” I’m hoping I can cobble up something to open my garage door with Echo and HA Bridge. Alarm.com skill doesn’t let you do that.

Having dealt with Selenium at my day job, it seems a bit precarious. Granted if it’s all we got, it’s all we got, but it seems fairly fragile such that I would be apprehensive about adding a bunch of automation based on Alarm.com states (e.g. if the panel is armed or not) into HA. Considering that the module is currently busted, I don’t think I’m too off base here. Similarly, if they don’t want any other app touching the system, arguably that makes Selenium undesirable for alarm.com and I suspect they may try and make that difficult to use.

I certainly hope I’m wrong - I feel like if enough people ask for such a feature, alarm.com could be compelled to implement it. I’m going to periodically bug them about it every so often to make sure it’s a feature I still care about.

In the interim, my next thought is to see if I can figure out how to get some sort of information off my panel directly, or even seeing if I can at least tap into the sensors directly. That won’t help me track the state of the panel, but I can then at least make decisions on, say, if a door is open, etc.

I hear you and I definitely want an API. I definitely don’t want these workarounds. I believe that the workarounds out there will break possibly within the next year or so. I been emailing them every few months on their API and other things that really could make alarm.com better. It’s even reached the CEO’s attention. All I can say is that they really do have a passion on making things better.

I don’t personally have one yet, but the closest panel I could think of where you could get that info is a Qolsys since it essentially runs Android. I got a Simon XTi now and I don’t think there is any way of accessing that panel.

Instead of tapping it’s the panel for the sensors, you could use alarm.com’s email alerts and trigger whatever decision process you are working on. For example, whenever my interior garage door is open, I have a process of reading that email and executing a scene in my Vera. I then get voice alerts telling me the interior garage door is open.

1 Like

Forgot to reply to this but the e-mail route is actually a rather clever idea!

In case it’s of help, Alarm.com recently added Amazon Echo support, from the video demo it supports arming at the very least. I wonder if that could be leveraged for a more permanent fix.

Reference URL: http://www.alarm.com/blog/amazon-echo-alexa-voice-control

I think I may have got this going.

First install phantomjs with the link below

You’ get an error about libfontconfig so

sudo apt-get install libfontconfig.

Thank you all.