Skip to main content

Obihai OBi smart home integration, free and open source

Obihai OBi integration for Gladys Assistant

Follow your Obihai OBi VoIP adapters: SIP lines, phone ports, incoming calls and reboot.

Follow your Obihai OBi VoIP adapters (OBi200, OBi202, OBi110, OBi300, OBi302…) in Gladys: the state of the SIP lines, the phone ports, the incoming calls, and reboot the box from a scene or the dashboard.

The integration talks directly to the box on your local network, through the status pages of its web interface. No cloud, no OBiTALK account, nothing to install on the box.

Before you start​

  1. Find the IP address of the box: plug a phone into it and dial ***1, the box reads its address. You can also look at the list of devices of your Internet box.

  2. Check that you can open http://<address>/ in a browser and sign in to the web interface.

  3. Pick the account:

    • admin: full access, needed to reboot the box from Gladys;
    • user: read only (state of the lines and ports, no reboot).

    On a new box, both passwords are the same as the account name (admin / user): change them in the web interface (System Management → Device Admin).

Tip: give the box a fixed IP address (DHCP reservation in your Internet box), so the address you enter in Gladys never changes.

Configuration​

FieldWhat to enter
Address of the box192.168.1.50, or 192.168.1.50:8080. Several boxes: 192.168.1.50, 192.168.1.51 (same password)
Accountadmin (reboot allowed) or user (read only)
PasswordThe password of that account
Refresh interval (s)5 by default. Short enough to see a phone ring (a ring cycle lasts about 6 s)

Click Test the connection: the answer lists each box, its lines and its ports, or says why it failed (wrong address, wrong password…).

Then open Discover and add the box: it becomes a Gladys device.

The device​

One device per box, named after its model and address (OBi202 (192.168.1.50)). It is identified by its serial number: changing the IP address of the box keeps the device, its history and your scenes.

FeatureContent
SP1 status…State of each SIP account: Registered, Backing Off, Service Not Configured…
OBiTALK statusState of the OBiTALK service: Normal, Offline…
PHONE1 state…State of each phone port: On Hook, Off Hook, Ringing
UptimeSeconds since the last start of the box
FirmwareFirmware version

The box shows a Local badge when it answers, Unreachable otherwise.

Scenes​

Triggers​

TriggerWhenVariables
Incoming calla phone starts ringingdevice_name, port, caller_number, caller_name
Call endeda phone is hung updevice_name, port, duration_seconds
SIP line status changeda line registers, or loses its registrationdevice_name, service, status, status_text
Box online or offlinethe box stops answering, or answers againdevice_name, host, status, reason

Each trigger can be limited to one box, one port, one line or one status. Example: when PHONE1 rings, send me a message "Call from {{triggerEvent.data.caller_number}}".

Actions​

ActionResult (outputs)
Reboot an OBi boxrebooted, message (needs the admin account; calls in progress are cut)
Read an OBi box statusreachable, registered, status, in_call, ringing

Example: every night at 4 am, if no call is in progress (in_call false), reboot the box.

Dashboard widget​

The OBi box widget shows the lines, the phone ports and the uptime of one box, with a Reboot button (asks for confirmation). Choose the box in the widget settings.

Troubleshooting​

  • "unreachable": check the address, that the box is on, and that Gladys runs on the same network.
  • "wrong user name or password": sign in to the web interface with the same account to check the password.
  • "this address does not answer like an OBi box": the address points to another device.
  • No ringing detected: lower the refresh interval to 5 s or less.
  • Reboot refused: use the admin account.

Privacy​

The integration only talks to the boxes you entered, on your local network. The password is stored in a secret field of Gladys and is never written to the logs.

Configuration settings​

These are the settings Obihai OBi asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoThe integration reads the status pages of your OBi box on your local network, like its web interface does. No cloud and no OBiTALK account: enter the IP address of the box and the password of its web interface (admin account to allow reboots).
Address of the OBi boxstringYesIP address or host name of the box on your network (dial ***1 on a phone plugged into it to hear it). Several boxes with the same password: separate them with commas.
AccountselectNoAccount of the OBi web interface. admin can reboot the box; user can only read it.
PasswordsecretYesPassword of that account (admin by default on a new box: change it).
Refresh interval (s)numberNoHow often the boxes are read, in seconds. Keep it short (5 s) to catch incoming calls while the phone rings.

How to install Obihai OBi in Gladys​

  1. In Gladys, open Integrations: Obihai OBi appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/prohand/gladys-obihaiobi:0.1.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/prohand/gladys-obihaiobi.

Obihai OBi requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Obihai OBi is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by prohand, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂