Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
/ Module-Ping Public archive

Send a pre-formatted SMS to your contacts on the go. Part of a collection of Open Source modules for the COBI.Bike system.

License

Notifications You must be signed in to change notification settings

cobi-bike/Module-Ping

Repository files navigation

Ping DevKit module for COBI.Bike

FOSSA Status

The DevKit module "Ping" allows users to send a preformatted SMS to their contacts on the fly. It's part of a collection of Open Source modules for the COBI.bike system.

COBI.Bike Ping module

Quickstart: Interactive Demo

The quickest way to test the module via Glitch.com:

Open demo button

Glitch.com allows you to edit, host and fork Node.js applications for quick prototyping. Follow the installation step 2 and copy the environment variables to the: .env file on Glitch.com

Overview

This module relies on Twilio.com to send a custom SMS from a Node.js backend.

The backend serves a static web page to the client, which allows the user to pick between several preformatted messages. After choosing a message, the user has to select a recipient from his contacts. The message is then sent back to the Node.js backend, which will forward to message to Twilio.

The backend enforces a maximum message quota by IP address.

Installation and Setup

You can easily deploy the module on your own:

Step 1: Clone repository

Clone this repository and install Node.js dependencies with:

npm install

Step 2: Create a twilio account

This module relies on Twilio.com to send a custom SMS from the Node.js backend. Create an account, setup »Programmable SMS« and retrieve your api credentials. For testing purposes consider using test credentials found in the General Settings.

Step 3: Set environment variables

Set the environment variables TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_FROM_NUMBER with your twilio credentials.

Step 4: Run Node.js server

The module is accessible under localhost:3000 after starting the Node.js server with:

node server.js

The settings menu can be accessed with the ?state=edit suffix.

Step 5: Spoof contact menu

The module accesses a native contact menu through a Cobi.js API bridge. To send a message anyway, we simply spoof the API function:

COBI.app.contact.read = function(callback) {
	var contact = {};
	contact.phone = '+49 1234 56789';
	callback(contact);
}

Optional: Install COBI.Bike DevKit Simulator

Follow the instructions to install the COBI.Bike Google Chrome Simulator and get familiar with the basics of module development on the COBI plattform.

Credits

This module uses Open Source components. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.

Carousel Team by Marco Barría (MIT)

Useful DevKit links

Contributing to this project

Anyone and everyone is welcome to contribute to this project, the DevKit Simulator and the DevKit UI Components. Please take a moment to review the guidelines for contributing.

Copyright © 2018 COBI.Bike GmbH

License

FOSSA Status

About

Send a pre-formatted SMS to your contacts on the go. Part of a collection of Open Source modules for the COBI.Bike system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published