Skip to content

Commit 46680cb

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

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

README.md

+49-3
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,25 @@ 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" TlsClientCertificateFile="client.crt" TlsClientCertificatePrivateKeyFile="client.key"
192+
> TlsServerTargetHost="jeedom-mosquitto" />
193+
>
194+
> </Configuration>
195+
> ```
196+
181197
### Configure the gateways
182198
183199
OpenNetty requires listing the gateways in the configuration file.
@@ -216,7 +232,7 @@ socket to initiate OpenWebNet sessions:
216232

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

219-
For that, you need to a `Device` node with the correct brand/model attributes for each device present in the installation:
235+
For that, you need to add a `Device` node with the correct brand/model attributes for each device present in the installation:
220236
- The serial number is required for In One by Legrand and MyHome Play devices and optional for MyHome Up devices.
221237
- The unit node is not used for MyHome Up devices but is generally required for In One by Legrand and MyHome Play devices.
222238
- 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 +321,12 @@ For that, you need to a `Device` node with the correct brand/model attributes fo
305321
<Capability Name="On/off switching" />
306322
</Endpoint>
307323

324+
<!-- MyHome Up light point general endpoint -->
325+
326+
<Endpoint Name="General/All lights" Type="SCS light point general">
327+
<Capability Name="On/off switching" />
328+
</Endpoint>
329+
308330
</Configuration>
309331
```
310332

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

339385
### Primitives

0 commit comments

Comments
 (0)