Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.
/ receiver Public archive

Backend service receiving data from M4M Controller

Notifications You must be signed in to change notification settings

M4MController/receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M4M Receiver Backend

The entry point for the controllers located in your home.

API

API structure is similar to VK API structure.

controller

/controller.setOnline

  • controller_mac: string

sensor

/sensor.setStatus

  • controller_mac: string
  • sensor_id: int
  • error_message: string

/sensor.addRecord

  • controller_mac: string
  • sensor_id: int
  • value: int
  • timestamp: string

Build and run

At first create configuration file (config.yml) for your case. See config.yml.example.

Using docker

  1. Build the image
docker build -t m4m-receiver .
  1. Run the container
docker run -p 80:5000 m4m-receiver

Using virtualenv

  1. Create environment and install dependencies
virtualenv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
  1. Run the app
python3 app.py

About

Backend service receiving data from M4M Controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages