Git Product home page Git Product logo

cmdport's Introduction

Command Portal

A simple node-red based remote command scheduler. The flows can be invoked either through http or can be initiated through an MQTT payload. The flow subscribes to a topic which is the hostname.

Topic Description
hostname Subscribed by the host
hostname/config Birth message which is retained and includes config details like IP
hostname/status Last executed command

Configuration - Ubuntu 14.04

Git clone the repo and run the install script as follows.

git clone http://github.com/sajayantony/cmdport
sudo ./cmdport/scripts/install.sh testbroker testuser testpassword

This sets up the flow and connects to the broker and makes the machine ready for remote commands. Refer install.sh for details.
The following commands should be used to setup or remove the agent as needed.

sudo update-rc.d cmdport defaults 
sudo update-rc.d -f cmdport remove

Broker Configuration

  1. Use the following instructions to setup an MQTT broker for command dispatch.

    sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
    sudo apt-get update
    sudo apt-get -y install mosquitto
    sudo apt-get -y install mosquitto-clients
    
  2. Configure the password and disable anonymous access

    sudo mosquitto_passwd -c /etc/mosquitto/pwfile  <username>
    sudo nano /etc/mosquitto/mosquitto.conf
    
  3. Add the following

    password_file /etc/mosquitto/pwfile
    allow_anonymous false
    
  4. Restart the service

    sudo service mosquitto restart
    
  5. To be able to connect to the broker you need to open up the port 1883 for Mosquitto. Follow the bread crumb described below and add port 1883.

    VM >> Settings >> Network Interfaces >> Network Interface >> Settings >> Network Security Group >> Settings >> Inbound Rules 
    

cmdport's People

Contributors

martinpf avatar sajayantony avatar

Forkers

sivagms

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.