OHS is open source based burglar alarm and automation platform. It can work as new alarm gateway, or it can replace your old alarm panel. OHS can use any wired 12V sensor, PIR, smoke 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. OHS is self-contained, it does not need any cloud service, only optional SMTP server for emails, or MQTT server to publish collected sensor data.
Tuesday, December 2, 2014
Web interface - groups
The group itself does not have too much settings. You can set the group name, set it On or Off and assign a output trigger for PIR and tamper event. All other parameter are taken form their respective sources like zones, sensors and such. But group setting offers great overview of what is going on in your system. You can see the group status, if it is armed or alarm is tripped and how long we are waiting for the authentication.
There are 16 groups not only to differentiate zones, but also to distinguish location of sensors and to allow proper MQTT propagation. More on this topics soon.
Wednesday, November 19, 2014
Short wires II / New PCB arrived
But luckily all other components can be taken to new board that I have just received from factory. Next week I will get busy :)
Tuesday, November 11, 2014
How to wire up PIR

Bellow is only valid for gateway versions bellow 1.6.
Main board is equipped with 7 analogue inputs that are able to measure different states on the sensors by using just one wire. Well actually you need three together with power and ground. On the right you can see the wiring schema. It is a simple voltage divider with 22k and 10k resistor that take the input voltage and create different voltage levels based on state of PIR outputs. In this way we can use any commercially available PIR sensor module that is able to operate with 12V power supply.
There can be more sensors on one input, but that would require more than just three wires as you need to daisy chain the signal and signal inputs from PIR and TMP. Not problem for someone who is using CAT5e cable to wire the sensors, it is actually cheaper than original 4-wire cable.
To sum up possibilities with such setting. We are able to see these states:
- normal operation
- trip
- tamper
- unknown state / damaged
In software we measure the voltage level in zone thread every 250 millisecond. 4 times a second is safe way as the PIR modules usually keep the outputs on or off for one whole second. Also the thread has highest priority. In order to compensate for different wire lengths, there are voltage rages feedback specified for each state, rather than a single value. And because input voltage can change when switching to battery and back, the whole measurement is compensated to the input voltage as well.
Saturday, November 1, 2014
New PCB for main board
After not very successful testing of main board in real life, I have put some effort and created a new version of it.It I hope solves the problem of over current on power lines. I have put five 1206 polymer fuses on it as well as input one and over voltage protection. Also I have re-mapped the digital input pins so now it should be faster to read them in software. I have added one extra digital input and corrected the tamper. Now we have 7 analog input pins and 6 digital input pins. Another fix is reset watchdog circuit that was needed to properly start Wiz820io Ethernet module after power up. Others changes are minor, rearranged the connectors and battery. And I have deleted the 5V rail needed for the old GSM module, because now I use 12V one.
I've send the board for fabrication, fingers crossed :). New schematics are available in download area.
Tuesday, October 28, 2014
Power supply
Saturday, October 25, 2014
Short wires
I was about to test everything in real life as the software and hardware worked fine together, but didn’t think about short wires on the other ends. I have connected 2 PIR sensors and left the board powered on. All the leds on GSM modem a Ethernet card lit up and I started to connect wires on first PIR that is just around corner. When I went back to main board there was strange light coming out of place where is no led. It was bead! But before I was able to unplug it it died and took some other components with it. The second PIR had shorted power wires, upps.
I must say the power supply is too strong, with battery connected it can easily put few amps into any 12V rail. As you can see on the picture the power went to second PIR sensor there was shorted and came back to analogue ground that is connected to digital ground by bead. And it didn’t withstand the power that was flowing through it. As is burned it probably touched the 12V rail that is near and killed the rest of the board. So, yes I have designed the board as well as I could to handle over voltage and or short on signal wires, but I failed on power lines.
Damn, I have the input over current, over voltage on the remote board but not on the main board. A simple polymer fuse would save the board as it was able to operate like this for at least 3-4 minutes. Now I have to think if I will make new revision of the main board or just solder another one and put a fuse on the 12V input.
Monday, October 20, 2014
Wiz820io power on problem.
I went first with with the watchdog variant. I have found, and bought MCP130 which is a voltage supervisory device. It is designed to keep a micro controller in reset state until the system voltage has reached the proper level and it is stabilized. By looking at the schematic I have found that the R22 resistor, 10k reset pull-up, can be replaced by MPC130. The MPC130 is available in SOT-23 package and pins matches the footprint of R22 resistor except GND signal. I have replaced it and soldered extra wire form nearest ground to watchdog.
I happy to say that the watchdog keeps the reset long enough to satisfy the wiz820io and the main board is now recovering from complete power loss without any issue. Just for completeness the wiz820io has its own 10k pull-up.
If there will be some new revision of the main board, I will replace the R22 with MCP130 and free the INT line to wiz820io for digital input. The price of MCP130 is 0.25 EUR for 1 piece in our local shop and it is well worth it :).
