Skip to content

How to Test & Debug

Elahd Bar-Shai edited this page May 31, 2023 · 12 revisions

Below are instructions for performing various testing and debugging actions to help developers debug issues.

Install integration development version

  1. In Home Assistant, go to HACS and click on the Alarm.com integration. This will open up the description page for the Alarm.com integration.

  2. Click on the three dots on the top right, then click on "Redownload".

  3. From the "Select version" menu, select "master", then click download.

  4. Restart Home Assistant.

Get debug data for a single entity

  1. In Home Assistant, go to Settings > Devices & Services > Devices. You'll see a list of all of your devices.

  2. Click on the device for which you want to get debug information. That will take you to the device's information page.

  3. Click on "PRESS" for the device's Debug entity:

  4. Go to Settings > System > Logs and click on the debug log for your device:

  5. Use the copy button in the log entry's modal to copy and paste the required information into your GitHub comment. Please don't post a screenshot!

Enable code debugging

  1. Adding the following to Home Assistant's configuration.yaml file:
logger:
  default: warn
  logs:
    custom_components.alarmdotcom: debug
    pyalarmdotcomajax: debug
  1. Restart Home Assistant
  2. Perform the Alarm.com action that needs debugging.
  3. Review the logs by going to Settings > System > Logs.
  4. Once on the logging page, click on the "Load Full Logs" button at the bottom of the page.
  5. Use Ctrl+F to use your browser's search function to find the relevant entries.
  6. When done, turn off debugging mode by removing the lines you added to configuration.yaml and restarting Home Assistant.

Install the ADC command line tool

WARNING: The adc command line tool dumps information about your Alarm.com devices. This may leak sensitive information such as your location, your name, or names of your family members (i.e.: if your devices have names like "Noah's Bedroom Right Window"). When posting, be sure you manually remove any information that you don't want to share publicly.

  1. Install Python >= 3.10.
  2. Install pyalarmdotcomajax via pip: pip install pyalarmdotcomajax. (If you're being asked to install a specific version (e.g.: v0.5.0-beta), use the format pip install pyalarmdotcomajax==0.5.0-beta.)
  3. You can now use ADC in the command line. Below are useful commands:
Name Command Description
Basic adc -u "YOUR_USERNAME" -p "YOUR_PASSWORD" get Shows human-readable device statuses.
Raw JSON adc -v -u "YOUR_USERNAME" -p "YOUR_PASSWORD" get Same as above, but returns the server's raw responses broken out by device type.
Stream Live Events adc -u "YOUR_USERNAME" -p "YOUR_PASSWORD" stream Stream alarm events as they happen.
Code Flow Debugging adc -d -u "YOUR_USERNAME" -p "YOUR_PASSWORD" get Shows debug message from pyalarmdotcomajax. Useful for determining where in the connection process a feature is breaking.
Help - General adc -h
Help - get Command adc get -h The get command retrieve device states.
Help - set Command adc set -h The set command changes device settings. It currently only works for Skybell HD doorbells.
Turn off Skybell HD's indoor chime adc -u "YOUR_USERNAME" -p "YOUR_PASSWORD" set -i 634798620-3745 -s indoor-chime-on -k False Assumes Skybell HD's Alarm.com ID is 634798620-3745. See the pyalarmdotcomajax README for more set commands.
Clone this wiki locally