haasp.net/content/cli/_index.md
2018-10-31 20:57:19 +01:00

51 lines
1.5 KiB
Markdown

+++
title = "CLI"
weight = 7
date = "2018-08-06T11:09:51.000Z"
lastmodifierdisplayname = "Christian Martinsson"
lastmodifieremail = "chrillemz@gmail.com"
+++
Command Line Interface for HAASP.
* Monitor all HAASP activity remotly on the network
* Send command to applications *(application dependant)*
## Installation
Make sure you have python3, git and pip installed
`pip install -U git+https://git.cmtec.se/haasp/libhaasp.git`
`pip install -U git+https://git.cmtec.se/haasp/haasp_cli.git`
## Usage
`haasp_cli [OPTIONS] COMMAND [ARGS]`
### Options:
* --ip
Defines the HAASP core module IP on the network. Default to localhost if not defined.
### Commands:
* cmd
`haasp_cli [OPTION] cmd DESTINATION [COMMAND] [VALUE]`
Passing through command to application
example: `haasp_cli -ip 192.168.30.30 cmd zwave list_values 1`
*! cmd are entirely dependant on how each module has implement the cmd function !*
* event
`haasp_cli [OPTION] event SOURCE DESTINATION REFERENCE VALUE`
Simulate event
example: `haasp_cli -ip 192.168.30.30 event zwave core bedroom_light true`
* log
`haasp_cli [OPTION] log [FILTER]`
Show log output for all HAASP events. Use FILTER to filter out one specific module.
example: `haasp_cli -ip 192.168.30.30 log`
example: `haasp_cli -ip 192.168.30.30 log core`
example: `haasp_cli -ip 192.168.30.30 log zwave`
* ping
`haasp_cli [OPTION] ping DESTINATION`
Check if module is alive
example: `haasp_cli ping core`
example: `haasp_cli -ip 192.168.30.30 ping zwave`