added support for secure TLS connections (#699)

* added support for secure TLS connections
on ESP32 and ESP8266 close #101

* added TLS test builds

* added documentation for TLS
fixed some some issues in the documentation

* added documentation for error code=54
This commit is contained in:
Leon Kiefer authored and GitHub committed 2020-08-02 11:29:28 -05:00
1 parent 60d173ff51
commit b5527d2e7b
14 files changed
+180 -40

No files matched your search

+6 -6
View File
@@ -1,6 +1,6 @@
# Upload with PlatformIO
This section is usefull if you want to do advanced configuration of your project or if you choose an Arduino. Indeed the ESP family can be loaded directly without any configuration from your desktop.
Advanced configurations means changing the default used pins, the MQTT subjects and all the expert parameters that you can find in [user_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/development/main/User_config.h) and in all [config_XX.h](https://github.com/1technophile/OpenMQTTGateway/tree/development/main).
Advanced configurations means changing the default used pins, the MQTT subjects and all the expert parameters that you can find in [User_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/development/main/User_config.h) and in all [config_XX.h](https://github.com/1technophile/OpenMQTTGateway/tree/development/main).
If you don't have to change the default parameters except wifi and broker setting you can go directly to the [Load](load) section.
Download the [CODE](https://github.com/1technophile/OpenMQTTGateway/releases) from github.
@@ -28,9 +28,9 @@ default_envs = esp32dev-rf
If you don't know which env to activate you can refer to [devices](../prerequisites/devices).
The different listed configurations represents some standard environments, to overload them with special parameters or modules you can modify the config files. The definitions coming from [platformio.ini](https://github.com/1technophile/OpenMQTTGateway/blob/development/platformio.ini) file and config files are cumulative.
The main config file is [user_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/development/main/User_config.h), added to it you have one config file per gateway, sensor or actuator, you will find them in the [main](https://github.com/1technophile/OpenMQTTGateway/tree/development/main) folder.
The main config file is [User_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/development/main/User_config.h), added to it you have one config file per gateway, sensor or actuator, you will find them in the [main](https://github.com/1technophile/OpenMQTTGateway/tree/development/main) folder.
If you want to add more sensors or gateways to one `default_envs` you can uncomment them into [user_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/d2dd6138558909b71cc44f69665340247bd5f356/main/User_config.h#L84) or add the modules directly into your environment definition of your .ini files.
If you want to add more sensors or gateways to one `default_envs` you can uncomment them into [User_config.h](https://github.com/1technophile/OpenMQTTGateway/blob/d2dd6138558909b71cc44f69665340247bd5f356/main/User_config.h#L84) or add the modules directly into your environment definition of your .ini files.
Example to add IR to `esp32dev-rf` add the `build_flags` below to the env definition:
``` ini
@@ -102,7 +102,7 @@ With the V0.9 we added the support of json for receiving and publishing.
Per default Json reception and Json publication is activated, the previous simple reception mode is also activated to avoid regression on commands.
You can deactivate Json or simple mode following theses instructions:
```C++
```cpp
#define jsonPublishing true //comment if you don't want to use Json publishing (one topic for all the parameters)
//example home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4 {"rssi":-63,"servicedata":"fe0000000000000000000000000000000000000000"}
//#define simplePublishing true //comment if you don't want to use simple publishing (one topic for one parameter)
@@ -114,7 +114,7 @@ You can deactivate Json or simple mode following theses instructions:
```
If you are using platformio you can also comment the definitions above and define your parameters into platformio.ini file by setting the following `build_flags`:
```C++
```cpp
'-DjsonPublishing=true'
'-DjsonReceiving=true'
'-DsimpleReceiving=true'
@@ -138,4 +138,4 @@ With an ESP if you did not set your network and mqtt parameters manualy you can
::: warning Note
simpleReceiving on Arduino boards doesn't accept 64 bits MQTT values, you can only send 32bits values from the MQTT broker.
:::
:::