Giter VIP home page Giter VIP logo

lumos-server's Introduction

lumos

Communication

Get node info

HTTP

To obtain a JSON file of all configured nodes, GET /nodes on port 3000.

Example:

{
  "nodes" : [
    {
      "nodeID": 1,
      "battery": 0,
      "online": false,
      "enabled": true,
      "colour": "000000"
    },
    {
      "nodeID": 2,
      "battery": 97,
      "online": true,
      "enabled": true,
      "colour": "FF0032"
    },
    ...
  ]
}

Set node colour

HTTP

To set node colours, PUT a JSON file to /nodes on port 3000.

You can update the colour of as many or few nodes and in any order you wish.

Example:

{
  "nodes" : [
    {
      "nodeID" : 1,
      "colour" : "00F431"
    },
    {
      "nodeID" : 2,
      "colour" : "00F431"
    },
    {
      "nodeID" : 6,
      "colour" : "00F431"
    },
    ...
  ]
}

Response:

{
  "nodes": [
    {
      "nodeID": 1,
      "result": "success"
    },
    {
      "nodeID": 2,
      "result": "success"
    },
    {
      "nodeID": 6,
      "result": "success"
    },
    ...
  ]
}

Possible results:

  • success - colour saved successfully.
  • nodeID not found - could not find a node with given ID.
  • invalid nodeID - nodeID wasn't a valid integer.
  • missing nodeID - a nodeID wasn't provided.
  • invalid colour - colour given wasn't a 6 character hex colour.
  • missing colour - a colour wasn't provided.

UDP Packet

Full text JSON

The format of the JSON is the same as a normall HTTP call, but all white space should be removed to minimise the packet size.

UDP packets should be sent to port 3001, no response is given.

MessagePack JSON

A smaller packer size version is avalible, this should be sent to port 3002. This utilizes MessagePack data serialisation, libraries for this can be found at: http://msgpack.org

The format is as follows (MessagePack removes white space by default):

{
  "ns" : [
    {
      "n" : 1,
      "c" : "00F431"
    },
    {
      "n" : 2,
      "c" : "00F431"
    },
    {
      "n" : 6,
      "c" : "00F431"
    },
    ...
  ]
}

No response is given to UDP Packets.

Linux (ubuntu 16.04) notes

Install

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install build-essential python git

sudo -E curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -

sudo apt-get install nodejs

node --version (should be 6.3.0 or later)

sudo setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))

sudo setcap 'cap_net_raw=+ep' $(readlink -f $(which node))

sudo npm install nodemon forever -g

cd ~

git clone https://github.com/solexious/LUMOS-Server.git

cd ~/LUMOS-Server

sudo npm install

Run Development

cd ~/LUMOS-Server

nodemon

Run Production

Start

forever start ~/LUMOS-Server/app.js

Stop

forever stop ~/LUMOS-Server/app.js

lumos-server's People

Contributors

solexious avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

matburnham

lumos-server's Issues

Add ping to check 2 way comms

Low signal can allow sending of heartbeat but not receiving of data, use a ping to check 2 way comms to confirm node is correctly online

Add per node inhibit fader

Add fader to scale back brightness per node, allowing dimming of nodes in places close to other tents etc

display ping timeouts in admin ui

Currently if a ping test times out a node just doesn't get set to online.

Show this data somewhere in the web ui to allow for troubleshooting before travelling to the node so we don't need to view the node logs.

modal grey stays on sync

if a modal is open when a sync is forced the modal is removed but the grey out remains.

force close before sync or find way to cancel grey.

null battery %

if voltage has dipped below min_led_voltage battery shows as null

correct to show 0 if at or bellow

set modal location tab name dynamically

when viewing on phones the modal tabs don't fit on one line.

currently the location tab has been shortened to loc to make it fit on this size, change this to lengthen to Location if viewing on a larger screen

Odd led flashing

Seems to be when artnet doesn't update all 3 channels, try adding a force to minimum num of channels for sending

Add list of current ip addresses

This will allow for doing mass updates or changes, firstly for popping into the firmware update script, though this would be nice to do through the control panel too

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.