Flexopus Home Assistant integration

Create a smart office by connecting IoT and smart-home devices to Flexopus through the Home Assistant automation platform

Home Asssitant Logo

Disclaimer

The Flexopus Home Assistant integration is available in an experimental beta phase. As we develop and test further, breaking changes can be introduced that may require the reconfiguration of the integration. 

About Home Assistant

Home Assistant is one of the most popular open-source home automation platforms. It supports more than 2500 platforms, including proprietary solutions (Google Assistant, Google Cast, Apple HomeKit) as well as other well-known IoT protocols (MQTT, Z-Wave, ZigBee, Matter). In addition to the official integrations, there is a large number of community integrations developed and tested by home automation enthusiasts. 

Although the main focus of Home Assistant is to automate personal smart homes, we find it an excellent choice for smart office automation purposes. The power of the platform lies in connecting a broad spectrum of smart-home solutions, even brands that are specialized in office environments.

Home Assistant is a self-hosted platform, thus it requires some technical expertise to set up and operate. Please refer to the documentation at https://www.home-assistant.io/installation to explore the different setup options.

The Flexopus integration

We have created the Flexopus integration to provide basic occupancy information about the status of bookable objects in your locations. Using this connector interface, your Home Assistant instance can connect to the Flexopus servers and poll them for information with a predefined interval. Our servers then reply with the current and expected occupancy status of the bookable objects.

Flexopus Home Assistant IntegrationOnce you have this connection, you can automate your office however you please. Some example scenarios:

  1. Only turn a desk lamp or room ceiling light on, when there is a booking on, or coming up.
  2. Adjust room temperature with your smart thermostat based on the occupancy of the given area. You can save significant energy by not heating up or cooling down empty rooms.
  3. With configurable smart locks, you can restrict room access to the period of bookings.
  4. Set up occupancy indicators (eg. colored LEDs) to mark the status of each desk, parking spots or even meeting rooms.
  5. Arm or disarm alarms automatically

With such automations, you can use Flexopus to save energy and to facilitate the everyday booking process.

Install the integration

As of November 2023, Flexopus integration is available as a custom integration, not as part of the core of Home Assistant. This does not put any limitations to the operation, however, the configuration process is slightly longer than with an official integration. We are working hard to get to a point where the Flexopus integration works out-of-the-box.

Thank you for your patience.

Prerequisites

We assume you have a running Home Assistant instance. To get started, you can follow the guide at https://www.home-assistant.io/installation, or consult the community with any specific question.

Code

The code of the integration is located at https://github.com/flexopus/flexopus-hass-sensor.

Install with HACS (recommended)

The Home Assistant Community Store (HACS, https://hacs.xyz) is the most convenient way of installing and updating custom integrations in Home Assistant.

  1. To install HACS, head to https://hacs.xyz/docs/setup/download, and select the installation method that matches your Home Assistant installation. After installation, add it as an integration: https://hacs.xyz/docs/configuration/basic. You will need a GitHub account for the configuration.
  2. Once you have HACS install, navigate to /hacs/entry
  3. Click the three dots and select Custom repositories, and add the Flexopus GitHub repository (https://github.com/flexopus/flexopus-hass-sensor) as Integration

  4. Once added, search for Flexopus in the list
  5. Select it from the list, click Download, select the version, and confirm Download
  6. Restart Home Assistant

Manual install

  1. Download the latest version of the code from the repository: https://github.com/flexopus/flexopus-hass-sensor/releases/latest
  2. Go to your Home Assistant config directory, and create the custom_components folder, if it does not exist
  3. Extract the code and copy the custom_components/flexopus folder to the custom_components folder of your installation. The resulting structure should be:
<home assistant root>
└─ config
 └─ custom_components
    ├─ flexopus
    └─ <other custom integration>

After completing the steps above, restart your Home Assistant.

Configure the integration

To configure your integration, you will need two things:

  1. Tenant URL: the domain you are using to access Flexopus (https://mycompany.flexopus.com)
  2. Access token: the token to access Flexopus API. To learn more, read How can I use the Flexopus REST API?

Steps:

  1. Go to Settings/Integrations, click Add integration and search for Flexopus
  2. Enter your credentials
  3. Once authenticated, Flexopus will show up at your Integrations page. Select it and click Configure at your newly created integration entry. Select the locations you want to fetch and click Submit.
  4. The occupancy sensors for each bookable will be added to your Home Assistant

Next steps

You have configured the Flexopus integration, and will continue receive updates from the selected locations. As a next step, you can define automations that are triggered for any change of the Flexopus sensors. To do that, head to Settings/Automations & Scenes and click Create automation. You can configure your automation in the UI, or enter yaml mode. A sample automation can look like this:

alias: Meeting 1
description: "Turn on lights for meeting room 1 when booked"
trigger:
  platform: state
  entity_id: sensor.ground_floor_meeting_1_occupancy
action:
  service: |
   
      light.turn_off
   
  target:
    entity_id: light.light_1

To learn more about automations, read https://www.home-assistant.io/docs/automation/basics. If you have a lot of automations that work the same way, we recommend configuring a template (a so-called blueprint) for it: https://www.home-assistant.io/docs/blueprint/tutorial.

The possibilities are endless, feel free to explore the Home Assistant documentation, or contact Flexopus Support in case of any doubt.

R0102