To use everything, you will want to make sure your Home Assistant instance is up and running. Next you will want to make sure your MacroPad is running its code. You can use a serial console to see that it is "Waiting for Server".

You can then start the server by going to the folder containing the file and typing the following:


The MacroPad should connect and, if everything is configured correctly, you should be able to control your lights.

Code Walkthrough

The code is broken down into three main pieces. Because the code is a bit complex, it is separated into a separate page.

This guide was first published on Aug 11, 2021. It was last updated on Jul 18, 2024.

This page (Running the Code) was last updated on Mar 08, 2024.

Text editor powered by tinymce.