Skip to content

Commit 7645c15

Browse files
committed
Clarify that OpenNetty supports MQTT over TLS and certificate authentication
1 parent 54b9b5b commit 7645c15

File tree

1 file changed

+51
-3
lines changed

1 file changed

+51
-3
lines changed

README.md

+51-3
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,27 @@ server/port/username/password attributes to match the values used by your MQTT b
175175
</Configuration>
176176
```
177177

178-
> [!TIP]
178+
> [!IMPORTANT]
179179
> Using a code editor like [Visual Studio Code](https://code.visualstudio.com/) greatly simplifies writing the configuration file.
180180
181+
> [!TIP]
182+
> For increased security, OpenNetty supports MQTTS and TLS client authentication: to use TLS, add the necessary `.crt` and `.key` files to the OpenNetty
183+
> folder and set the `TlsServerCertificateAuthorityFile`, `TlsClientCertificateFile` and `TlsClientCertificatePrivateKeyFile` attributes.
184+
>
185+
> If necessary, a custom `TlsServerTargetHost` value – required when using Jeedom's `MQTT Manager` plugin and the default configuration – can be set:
186+
>
187+
> ```xml
188+
> <Configuration>
189+
>
190+
> <Mqtt Server="192.168.5.1" Port="8883" Username="jeedom" Password="koIiuhTFGtrdRkjLKhYGvgfFSDr"
191+
> TlsServerCertificateAuthorityFile="ca.crt"
192+
> TlsClientCertificateFile="client.crt"
193+
> TlsClientCertificatePrivateKeyFile="client.key"
194+
> TlsServerTargetHost="jeedom-mosquitto" />
195+
>
196+
> </Configuration>
197+
> ```
198+
181199
### Configure the gateways
182200
183201
OpenNetty requires listing the gateways in the configuration file.
@@ -216,7 +234,7 @@ socket to initiate OpenWebNet sessions:
216234

217235
To be able to communicate with "In One by Legrand", "MyHome Play" and "MyHome Up" devices, OpenNetty requires listing them in the configuration file.
218236

219-
For that, you need to a `Device` node with the correct brand/model attributes for each device present in the installation:
237+
For that, you need to add a `Device` node with the correct brand/model attributes for each device present in the installation:
220238
- The serial number is required for In One by Legrand and MyHome Play devices and optional for MyHome Up devices.
221239
- The unit node is not used for MyHome Up devices but is generally required for In One by Legrand and MyHome Play devices.
222240
- The unit must match one of the unit identifiers offered by the specific device. If you're unsure what identifier should be used,
@@ -305,6 +323,12 @@ For that, you need to a `Device` node with the correct brand/model attributes fo
305323
<Capability Name="On/off switching" />
306324
</Endpoint>
307325

326+
<!-- MyHome Up light point general endpoint -->
327+
328+
<Endpoint Name="General/All lights" Type="SCS light point general">
329+
<Capability Name="On/off switching" />
330+
</Endpoint>
331+
308332
</Configuration>
309333
```
310334

@@ -328,12 +352,36 @@ sudo service opennetty start
328352
>
329353
> You can also send an empty `opennetty/bedroom/wall light/switch_state/get` message to get the current switch state of the endpoint.
330354
331-
> [!TIP]
355+
> [!IMPORTANT]
332356
> The complete list of supported MQTT attributes can be found in the [`OpenNettyMqttAttributes.cs` file](src/OpenNetty.Mqtt/OpenNettyMqttAttributes.cs).
333357
>
334358
> Ready-to-use templates for Jeedom's [jMQTT plugin](https://market.jeedom.com/index.php?v=d&p=market_display&id=3166)
335359
> can be found in the [opennetty-resources](https://github.com/opennetty/opennetty-resources) repository.
336360
361+
### If necessary, change the default log level
362+
363+
By default, OpenNetty always uses `Information` as the default log level. The log level
364+
can be easily changed by editing the `appsettings.json` file and restarting the daemon:
365+
366+
```bash
367+
sudo nano /usr/local/bin/opennetty/appsettings.json
368+
```
369+
370+
```json
371+
{
372+
"Logging": {
373+
"LogLevel": {
374+
"Default": "Information",
375+
"OpenNetty": "Debug"
376+
}
377+
}
378+
}
379+
```
380+
381+
```bash
382+
sudo service opennetty restart
383+
```
384+
337385
## Using OpenNetty as a library
338386

339387
### Primitives

0 commit comments

Comments
 (0)