Git Product home page Git Product logo

callmebjb's Introduction

API for using gsm module over serial

Initially, I wrote this because I don't want to pay for a crappy Twilio service. I just needed a way to make calls to my phone to wake me up in case of an alarm on Home Assistant or some other service, especially if I'm not connected to the internet.

This API should work best with the SIM868 module and probably will work with most Waveshare GSM modules, as well as other AT command-based modems. If not, you will need to change some code.

The code is not great but it gets the job done. There isn't a queue or any special processor that watches serial output, so it's not meant to be used in production.

Used with this GSM module and prepaid SIM card.

TODO

  • Simple auth

  • Call endpoint with audio file

    I may add new endpoint for making calls with uploaded audio since most of the dev GSM modules support audio in/out so you can connect it your RPi and emulate micrphone.

  • Read SMS inbox (if possible or create one in memory)

Config example

modem:
  port: "/dev/tty.usbserial-0001" # Find your port with `ls /dev/tty.*`
  baudrate: 115200 # RTFM
server:
  listen: "localhost"
  port: "8081"

by default it will look for config.yaml in the same directory as the binary, you can set CONFIG_PATH env var

Building

For RPi 0w

GOOS=linux GOARCH=arm GOARM=6 go build

See other GOARM values for RPi here and here

Development

Generates OPENAPI spec with deepmap/oapi-codegen

go generate

callmebjb's People

Contributors

myinstagramalternative avatar

Stargazers

Gui Martins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.