The application allows to trigger a relay with a phone call. A master phone number can grant and revoke permissions to allow other users (phone numbers) to trigger the relay.
- General Info
- Technologies Used
- Features
- Setup
- Usage
- Room for Improvement
- Contributing
- Software Credits
- License
- Contact
- The project is a firmware ready to be flashed on the Mercury System.
- For low level drivers an adapted Mercury Framework is used.
- A typical use case consists of a GSM Gate Opener: you can open your gate with a phone call instead of using the remote.
- Base Board per Sistema Mercury
- Big Relay board per sistema Mercury
- Expansion Dual per Sistema Mercury
- Modem Board GSM per Sistema Mercury
- External Antenna MMCX/M
- Microchip PICKIT™ 3 IN-CIRCUIT DEBUGGER
- Microchip MPLAB® X IDE
List the ready features here:
- Set master phone number with phone call or via USB.
- Replace master's phone number via USB.
- Master phone number can add user's phone number in memory.
- Master phone number can delete user's phone number from memory.
- Master phone number can reset the memory and bring the board into its initial state.
- All numbers in memory can trigger the relay.
The project can be open with Microchip's MPLAB® X IDE that is free to download and multiplatform. At the first start the IDE will detect the compiler version used in the project and will ask the user to download it. The project can then be built and flashed.
When we plugged into an USB port a red and a green LED will turn on. An LED on the modem board will start flashing: it means your SIM card is working.
The very first startup the board memory is empty. A yellow LED will flash for 3 minutes. In this three minutes you can call your SIM card number, and the caller number will be saved as master phone number. When the master phone number is saved, or the 3 minutes elapsed, the LED will not blink anymore.
At any time the master phone number can be changed via USB with a dedicated software.
Consider removing the PIN from your SIM card before inserting it.
The master phone number can allow other users to trigger the relay. To add a user into the board memory the following command needs to be send via SMS to your SIM card number:
ADD;<phone_number>
Replace <phone_number>
with the number you want to add. The phone number should start with a '+' symbol, e.g.: ADD;+390123456789
.
The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can add other users.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds (e.g.: The number was already in memory).
The master phone number can revoke other users permission to trigger the relay. To remove a user from the board memory the following command needs to be send via SMS to your SIM card number:
DEL;<phone_number>
Replace <phone_number>
with the number you want to add. The phone number should start with a '+' symbol, e.g.: DEL;+390123456789
.
The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can remove other users.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds (e.g.: The number was not in memory).
The master phone number can perform a reset of the board. This will delete all the numbers saved in memory, even the master phone number itself. To remove a user from the board memory the following command needs to be send via SMS to your SIM card number:
RES;
The commands need to be written in capital letters and with no spaces. Remember that only the master phone number can perform a reset.
If the command was successfully performed a yellow LED will blink for 3 seconds, otherwise it will blink for 7 seconds. The board will then restart and the yellow LED will blink for 3 minutes so the user can set again the master phone number.
All the numbers saved in memory (not just the master) can trigger the relay. To do that simply call yous SIM card number.
If the command was successfully performed the relay will be triggered for 1 second. A red LED placed on the relay board will be turned for as long as the relay is triggered.
Room for improvement:
- Add command to set the relay activation time (currently 1 second).
- Support internal phone numbers up to 15 digits.
TODOs:
- Add Unit Tests.
Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
The development of this software was made possible using the following components:
- MercurySystem by Francesco Ficili.
Distributed under the GNU General Public License v3.0 License. See LICENSE
file for more information.
Created by Andrea Misuraca - feel free to contact me!