OHS gateway is an STM32 ARM Coretex-M4 based open source burglar alarm and automation platform. It can work as new installation, or it can replace your old alarm panel. Gateway can use any 12V wired commercial PIR, microwave sensor or reed switch. It has Web interface that is used to set it up. OHS has GSM modem that is able to send SMS or page you. It has radio interface for environmental sensors or inputs. OHS is self-contained, it does not need any cloud service, only optional SMTP server to send emails, or MQTT server to publish collected sensor data.
It directly integrates with Home Assistant for all groups and zones through HA MQTT Auto Discovery.
Gateway:
- Size 10x10cm (4x4").
- 3 LEDs as indication of power, GSM status and heartbeat.
- STM32F437 Cortex-M4 with 1MB of flash and 256KB of RAM, running @192 MHz.
- LAN8742A Ethernet PHY 10/100Mbit with magnetic.
- 128KB SPI FRAM for logger and scripts.
- Optional SimCOM 2G/3G/4G/LTE SIM7600x or A7600X module.
Inputs/Outputs:
- Input DC 11 - 14V with fuse and over voltage protection.
- Battery OK and Power Off signals via 4 pin power connector. Suited for Meanwell PSC-35A-C power supply. With this power supply and battery, it act as UPS also for all wired nodes.
- Power cable included, JST-XH-4 2.54mm(0.1") 4pin connector on one side, 40cm(16") long cable.
- 10 analog(balanced) ports, switchable to unbalanced by software. 2x10 2k2 balancing resistors included. 12V balanced terminal output supply is fused with separate 400mA resetable fuse.
- 1 digital(unbalanced) opto-issolated port for box enclosure (tamper).
- 2 relays with terminals (Input, Normally Open, Normally Closed, and GND), NC, NO outputs of the relay can be either 12V, or provided by input terminal. Relays act as Siren/Horn relay. 12V relay output is fused with separate 400mA resetable fuse.
- RS485 for serial over twisted wire pair, with terminator pins and termination resistor. Library is provided on GitHub. Again RS485 provide 12V power output to all RS485 nodes that is fused with separate 200mA resetable fuse.
- Optional RFM69CW-868/915 for wireless, long reach. Optional pigtail and rubber antenna.
- Compatible with Arduino using LowPowerLab RFM69 library.
- Battery holder for CR2032. STM32F437 has on-board RTC.
- Micro USB port for console and DFU firmware programming.
- ST-LINK V2 port.
- 2x Serial port for logs or other communication.
Simplified pinout and component diagram: https://vysocan.github.io/OHS_20x.html
All settings are configured by web interface.
Source code and compiled firmware are available on GitHub along with complete build environment. Firmware builds are prepared by CI directly on GitHub. New firmware can be uploaded via micro USB or via ST-LINK V2 port using ST-LINK programmer.
OHS gateway can be included into home automation, like Home Assistant, via MQTT using both publish and subscribe. It means, you can easily make PIR sensor to trigger MQTT in your home automation to start any action. Or you can send name of user who disarmed the zone to your home automation and again make some actions. Or the other way, you can make your home automation arm your house via MQTT subscribe functions.
OHS ecosystem also offer authentication units that are required to arm/disarm zones and groups. Along with zone expansion units, relays and radio nodes. All these are based on Arduino platform with open source code and schematics.
Connecting balanced sensors is quite easy, they can be attached using following scheme. As can be seen from below PIR sensor example, at least 3 wires are needed for operation. The board provides 12V and GND for the sensor operation, and after the resistor cascade, input is brought back to the expansion board. Standard wired 2k2 1/4w resistors for the balanced cascades are included. Unbalanced sensors, like reed switches or any passive sensor, can be connected directly without resistor cascade using just 2 wires. That is connected to GND, and any of the board input terminal. However balanced connection are more secure, and provide tamper detection to the wiring and sensor itself.