You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remoteSwitch works particulary well on SoC boards like the Raspberry / Orange / Banana Pis.
41
-
42
-
remoteSwitch is just a single executable.
37
+
You can download a zip archive with the compiled binary for MacOS (AMD64), Linux (386/AMD64/ARM/ARM64) and Windows (386/AMD64) from the
38
+
[releases](https://github.com/dh1tw/remoteSwitch/releases) page. remoteSwitch works particularly well on SoC boards like the Raspberry / Orange / Banana Pis. The application itself is just a single executable.
43
39
44
40
## Dependencies
45
41
@@ -77,39 +73,58 @@ So let's fire up a remoteSwitch server for a dummy 6x2 antenna/bandswitch.
77
73
78
74
To get a list of supported flags for the nats server, execute:
79
75
80
-
```
76
+
```bash
81
77
$ ./remoteSwitch server nats --help
78
+
79
+
80
+
The nats server allows you to expose an Switch on a nats.io broker. The broker
81
+
can be located within your local lan or somewhere on the internet.
which comes conveniently pre-configured for our dummy antenna/bandswitch.
103
+
which comes conveniently pre-configured for our dummy antenna/bandswitch. The [example folder](https://github.com/dh1tw/remoteSwitch/tree/master/examples) in this repository contains additional example configurations.
104
+
105
+
### NATS Broker
89
106
90
-
[NATS](https://nats.io) is an open source, lightweight, high performance message broker which is needed for the underlying communication.
91
-
You can decide where to run your NATS instance. You can run it on your local
92
-
machine, in a VPN or expose it to the internet. You can download the NATS broker [here](https://nats.io/download/nats-io/gnatsd/).
107
+
[NATS](https://nats.io) is an open source, lightweight, high performance message broker which is needed for the underlying communication. You can decide where to run your NATS instance. You can run it on your local machine, in a VPN or expose it to the internet. You can download the NATS broker [here](https://nats.io/download/nats-io/nats-server).
93
108
94
109
run the NATS broker:
95
110
96
-
```
97
-
$ ./gnatsd
98
-
```
111
+
```bash
112
+
$ ./nats-server
99
113
100
-
```
101
-
[27781] 2019/01/10 21:36:41.886770 [INF] Starting nats-server version 1.0.4
102
-
[27781] 2019/01/10 21:36:41.887812 [INF] Listening for client connections on 0.0.0.0:4222
103
-
[27781] 2019/01/10 21:36:41.887821 [INF] Server is ready
114
+
[62418] 2020/04/11 02:46:09.413858 [INF] Starting nats-server version 2.1.6
[62418] 2020/04/11 02:46:09.414150 [INF] Listening for client connections on 0.0.0.0:4222
117
+
[62418] 2020/04/11 02:46:09.414156 [INF] Server id is NDCPYYXYRSKD6PIBTS7YHZGEBWIN3CBPRH232CMHUWU3NXBQTTBBQRNF
118
+
[62418] 2020/04/11 02:46:09.414158 [INF] Server is ready
104
119
```
105
120
121
+
### Connecting to the NATS broker
122
+
106
123
Let's execute:
107
124
108
125
```bash
109
126
$ ./remoteSwitch server nats --config=.remoteSwitch.toml
110
-
```
111
127
112
-
```
113
128
Using config file:
114
129
/home/dh1tw/.remoteSwitch.toml
115
130
2019/01/11 23:50:20 Listening on shackbus.switch.6x2_Bandswitch
@@ -118,7 +133,7 @@ Using config file:
118
133
119
134
## Web Interface
120
135
121
-
remoteSwitch comes with a built-in web server which allows to control all switches connected to the same NATS broker. All instances of remoteSwitch are automatically discovered.
136
+
remoteSwitch comes with a built-in web server which allows to control all switches connected to the same NATS broker. All instances of remoteSwitch are automatically discovered. You can run several instances of the web server. This might be handy if you have to deal with lan/wan restrictions or if you need redundancy.
122
137
123
138
Simply launch:
124
139
@@ -151,38 +166,29 @@ The GPIO switches are pretty flexible in configuration and should be able to cop
151
166
152
167
## Behaviour on Errors
153
168
154
-
If an error occures from which remoteSwitch can not recover, the application
155
-
exits. It is recommended to execute remoteSwitch as a service under the supervision of a scheduler like [systemd](https://en.wikipedia.org/wiki/Systemd).
169
+
If an error occurs from which remoteSwitch can not recover, the application exits. It is recommended to execute remoteSwitch as a service under the supervision of a scheduler like [systemd](https://en.wikipedia.org/wiki/Systemd).
156
170
157
171
## Bug reports, Questions & Pull Requests
158
172
159
-
Please use the Github [Issue tracker](https://github.com/dh1tw/remoteSwitch/issues)
160
-
to report bugs and ask questions! If you would like to contribute to remoteSwitch,
161
-
[pull requests](https://help.github.com/articles/creating-a-pull-request/) are
162
-
welcome! However please consider to provide unit tests with the PR to verify
163
-
the proper behaviour.
173
+
Please use the Github [Issue tracker](https://github.com/dh1tw/remoteSwitch/issues) to report bugs and ask questions! If you would like to contribute to remoteSwitch, [pull requests](https://help.github.com/articles/creating-a-pull-request/) are welcome! However please consider to provide unit tests with the PR to verify the proper behavior.
164
174
165
175
If you file a bug report, please include always the version of remoteSwitch
0 commit comments