Gate remote controller

This article illustrates how build a remote controller to open a gate using a free mobile call or a web interface if you are in your home wi-fi range.

For this project we'll use a Terra-M board with an integrated Quectel GSM module and a Daisy-8 relay module plugged on Terra.D11 connector to send a pulse to the gate circuitry.

Source code

The fully source code is available on GitHub:

It is a part of the playground repository of Acme examples.

It use ablib.py module to manage the DAISY-8 module and the Tornado web server to manage the web pages and Winsocket commands.

The project consist in two parts that can work separately as illustrated below.

PART 1: Remote control via phone call

The first section of code accepts the incoming calls from the GSM network, checks the calling number, compares it with a list of enabled number and, if found it, send a pulse to the gate circuitry using the DAISY-8 relay RL0.

The code to do that is in ring.py

The enabled numbers are listed in a dictionary at the begin of code:

enabled_numbers = {
    '+391234567890':'Mario Rossi',
}

PART 2: Remote control via Websocket

The second part is implemented in more source codes:

  • webserver.py that implements a full working web server based on Tornado. It server statically the file index.html on port 8080 then manages the incoming Websocket message from the web interface. It is possible to send messaged from more mobile phone or PC. The webserver send a websocket message to any opened client when it closes the relay and when opens it. The web client will change the button color to give a feedback to the user.
  • index.html contains the button image and the javascript code to generate the Winsocket message to send to webserver.py. It uses jquery.

This is the button image used by the websocket interface. try to click on it. On the real application the button become red when the pulse is really sent to the gate circuitry.

TERRA-M
EUR 249.00


Linux embedded board for fast prototyping

TERRA is a carrier board conceived both to evaluate the Aria G25 SoM and to make prototypes or small production batches of OEM equipments using the Daisy cabling system.

The TERRA-M variation is equiped with a GSM/GPRS Quectel M95 quad band modem, a SIM holder and a SMA connector for an external GSM antenna.

| Product description | Terra catalog |

FLAT-20CM
EUR 2.00


Flat cable 10 wires, 20 cm, pitch 1.27 mm

Ribbon cable for YARM-DEV or DAISY modules wiring:

  • Length 20 cm
  • 10 wires
  • Pitch 1.27 mm