niobos / velbuspy

1 stars 2 forks source link

Velbus HTTP interface

This project is an HTTP(s) interface to the Velbus domotica system.

Dependencies

On debian:

Quickstart

  1. Clone this repository

    git clone https://github.com/niobos/velbuspy.git
    cd velbuspy
  2. Create a new Python VirtualEnv (optional, but highly recommended) and make sure you have current setuptools and wheels:

    $ python3 -m venv venv
    $ source venv/bin/activate
    (venv) $ pip install setuptools wheel
  3. Install structattr:

    (venv) $ pip install git+https://github.com/niobos/structattr.git
  4. Install velbuspy:

    (venv) $ pip install -e .
  5. (Optional): install and build the React Web Frontend:

    (venv) $ git clone https://github.com/niobos/velbusjs.git
    (venv) $ cd velbusjs
    (venv) $ $EDITOR public/index.html
    (venv) $ npm install
    (venv) $ npm run build
  6. Run the daemon for /dev/ttyUSB0 (substitute for the port actually in use)

    (venv) $ python src/run.py --static-dir velbusjs/build /dev/ttyUSB0
  7. Point your browser to http://localhost:8080/

Debugging tips

You can fake a serial port with socat: socat -d -d PTY -

Design considerations