/magtag-mqtt-remote

Display smart home status and control smart home devices over MQTT

Primary LanguagePython

MagTag MQTT Smart Home Remote

Display smart home status and control smart home devices over MQTT.

Quickstart

  1. Clone this repository and its Git submodules:

     git clone https://github.com/garrettheath4/magtag-mqtt-remote.git
     cd magtag-mqtt-remote/
     git submodule init && git submodule update
    
  2. Plug in MagTag to your computer with a USB-C cable and turn the physical switch on it to the On position. A flash-drive-like file storage device called CIRCUITPY should automatically mount.

  3. Run make to copy the code and required libraries from this repository to the CIRCUITPY drive.

  4. Create a secrets.py file inside the CIRCUITPY drive with the following contents:

     # This file is where you keep secret settings, passwords, and tokens!
     # If you put them in the code you risk committing that info or sharing it
    
     secrets = {
         'ssid': 'myWifiNetworkName',
         'password': 'myWifiPassword',
         'aio_username': 'garrettheath4',
         'aio_key': 'aio_abcdefg1234567ABCDEFG1234567',
         'timezone': "America/New_York",  # http://worldtimeapi.org/timezones
         'broker': '192.168.0.50',  # IP or hostname of MQTT server
         'port': 1883,  # MQTT port, default: 1833
     }
    
  5. Wait for the MagTag to restart and the code will run automatically.

Requirements