Coder Social home page Coder Social logo

zipgateway-env's Introduction

zipgateway-env

Docker env for compiling and running zipgateway.

When building a Z/IP Client library it would be nice to be able to compile, test, and run zipgateway locally without having to think about installing and configuring your system. This has proven to be challenging for various reasons. This docker environment was made to help streamline the process. It allows you to compile and run different versions on zipgateway and uses your host machine networking to allow this to be ran as if it were running natively.

General and hardware system requirements:

  • Docker
  • Tuntap kernel module
    • Mac OSX - brew install tuntap
  • Z-Wave Bridge Controller
  • Ubuntu 18+
  • Mac OSX (currently not tested or documented but should work, but might need to run some extra commands)
  • Silicon Labs zipgateway source

Supported zipgateway versions:

  • 2.81.03
  • 7.11.01

Getting Started

First you will need to clone the repo and checkout the latest

git clone https://github.com/mattludwigs/zipgateawy-env.git
git checkout v0.1.0

Then you will need to build the docker image

./env.sh build

Lastly, you can run the environment

./env.sh

This will place into the docker image and now you do things like compile and run zipgateway.

They primary way to do this is via the zgw cli tool that is provided.

zgw

The zgw is a cli tool for compiling and running zipgateway.

Compiling zipgateway

To compile the zipgateway binary you will first need to download it from Silicon Labs website. This will require you to register and login but it is free to download and development against.

This will download a compressed file that you will need extract somewhere.

For the following steps we will be using the zipgateway version 2.81.03 which is the current downloadable version from Silicon Labs' website. However, these steps should remain true for other support zipgateway versions.

The extracted file tree will look something like:

├── Binaries
├── Doxygen
├── PDF
├── REL14467-3.doc
├── REL14467-3.pdf
├── Source
└── ZIP GW 2.81.03 Active.zip

Then in side the Source directory there will be another tar file that will look like zipgateway-<version>-Source.tar.gz2. You will want to extract that as well. Now the directory tree int eh Source directory will look like

├── pyzip_ver1_21.zip
├── zipgateway-2.81.03-Source
└── zipgateway-2.81.03-Source.tar.bz2

Inside the untared source directory contains the source. In order to get the source in the desired location for zipgateway-env to compile it run the following:

cp -rv zipgateway-2.81.03/* <path_to_zipgateway_env_project>/zipgateway-source/2.81.03

If you are using a different supported zipgateway version feel free to switch out the versions accordingly.

Now we will want to run the env and tell it to compile zipgateway for us:

./env.sh
zgw compile 2.81.03

This should compile and setup additional configuration files needed for zipgateway.

Running zipgateway

To run zipgateway ensure that you have your Z-Wave bridge controller in your computer and shows up as a device in the /dev directory. For the below example we assume that USB device is /dev/ttyUSB0 and we are going run version 2.81.03:

./env.sh
zgw run /dev/ttyUSB0 2.81.03

zipgateway-env's People

Contributors

mattludwigs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

djantea kpine ejc123

zipgateway-env's Issues

dockerfile incompatible with v7.16.1

Encountered because of smartrent/grizzly#567 (comment)

I noticed that the current dockerfile does not work with v7.16.1, I had to switch to the i386 ubuntu image and use a newer version of make:

I'm still struggling to get it to run on the Raspberry but I thought it might be worthwhile to report here the compile issue (not sure if my diff is an appropriate fix).

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.