File: README.md

package info (click to toggle)
zwave-js-server-python 0.67.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,820 kB
  • sloc: python: 15,886; sh: 21; javascript: 16; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# zwave-js-server-python

Python library for communicating with [zwave-js-server](https://github.com/zwave-js/zwave-js-server/). Goal for this library is to replicate the structure and the events of Z-Wave JS 1:1. So it has a `Driver`, `Controller` and `Node` classes.

## Setup development environment

To setup your development environment, run `scripts/setup`, which will install all requirements and set up pre-commit checks.

## Trying it out

```shell
python3 -m zwave_js_server ws://localhost:3000
```

Or get the version of the server

```shell
python3 -m zwave_js_server ws://localhost:3000 --server-version
```

Or dump the state. Optionally add `--event-timeout 5` if you want to listen 5 seconds extra for events.

```shell
python3 -m zwave_js_server ws://localhost:3000 --dump-state
```

## Sending commands

```python
try:
    result = await client.async_send_command({ "command": "start_listening" })
except zwave_js_server.client.FailedCommand as err:
    print("Command failed with", err.error_code)
```