Alarm.com List Index Out of Range

Same here, filling up the log…

Running 0.106.6 Alarm.com went offline earlier today, rebooting has not fixed this issue.

Not working for me either. Mine is a subscription through CPI.

It also stopped working for me yesterday morning. Probably something changed on Alarm.com’s side.

Following. Same issue here.

Same issue again. It looks like the alarm.com/pda login page is no longer up and is redirecting to the regular login page.

Ditto same error

Looks like it maybe time to move the plugin to their web api.

There’s a working example here.

I can confirm that the status and arm/disarm commands return correctly but that’s about all the testing I’ve done so far.

The example doesn’t demonstrate how to collect sensor status, however that information maybe encoded in the responsecontent on line 101.

Looks promising - which I knew enough Python to help create a more ‘official’ integration. Fingers crossed someone has the time / know-how!

I also don’t know enough python to get it into the official integration, but this pull request got me back up and running. As a temporary fix until the official integration is corrected, I just renamed the new pyalarmdotcomajax.py to pyalarmdotcom.py and overwrote the version on my server (after making a backup of course). Restarted home assistant and I was back up and running.

Hope this helps someone else.

@mattcooksey1, thanks for the tip! Where did you find the pyalarmdotcom.py file on your server?

Thanks for the pointer Matt!

Looks like the homebridge node interface here has a full implementation of the web api, including sensor states.

Check the error that home assistant threw since it might be different for your system but in my case it was /usr/local/lib/python3.7/site-packages/pyalarmdotcom/pyalarmdotcom.py.

I bolded it below:

Error while setting up alarmdotcom platform for alarm_control_panel
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/pyalarmdotcom/pyalarmdotcom.py”, line 188, in async_login
self.state = tree.select(self.ALARM_STATE)[0].get_text()
IndexError: list index out of range

1 Like

I can confirm that using the ajax version in the pull request restores most of the original plugin functionality. Importantly, the ajax version does not populate sensor status information – which is a bummer.

BTW, when using HASSIO it’s recommended that you put the modified files in config/custom_components (as opposed to modifying the originals in site-packages).

I tried to go down the custom_components route and couldn’t figure it out. Do you have any pointers of how to get that working?

Here’s what I did:

  1. Create directory config/custom_components/alarmdotcomajax

  2. Copy pyalarmdotcomajax.py from the PR to config/custom_components/alarmdotcomajax/

  3. Copy alarm_control_panel.py from the github repository to config/custom_components/alarmdotcomajax/

  4. Update line 5 of alarm_control_panel.py to say:
    from .pyalarmdotcomajax import Alarmdotcom

  5. Add an __init__.py file in config/custom_components/alarmdotcomajax/ containing the following:
    """The alarmdotcom component."""
    from .pyalarmdotcomajax import Alarmdotcom

  6. In your configuration.yaml, change
    platform: alarmdotcom
    to
    platform: alarmdotcomajax

You may want to copy that section and comment it out to make it easy to switch back once the official plugin is fixed.

To revert, just replace alarmdotcom in your configuration.yaml and delete directory config/custom_components/alarmdotcomajax/

4 Likes

Thank-you… works great!

Step # 4 - Update alarm_control_panel.py - where do i find that file?

@aechelon that worked perfectly - thanks for posting!

@samceccola, the alarm_control_panel.py file is the file you downloaded in step 3 from the main GitHub repository. You download the file, update line 5, and then save it in the folder you created in step 1.

@aechelon thanks so much for teaching me! I had everything right except step 4.