diff --git a/docs/integrate/home_assistant.md b/docs/integrate/home_assistant.md index 2ea7993f1f..44058cf008 100644 --- a/docs/integrate/home_assistant.md +++ b/docs/integrate/home_assistant.md @@ -11,7 +11,7 @@ From Home Assistant site > The discovery of MQTT devices will enable one to use MQTT devices with only minimal configuration effort on the side of Home Assistant. The configuration is done on the device itself and the topic used by the device. -On OpenMQTTGateway the Home Assistant discovery is enabled by default on all binaries and platformio configurations except for UNO. With Arduino IDE please read the [advanced configuration section](../upload/advanced-configuration#auto-discovery) of the documentation. Here are a few tips for activating discovery on Home Assistant, but for detailed configuration please refer to the Home Assistant website. +On OpenMQTTGateway the Home Assistant discovery is enabled by default on all binaries and platformio configurations. Here are a few tips for activating discovery on Home Assistant, but for detailed configuration please refer to the Home Assistant website. Enable discovery on your MQTT integration in HASS (activated per default). diff --git a/docs/upload/advanced-configuration.md b/docs/upload/advanced-configuration.md index 2368d6c67f..f6ea523c0c 100644 --- a/docs/upload/advanced-configuration.md +++ b/docs/upload/advanced-configuration.md @@ -53,7 +53,7 @@ home/OpenMQTTGateway/SRFBtoMQTT/59365 {"raw":"2B660186042E00E7E5","value":"59365 It can be useful to avoid warning or errors on certain controllers. ## Auto discovery -Home Assistant discovery is enabled by default on all binaries and platformio configurations except for UNO. With Arduino IDE you have to uncomment [ZmqttDiscovery](https://github.com/1technophile/OpenMQTTGateway/blob/0180a0dbd55ed8e0799e30ee84f68070a6f478fa/User_config.h#L99) in User_config.h. +Home Assistant discovery is enabled by default on all binaries and platformio configurations. To have a working discovery setup you need to enable it on your MQTT integration definition in HASS. diff --git a/docs/upload/binaries.md b/docs/upload/binaries.md index 2348ff7e06..55de05c6f4 100644 --- a/docs/upload/binaries.md +++ b/docs/upload/binaries.md @@ -15,7 +15,6 @@ https://www.espressif.com/en/products/hardware/esp32/resources * Choose ESP32 DownloadTool * Set the files and the address as below: ![Flash download tool](../img/OpenMQTTgateway_ESP32_binary_flash.png) -And set the parameters used by Arduino IDE, we are able to upload to ESP32 a binary file containing OpenMQTTGateway. * Set the config as above * Connect your ESP32 board and select the COM port * Click on erase if it is your first upload diff --git a/docs/upload/builds.md b/docs/upload/builds.md index e2c9f64e50..a12edb5336 100644 --- a/docs/upload/builds.md +++ b/docs/upload/builds.md @@ -2,16 +2,10 @@ ## Introduction -This section is useful if you want to do advanced configuration of your project or if you choose an Arduino. Indeed the ESP hardware family can be loaded directly without any configuration from your desktop. +This section is useful if you want to make an advanced project configuration not supported by the pre-built binaries. Advanced configuration means changing the default pins, the MQTT topics, 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) files. If you don't have to change the default parameters except Wi-Fi and MQTT broker settings, you don't need advanced configuration; you can go directly to the [Upload Binaries](binaries.md) section instead. -To make advanced configurations to OpenMQTTGateway, you have the choice between two development environments: -* [PlatformIO](https://platformio.org/) -* [Arduino IDE](https://www.arduino.cc/en/Main/Software) - -I recommend using PlatformIO; this way you will not have to search for all the necessary libraries and adequate forks/revisions. If you really want to use Arduino IDE, you need to download the libraries listed [here](https://github.com/1technophile/OpenMQTTGateway/blob/d2dd6138558909b71cc44f69665340247bd5f356/platformio.ini#L55) at the version or revision specified. - ## Configure & Upload with PlatformIO * Download the [CODE](https://github.com/1technophile/OpenMQTTGateway/releases) from github. @@ -209,38 +203,6 @@ upload_flags = --port=8266 ``` -## Configure & Upload with Arduino IDE - -* Download the [CODE](https://github.com/1technophile/OpenMQTTGateway/releases) from github -* First download the last version of the Arduino IDE from the Arduino [website](https://www.arduino.cc/en/Main/Software) -* Add ESP32 boards by following this [tutorial](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide) -* Add ESP8266 boards by following this [tutorial](https://github.com/esp8266/Arduino#installing-with-boards-manager) -* Download the libraries package corresponding to your board and module wished into the same page (example esp32-m5stick-c-ble-libraries.zip) -* Unzip the libraries into your Arduino libraries folder (example D:/Users/XXXX/Documents/Arduino/libraries) -* If necessary replace the spaces into each library folder by _: example rename “ESP32 BLE Arduino” folder to “ESP32_BLE_Arduino” -* Open the file main.ino from OpenMQTTGateway/main folder with the Arduino IDE -* Change the settings and the desired gateways into `User_config.h` (uncomment the modules you want) - -*Example for the use of RF gateway:* - -```cpp -#define ZgatewayRF "RF" //ESP8266, Arduino, ESP32 -//#define ZgatewayIR "IR" //ESP8266, Arduino, Sonoff RF Bridge -//#define ZgatewayLORA "LORA" //ESP8266, Arduino, ESP32 -//#define ZgatewayPilight "Pilight" //ESP8266, Arduino, ESP32 -//#define ZgatewayBT "BT" //ESP8266, ESP32 -``` - -* Change the pins or parameters corresponding to the modules chosen, for RF you can change the pins in config_RF.h -* Choose the board on the Arduino IDE -* Select the port corresponding to the board -* Note that for using BLE on ESP32 you will need to select *Minimal SPIFFS* into Tools->Partition Scheme -* Open the serial monitor and set 115200 baud -* Upload ➡️ -* You should see the logs in the serial monitor - -With an ESP if you did not set your network and MQTT parameters manually you can now open the [web portal configuration](portal.md). - ## API 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. diff --git a/docs/upload/troubleshoot.md b/docs/upload/troubleshoot.md index 97a31b7ffb..e99f067b31 100644 --- a/docs/upload/troubleshoot.md +++ b/docs/upload/troubleshoot.md @@ -3,8 +3,7 @@ ## Compilation/build error This badge [![Build Status](https://github.com/1technophile/OpenMQTTGateway/workflows/Build/badge.svg?branch=master)](https://github.com/1technophile/OpenMQTTGateway/actions?query=branch%3Amaster+workflow%3ABuild) show you the state of the compilation of the master and this one [![Build Status](https://github.com/1technophile/OpenMQTTGateway/workflows/Build/badge.svg?branch=development)](https://github.com/1technophile/OpenMQTTGateway/actions?query=branch%3Adevelopment+workflow%3ABuild) for the development branch. If you see a green badge this means that the code compilation is OK with the configuration given in the `docs/platformio.ini`. -Check your IDE environment version, boards version, libraries version before submitting an issue or a question. -Verify especially that the libraries provided into the [release page](https://github.com/1technophile/OpenMQTTGateway/releases) are located into your "sketchbook folder"/libraries if your are using the Arduino IDE. +Check your environment, boards , libraries before submitting an issue or a question. ## ESP32 compilation errors related to WiFi If you get one or several of the following errors: @@ -36,15 +35,6 @@ in config_rf.h instead of `#define RF_RECEIVER_GPIO 0 // D3 on nodemcu` -## Exception seen on serial monitor: -Hey I got a callback -malloc -memcpy -7 -Exception (2): - -→ You are not using the last update of ESP8266 into board manager, go to your Arduino IDE and update it, should be at least 2.3.0 - ## Repetitive MQTT disconnections or/and commands sent to the gateway not taken into account Most probably a network issue, don't use a guest network and if going through a firewall check its rules. To put aside gateway issue, try to connect to a local broker on the same network. @@ -53,7 +43,7 @@ This is due to a too small MQTT packet size, open User_config.h and set: `#define mqtt_max_packet_size 1024` ## Your Arduino with w5100 Ethernet shield does not connect to network until you press Reset button -If you notice that your Arduino with w5100 Ethernet shield does not connect to network until you press its Reset button, but connects fine if you connect the Arduino with a USB cable to a computer/laptop with Arduino IDE running and open Serial Monitor, the problem is most likely the Ethernet shield and/or the power supply you're using. +If you notice that your Arduino with w5100 Ethernet shield does not connect to network until you press its Reset button, but connects fine if you connect the Arduino with a USB cable to a computer/laptop with the IDE running and open Serial Monitor, the problem is most likely the Ethernet shield and/or the power supply you're using. According to this [video](https://www.youtube.com/watch?v=9ZBeprOqC3w&feature=youtu.be), w5100 clones sometimes struggle to initialise because the reset pin wasn't held low long enough. The solution is simple - add a 0.1uF (100nF) capacitor between the pins on the reset switch. You can get more details [here](http://forum.arduino.cc/index.php?topic=28175.15). But even with this fix your board might not work well with a specific PSU. I would recommend try at least one different one and also try bigger capacitor (some report using 47uF) diff --git a/docs/use/gateway.md b/docs/use/gateway.md index 8f5abcb5c4..d0acf3df5e 100644 --- a/docs/use/gateway.md +++ b/docs/use/gateway.md @@ -32,7 +32,7 @@ If you want the settings to be kept upon gateway restart, you can save the state `mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"disc":false, "save":true}'` ::: tip -Auto discovery is enabled by default on release binaries and platformio (except for UNO). With Arduino IDE, please read the [advanced configuration section](../upload/advanced-configuration#auto-discovery) of the documentation. +Auto discovery is enabled by default on release binaries and platformio. ::: ## AutoDiscovery compatible with OpenHAB (default: false)