@@ -22,6 +22,95 @@ Or relevant sources pages, to get started head to:
22
22
23
23
## Quickstart
24
24
25
+ ### Native (Linux) build
26
+
27
+ The project is CMake based, to prepare the environment,
28
+ have a look at [ ./helper.mk] ( helper.mk ) 's details
29
+ for needed steps to setup developer system before using CMake normally.
30
+
31
+ At the moment stable version of Debian (12) is supported,
32
+ so it should work also in relatives projects (Ubuntu, RaspiOS, WSL2 etc)
33
+ and should be easy to adapt to other distributions.
34
+
35
+ ``` sh
36
+ sudo apt-get install -y sudo make git
37
+
38
+ git clone https://github.com/SiliconLabsSoftware/z-wave-protocol-controller
39
+ cd z-wave-protocol-controller
40
+
41
+ ./helper.mk help
42
+ ./helper.mk setup # To setup developer system (once)
43
+ ./helper.mk VERBOSE=1 # Default build tasks verbosely (depends on setup)"
44
+ ./helper.mk run # Run entry-point application
45
+ ```
46
+
47
+ It should print zpc's help.
48
+
49
+ To use it, a Silicon Labs' Z-Wave NCP should be plugged in USB port
50
+ to verify you can check firmware version:
51
+
52
+ ``` sh
53
+ serial=$( ls /dev/serial/by-id/usb-Silicon_Labs* | head -n1)
54
+ ./helper.mk all run run_args=" --zpc.serial=${serial} --zpc.ncp_version"
55
+ # <i> [zpc_ncp_update] chip_serial_api_version: 7.23.1
56
+ ```
57
+
58
+ Then let's interact with ZPC's inbuilt shell without installing it.
59
+
60
+ ``` sh
61
+ serial=$( ls /dev/serial/by-id/usb-Silicon_Labs* | head -n1)
62
+ run_args=" --zpc.serial=${serial} "
63
+ mapdir=" applications/zpc/components/dotdot_mapper/rules"
64
+ run_args=" $run_args --mapdir=${mapdir} "
65
+ datastore_file=" tmp.db"
66
+ run_args=" $run_args --zpc.datastore_file=${datastore_file} "
67
+ cache_path=" tmp"
68
+ run_args=" $run_args --zpc.ota.cache_path=${cache_path} "
69
+
70
+ sudo apt install -y mosquitto # Is a strong runtime dependency
71
+ mkdir -p ${cache_path}
72
+ ./helper.mk run run_args=" $run_args "
73
+
74
+ ZPC> help
75
+ ==================================================
76
+ Unify Command line interface Help:
77
+ ==================================================
78
+ (...)
79
+ exit :Exit the application
80
+ (...)
81
+ zwave_home_id Print Z-Wave Home ID
82
+ (...)
83
+ zwave_add_node :Add a Z-Wave node to the network
84
+ (...)
85
+ zwave_set_default Reset Z-Wave network
86
+ (...)
87
+ ZPC> zwave_home_id
88
+ Z-Wave Home ID:
89
+ 1BADC0DE
90
+ ZPC> zwave_add_node
91
+ (...)
92
+ ```
93
+
94
+ ### Docker build
95
+
96
+ The fastest (less than 20min) way to build z-wave-protocol-controller from scratch
97
+ is to delegate all tasks to docker.
98
+
99
+ ``` sh
100
+ docker build https://github.com/SiliconLabsSoftware/z-wave-protocol-controller.git#ver_1.7.0
101
+ ```
102
+
103
+ This one-liner will do download latest release, setup environment, build, test, package...
104
+
105
+ Also a docker-compose file is provided to start zpc and use it along a mqtt client.
106
+
107
+ Power users might prefer to work in sources tree in a native GNU/Linux
108
+ environment as explained above.
109
+
110
+ ### More
111
+
112
+ Refer to [ ./doc] ( doc ) for more (using MQTT, WebApp etc).
113
+
25
114
26
115
## Contributing
27
116
0 commit comments