Giter Site home page Giter Site logo

sameer / python-openzwave-sniffer Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 15 KB

A simple OpenZWave Network Sniffer written in Python 3 that logs to an output file in CSV format

License: MIT License

Shell 12.73% Python 87.27%
zwave python sniffer zwave-network openzwave

python-openzwave-sniffer's Introduction

OpenZWave Sensor Sniffer in Python 3

This program initializes the ZWave Network, logging any and all value refreshes received to the file output.csv -- this includes sensor readings and other updates.

Set-up

Ubuntu (also Windows Subsystem for Linux with Ubuntu)

Note: if you do not already have Windows Subsystem for Linux, follow the installation guide provided by Microsoft

  • ./setup_ubuntu.sh
  • ./allow_port_access_forever_ubuntu.sh

OS X

  • ./setup_os_x.sh

Running

  • ./run.sh <optional port name, defaults to /dev/ttyACM0 for Linux>

Stopping

  • Just do ctrl+C once, it will stop itself.

FAQ

What should the port name be?

Let # as used below be the port number of the ZWave Stick.

Windows Subsystem for Linux with Ubuntu

It should be COM# in Windows and /dev/ttyS# in Ubuntu. You can try figure out what # is by opening Device Manager and looking at the USB devices list, then trying each with ./run.sh /dev/ttyS# until it works. If you get an error message that permission is denied, run ./allow_port_access_once.sh /dev/tty/S#.

OS X

It should be /dev/ttyUSB#, you can also try each one until you get it right.

Any other Linux system

It should be /dev/ttyACM#, you may need permission to read/write to the port. In that case, run ./allow_port_access_once.sh /dev/ttyACM# or use the indefinite version.


Is it relatively safe to delete all the files that seem to be generated (i.e. pyozw.sqlite) when I run the sniffer?

Yes, just make sure you stop the sniffer first. Use clean.sh


Error in manager callback: KeyError: 'valueid'

If you're seeing this, there was an error in configuring the network properly. It's best to re-download/re-clone this repo and run it from there, or alternatively delete all the new files.


Stuck in state "Topology loaded"

This has happened to me several times -- usually, the issue is that you're running the network for the first time and the stick is waiting for something (not sure what). The solution tends to be to press the button on each of the sensors once.

python-openzwave-sniffer's People

Contributors

sameer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

submars

python-openzwave-sniffer's Issues

Getting Z-wave stick to work with WSL on Ubuntu?

Hi,
Thanks for this library and instructions.

I am trying to get it to work on Windows 10 with WSL on Ubuntu. I noticed that your README has instructions for WSL. Have you got it working there before? I have the Aeotec Z-wave Stick and have it plugged into COM4 on the machine as shown by Device Manager.

image

I have configured /dev/ttyS4 as covered in the following article: https://www.scivision.dev/usb-tty-windows-subsystem-for-linux/

chmod 666 /dev/ttyS4
stty -F /dev/ttyS4 115200

When I try to run the sniffer, I just get the following:

$ ./run.sh /dev/ttyS4
2019-07-04 17:43:26,235 INFO openzwave/main.py[13328] -- Launching with ZWave Stick at /dev/ttyS4
2019-07-04 17:43:26,259 INFO openzwave/main.py[13328] -- Starting network...
2019-07-04 17:43:26,260 INFO openzwave [13328] -- Start Openzwave network.
2019-07-04 17:43:26,511 INFO openzwave/main.py[13328] -- Stopped

Any ideas?

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.