Giter Site home page Giter Site logo

smart-light-coap-api's Introduction

RAILS SMART LIGHTING COAP API

This project is part of my Undergraduate Thesis of the Federal Technological University of Paraná (UTFPR - Brasil), from the Technology in Internet Systems course. The objective of this project consists in develop and implement a solution for Smart Lighting utilizing concepts and technologies of Internet of Things, by making use of a physical circuit and a Web Service that talk to each other via Internet, making it possible that we retrieve the actual state of a lamp, as well as light it or turn ir off.

In this repository, you'll find the API that will receive the requests and will send it to the circuit. The API was developed using Ruby on Rails.

Este projeto faz parte do meu Trabalho de Conclusão de Curso da Universidade Federal Tecnológica do Paraná (UTFPR), do curso de Tecnologia em Sistemas para Internet. O objetivo do projeto consiste em desenvolver e implementar uma solução para Smart Lighting utilizando tecnologias e conceitos da IoT, fazendo uso de um circuito físico e um Web Service que se comuniquem entre si por meio da rede e façam com que seja possível obter o estado atual de uma lâmpada, bem como acendê-la ou apagá-la remotamente.

Nesse repositório encontra-se a API que ira receber os requests e enviar para o circuito. A API foi desenvolvida utilizando o framework Ruby on Rails

Requirements

  • Ruby 2.5
  • Rails 5.2

Gems

Apart from the standard Rails gems that come with the application, this project uses the following gems:

  • David A CoAP server with Rack Interface
  • Cbor

Utilization

Start the server with rails s. The application will be running on coap://[::1]:3000/

In your terminal, you can use the coap client provided with the David gem. To get all lamps for example, just run:

  • coap get coap://[::1]:3000/lamps

To toggle a lamp on or off, just make a put request:

  • coap put coap://[::1]:3000/lamps/<lamp_id>/toggle

Observations

  • This is a work in progress project

smart-light-coap-api's People

Contributors

felipe-kosouski avatar

Watchers

 avatar  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.