Giter Site home page Giter Site logo

solarflux-demo-ui's Introduction

SolarFlux Demo UI

This project contains a demo webapp that shows how to connect to SolarFlux and consume real-time datum updates posted there.

screenshot

Use

Fill in a valid SolarNetwork security token and secret. Optionally tweak the topic pattern if you like, i.e. to narrow the nodes and/or sources the app subscribes to. Then

Topics follow this syntax:

node/N/datum/0/S

where N is a node ID and S is a source ID. The 0 in the topic represents the raw aggregation level, which is level SolarNode posts datum messages at. Example topics look like:

node/1/datum/0/Meter
node/2/datum/0/Building1/Room1/Light1
node/2/datum/0/Building1/Room1/Light2

Note that any leading / in a source ID is stripped from the topic name.

By default, the topics that get subscribed to will be automatically re-written by SolarFlux to include a user/U prefix, where U is the SolarNetwork user ID of the authenticated user. That means that the example topics above will result in topics like the following actually being consumed:

user/123/node/1/datum/0/Meter
user/234/node/2/datum/0/Building1/Room1/Light1
user/234/node/2/datum/0/Building1/Room1/Light2

Building

The build uses NPM or Yarn. First, initialize the dependencies:

# NPM
npm install

# or, Yarn
yarn install

Then, the development web server can be started via

# NPM
npm run start

# or, Yarn
yarn run start

and then the app can be reached at localhost:9000. For a produciton build, use

# NPM
npm run build -- --config webpack.prod.js

# or, Yarn
yarn run build --config webpack.prod.js

and the app will be built in the dist directory.

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.