Integrate Home Assistant with Gotify for Seamless Smart Home Notifications

Want to stay informed about your smart home without relying on email or text messages? Integrating Home Assistant with Gotify provides a streamlined solution for instant, customizable notifications directly to your devices.

This article guides you through the process of connecting Gotify to your Home Assistant setup, enabling you to receive real-time alerts on your smartphone or desktop, no matter where you are. Whether it’s a motion sensor trigger, a change in temperature, or a security system update, Gotify ensures you’re always in the loop.

Why Choose Gotify for Home Assistant Notifications?

Gotify is a simple yet powerful open-source notification service that offers several advantages for Home Assistant users:

  • Privacy: Unlike cloud-based notification services, Gotify keeps your data private and secure within your own network.
  • Speed: Gotify delivers notifications instantly, ensuring you’re immediately alerted to important events in your smart home.
  • Customization: Create specific notification channels for different events or devices, allowing for organized and relevant alerts.
  • Flexibility: Access Gotify notifications on various platforms including Android, iOS, Windows, macOS, and Linux through dedicated apps and web interfaces.

Setting Up Gotify Server

Before integrating with Home Assistant, you need a running Gotify server. Here’s a simplified setup guide:

  1. Choose your platform: Gotify runs on various operating systems like Windows, macOS, Linux, and even on a Raspberry Pi. Download the appropriate version from the official Gotify website.
  2. Install and run: Follow the installation instructions provided for your chosen platform. Gotify typically runs as a background service.
  3. Access the Gotify interface: Once the server is running, access the Gotify web interface by navigating to your server’s IP address and specified port in your web browser (e.g., http://your-server-ip:8080).
  4. Create a Gotify user: For secure communication with Home Assistant, create a new user account within the Gotify interface and generate an application token. Note down both the username and token for later use.

Connecting Gotify to Home Assistant

With your Gotify server up and running, let’s connect it to Home Assistant:

  1. Install the Gotify integration: Navigate to the “Settings” tab in your Home Assistant interface, then go to “Devices & Services” and click “Add Integration.” Search for “Gotify” and follow the on-screen instructions.

  2. Configure the integration: You will be prompted to enter the following details:

    • Host: The IP address or hostname of your Gotify server.
    • Port: The port number Gotify is running on (default is 8080).
    • Username: The username you created on your Gotify server.
    • Password: The application token generated for your Gotify user.
  3. Test the connection: After saving the configuration, Home Assistant will attempt to connect to your Gotify server. A successful connection will be indicated within the integration settings.

Creating Gotify Notifications in Home Assistant

Now that your systems are connected, you can start creating automations to send notifications from Home Assistant to your Gotify app.

Example Automation: Let’s create a simple automation that sends a notification when your front door opens:

alias: Front Door Open Notification
trigger:
  - platform: state
    entity_id: binary_sensor.front_door
    to: 'on'
action:
  - service: notify.gotify
    data:
      title: "Front Door Alert"
      message: "The front door has been opened."
      priority: 5

This automation triggers a Gotify notification with the title “Front Door Alert” and the message “The front door has been opened.” whenever the binary_sensor.front_door entity changes its state to ‘on’.

Customizing Gotify Notifications

Gotify allows for various customization options to tailor your notifications:

  • Priority Levels: Assign different priority levels to your notifications for visual distinction. Higher priority notifications are displayed more prominently in the app.
  • Notification Channels: Organize your alerts by creating specific notification channels for different devices, events, or areas of your home.
  • Custom Sounds: Set unique notification sounds for individual channels or priority levels for immediate audio identification.

Gotify Home Assistant IntegrationGotify Home Assistant Integration

Conclusion

Integrating Gotify with Home Assistant provides a secure, reliable, and customizable solution for smart home notifications. With its ease of use and powerful features, Gotify empowers you to stay informed about your home’s status, no matter where you are. By following the steps outlined in this guide, you can quickly set up Gotify and start receiving tailored notifications that keep you connected and in control of your smart home.