Skip to content
The Things Stack documentation home
Getting Started Concepts Cloud Enterprise Integrations API Hardware
Getting Started Concepts
Cloud Enterprise
Integrations API Hardware
Get The Things Stack

    Recent searches

      Popular pages

      • Getting Started
      • Adding Gateways
      • Adding Devices
      • Payload Formatters
      • Webhooks
      • Authentication

      No results for “”.

      • Check the spelling, or try fewer or more general words.
      • Ask the community on The Things Network Forum
      • Contact support
      ↑↓ to navigate ↵ to open Esc to close

      Integrations

      • Overview
      • Adding Applications
      • Data Formats
      • Payload Formatters
      • Webhooks
      • Storage Integration
      • Integrate with popular IoT platforms
        • akenza
        • AllThingsTalk Maker
        • AnyViz
        • AWS IoT
        • Azure IoT Central
        • Azure IoT Hub
        • Blockbax
        • Blynk
        • Cayenne
        • Cloud Studio
        • Daizy
        • Datacake
        • Delmation Products
        • deZem
        • evrlast
        • Homey
        • InfluxDB Cloud 2.0
        • IoT in a Box
        • IoT Wonderland
        • Kaa
        • Losant IoT Platform
        • MClimate
        • my IoT open Tech
        • Qubitro
        • TagoIO
        • Telemetry2U
        • Tellsens
        • thethings.iO
        • Thinger.io
        • ThingsBoard
        • ThingSpeak
        • TTN Mapper
        • Ubidots
        • UIB
        • UnaConnect
        • Widgelix
        • Withthegrid
        • Zoho IoT
      • Other integrations
      • Application Packages
      • Examples

      Homey

      Updated 19 April 2023 Edit on GitHub
      Copy page
      • View as MarkdownThis page as plain text
      • Open in ChatGPTAsk questions about this page
      • Open in ClaudeAsk questions about this page

      Homey is a smart home hub that can be connected with practically every smart device on the market. This guide shows you how to integrate The Things Stack with a Homey application to get the best out of your LoRaWAN® data.

      See Homey support page for detailed documentation.

      Prerequisites

      1. You need to own a Homey device, such as Homey Pro.
      2. A user account on Homey app.
      3. A Homey flow set up.

      Configure The Things Stack

      Before you implement the Webhook integration, you first need to set up a payload formatter.

      The Homey application extracts two states (state1 and state2) and two associated values (value1 and value2) from uplinks, which it then uses to trigger events. See the example payload formatter below.

      Example payload formatter
      function decodeUplink(input) {
        
        // Assume 4 bytes received, e.g. 0x01, 0x9F
        // state1 & state2 must be strings/ word
        // value1 & value2 must be numbers
        
        // More examples here:
        // https://www.thethingsnetwork.org/docs/devices/bytes/
        
        var data = {};
        
          if (input.bytes[0] == 1){
            data.state1 = "On";
          } else{
            data.state1 = "Off";
          }
          
          if (input.bytes[1] == 1){
            data.state2 = "Open";
          } else{
            data.state2 = "Closed";
          }
          
          data.value1 = 5.2 * input.bytes[2];
          data.value2 = 25 + input.bytes[3];
          
        return {
          data: data,
          warnings: [],
          errors: []
        };
      }
      

      To see the payload formatter output (decoded_payload field contents) for input 00 01 05 1A, expand the example below.

      Example payload formatter output
      {
        "state1": "Off",
        "state2": "Open",
        "value1": 26,
        "value2": 51
      }
      

      To complete the Webhook integration between The Things Stack and your Homey app, you can use the Homey Webhook template.

      To integrate, you need to fill in the Webhook ID with an arbitrary value, and provide the Homey Webhook ID and Keypath Value from Homey application. You can find these values by navigating to Homey application’s Settings page.

      Homey Webhook template

      To see the values of all parameters of the Homey integration, click on the integration after you created it with the Webhook template.

      Now your Homey is finally a part of your LoRaWAN network!

      For details on setting up a Webhook integration with Homey using The Things Stack Custom webhook, see this link.

      ← evrlast InfluxDB Cloud 2.0 →

      On this page

      • Prerequisites
      • Configure The Things Stack

      Sections

      Getting Started

      Concepts

      Cloud

      Enterprise

      Integrations

      API

      Hardware

      Sitemap

      View our Sitemap

      Contributing

      GitHub

      About Us

      The Things Industries

      Privacy Policy

      Cookie settings

      Cookie Settings

      We use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.

      Cookie categories