Giter Club home page Giter Club logo

mygpioweb's Introduction

Simple webfrontend for myGPIOd

This project provides a simple webfrontend for myGPIOd. It uses the libmygpio library to connect to the myGPIOd socket.

Build

  1. Install dependencies: cmake, libmygpio
  2. Get myGPIOd tarball from GitHub
  3. Extract myGPIOweb tarball and change path to this directory
  4. Run cmake: cmake -B build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release .
  5. Build: make -C build
  6. Install (as root): make -C build install

Run

mygpioweb [option]...
Option Description
-s, --socket myGPIOd socket (default: /run/mygpiod/socket)
-l, --listen HTTP listening address (default: http://0.0.0.0:8000)
-o, --syslog enable syslog logging (facility: daemon)
-h, --help displays this help
-v, --version displays this help

Provided endpoints

myGPIOweb provides a websocket to retrieve gpio events without polling and a REST API to control GPIOs.

Websocket

Sends idle events from myGPIOd to connected clients.

  • Path: /ws
  • Format: {"gpio": <gpio number>, "event": <event>, "ts_ms": <timestamp in ms>}

REST Endpoints

Path Method Command
/api/gpio GET gpiolist
/api/gpio/{gpio number} GET gpioget
/api/gpio/{gpio number} OPTIONS gpioinfo
/api/gpio/{gpio number}/{blink, set, toggle} POST gpioblink, gpioset, gpiotoggle

mygpioweb's People

Contributors

jcorporation avatar juergenmang avatar

Stargazers

 avatar

Watchers

 avatar

mygpioweb's Issues

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.